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>
This commit is contained in:
Rex-BC Chen 2021-07-22 11:16:15 +08:00 committed by Hung-Te Lin
parent 1b7dac1bd0
commit 97582de448
2 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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();