From 12520134f17b55ac7f695d1d9384e33a99b18def Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Sun, 8 Dec 2019 14:05:32 +0100 Subject: mb/google/daisy: Move 'PMIC_BUS' to Kconfig Change-Id: If40fa38e5b249452a6dacf4a4045b6bd00c27cfa Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/37580 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/mainboard/google/daisy/Kconfig | 4 ++++ src/mainboard/google/daisy/romstage.c | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/mainboard/google/daisy/Kconfig b/src/mainboard/google/daisy/Kconfig index f15bd9b864..61bb80b3a8 100644 --- a/src/mainboard/google/daisy/Kconfig +++ b/src/mainboard/google/daisy/Kconfig @@ -58,4 +58,8 @@ config UART_FOR_CONSOLE int default 3 +config PMIC_BUS + int + default 0 + endif # BOARD_GOOGLE_DAISY diff --git a/src/mainboard/google/daisy/romstage.c b/src/mainboard/google/daisy/romstage.c index 838a6c70d7..08570249e8 100644 --- a/src/mainboard/google/daisy/romstage.c +++ b/src/mainboard/google/daisy/romstage.c @@ -36,8 +36,6 @@ #include "exynos5250.h" -#define PMIC_BUS 0 - static void setup_power(int is_resume) { int error = 0; @@ -63,26 +61,26 @@ static void setup_power(int is_resume) * * Disable Coin BATT Charging */ - error = max77686_disable_backup_batt(PMIC_BUS); + error = max77686_disable_backup_batt(CONFIG_PMIC_BUS); - error |= max77686_volsetting(PMIC_BUS, PMIC_BUCK2, VDD_ARM_MV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_BUCK2, VDD_ARM_MV, REG_ENABLE, MAX77686_MV); - error |= max77686_volsetting(PMIC_BUS, PMIC_BUCK3, VDD_INT_UV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_BUCK3, VDD_INT_UV, REG_ENABLE, MAX77686_UV); - error |= max77686_volsetting(PMIC_BUS, PMIC_BUCK1, VDD_MIF_MV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_BUCK1, VDD_MIF_MV, REG_ENABLE, MAX77686_MV); - error |= max77686_volsetting(PMIC_BUS, PMIC_BUCK4, VDD_G3D_MV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_BUCK4, VDD_G3D_MV, REG_ENABLE, MAX77686_MV); - error |= max77686_volsetting(PMIC_BUS, PMIC_LDO2, VDD_LDO2_MV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_LDO2, VDD_LDO2_MV, REG_ENABLE, MAX77686_MV); - error |= max77686_volsetting(PMIC_BUS, PMIC_LDO3, VDD_LDO3_MV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_LDO3, VDD_LDO3_MV, REG_ENABLE, MAX77686_MV); - error |= max77686_volsetting(PMIC_BUS, PMIC_LDO5, VDD_LDO5_MV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_LDO5, VDD_LDO5_MV, REG_ENABLE, MAX77686_MV); - error |= max77686_volsetting(PMIC_BUS, PMIC_LDO10, VDD_LDO10_MV, + error |= max77686_volsetting(CONFIG_PMIC_BUS, PMIC_LDO10, VDD_LDO10_MV, REG_ENABLE, MAX77686_MV); - error |= max77686_enable_32khz_cp(PMIC_BUS); + error |= max77686_enable_32khz_cp(CONFIG_PMIC_BUS); if (error) { printk(BIOS_CRIT, "%s: PMIC error: %#x\n", __func__, error); -- cgit v1.2.3