diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.com> | 2022-07-20 11:35:57 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-07-21 10:33:22 +0000 |
commit | c5d4d964f1728dad5a60d84b8ee0febe0426678b (patch) | |
tree | e6418c4f4bcf1e36f4ca34d7828ab218c4666ee1 /src/soc/mediatek/mt8192/msdc.c | |
parent | d5dafb2c0a6bac5c9d87f0e07e339570e0fd3267 (diff) |
mb/google: Use boolean type for "enable" argument for regulator
Because 0 and 1 are the only possible values,
1. Change input argument "enable" of mainboard_enable_regulator to bool.
2. Change return value of mainboard_regulator_is_enabled() to bool.
TEST=build pass
BUG=b:233720142
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Iae09c5fedf8f7394bfbb677e5aee37ed061304fd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65997
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8192/msdc.c')
-rw-r--r-- | src/soc/mediatek/mt8192/msdc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/soc/mediatek/mt8192/msdc.c b/src/soc/mediatek/mt8192/msdc.c index 113069a27b..89f25a3adf 100644 --- a/src/soc/mediatek/mt8192/msdc.c +++ b/src/soc/mediatek/mt8192/msdc.c @@ -57,7 +57,6 @@ void mtk_msdc_configure_sdcard(void) void *gpio_base = (void *)IOCFG_RM_BASE; void *gpio_mode0_base = (void *)MSDC1_GPIO_MODE0_BASE; void *gpio_mode1_base = (void *)MSDC1_GPIO_MODE1_BASE; - uint8_t enable = 1; int i; const gpio_t sdcard_pu_pin[] = { @@ -85,6 +84,6 @@ void mtk_msdc_configure_sdcard(void) /* set sdcard dat1 pin to msdc1 mode */ clrsetbits32(gpio_mode1_base, MSDC1_GPIO_MODE1_MASK, MSDC1_GPIO_MODE1_VALUE); - mainboard_enable_regulator(MTK_REGULATOR_VCC, enable); - mainboard_enable_regulator(MTK_REGULATOR_VCCQ, enable); + mainboard_enable_regulator(MTK_REGULATOR_VCC, true); + mainboard_enable_regulator(MTK_REGULATOR_VCCQ, true); } |