diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com> | 2021-07-22 11:16:15 +0800 |
---|---|---|
committer | Hung-Te Lin <hungte@chromium.org> | 2021-07-23 06:01:52 +0000 |
commit | 97582de4487fa6caa50a60ada91f52a0e10943b8 (patch) | |
tree | b0b2a6efa7cbe181eb5f6feef66b1c459f1671f2 /src/mainboard | |
parent | 1b7dac1bd016a224b49bc5f66e7919d0b69147dd (diff) |
mb/google/cherry: replace magic numbers by the I2C bus name
When accessing I2C, we should use the official names (I2Cx)
instead of magic numbers.
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I17cc4c87f5ad26deeb5e529d1c106b697a53591b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56504
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/cherry/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/cherry/romstage.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/mainboard/google/cherry/mainboard.c b/src/mainboard/google/cherry/mainboard.c index 5758883edb..6b29f4417b 100644 --- a/src/mainboard/google/cherry/mainboard.c +++ b/src/mainboard/google/cherry/mainboard.c @@ -125,10 +125,10 @@ static void configure_sdcard(void) MSDC1_GPIO_MODE1_2, MSDC1_GPIO_MODE1_VALUE, MSDC1_GPIO_MODE1_3, MSDC1_GPIO_MODE1_VALUE); - mtk_i2c_bus_init(7); + mtk_i2c_bus_init(I2C7); if (CONFIG(BOARD_GOOGLE_CHERRY)) - mt6360_init(7); + mt6360_init(I2C7); mainboard_enable_regulator(MTK_REGULATOR_VCCQ, 1); mainboard_enable_regulator(MTK_REGULATOR_VCC, 1); diff --git a/src/mainboard/google/cherry/romstage.c b/src/mainboard/google/cherry/romstage.c index 193d8e16ac..c11fef45dc 100644 --- a/src/mainboard/google/cherry/romstage.c +++ b/src/mainboard/google/cherry/romstage.c @@ -11,16 +11,14 @@ #include <soc/rtc.h> #include <soc/scp.h> -#define I2C_BUS 7 - void platform_romstage_main(void) { mtk_pmif_init(); mt6359p_init(); mt6315_init(); - mtk_i2c_bus_init(I2C_BUS); + mtk_i2c_bus_init(I2C7); if (CONFIG(BOARD_GOOGLE_CHERRY)) - mt6360_init(I2C_BUS); + mt6360_init(I2C7); clk_buf_init(); rtc_boot(); mtk_dram_init(); |