From a7ebc6925b43c9488c421218cbbcb243e6420720 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Aug 2021 12:20:21 -0600 Subject: Convert CONFIG_DMA_LPC32XX to Kconfig This converts the following to Kconfig: CONFIG_DMA_LPC32XX Signed-off-by: Simon Glass --- scripts/config_whitelist.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 9f8fd151375..0dbcc165a6d 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -223,7 +223,6 @@ CONFIG_DM9000_NO_SROM CONFIG_DM9000_USE_16BIT CONFIG_DMA_COHERENT CONFIG_DMA_COHERENT_SIZE -CONFIG_DMA_LPC32XX CONFIG_DMA_NONCOHERENT CONFIG_DNET_AUTONEG_TIMEOUT CONFIG_DP_DDR_CTRL -- cgit v1.3.1 From 29d7153ec384e072755e8951a8a33f29372f925c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Aug 2021 12:20:26 -0600 Subject: power: Rename CONFIG_POWER to CONFIG_POWER_LEGACY This option is used in pre-driver model code and much of it has never been converted to driver model. We want to add a new option to enable power support, so we can use a simple rule in the Makefile. Rename this one, which is really about a particular implementation of power. Also update the pmic.h header file so it either includes the legacy API or the driver model one. Signed-off-by: Simon Glass Reviewed-by: Jaehoon Chung --- board/compulab/cl-som-imx7/cl-som-imx7.c | 4 ++-- board/freescale/imx8mp_evk/spl.c | 2 +- board/freescale/imx8mq_evk/spl.c | 2 +- board/samsung/common/board.c | 2 +- board/technexion/pico-imx7d/pico-imx7d.c | 2 +- board/tqc/tqma6/tqma6.c | 2 +- board/udoo/neo/neo.c | 2 +- drivers/power/Makefile | 2 +- drivers/power/regulator/Makefile | 2 +- include/configs/am43xx_evm.h | 2 +- include/configs/cl-som-imx7.h | 2 +- include/configs/cm_t43.h | 2 +- include/configs/el6x_common.h | 2 +- include/configs/gw_ventana.h | 2 +- include/configs/hikey.h | 2 +- include/configs/imx8mp_evk.h | 2 +- include/configs/imx8mq_evk.h | 2 +- include/configs/imx8mq_phanbell.h | 2 +- include/configs/ls1046ardb.h | 4 ++-- include/configs/mx51evk.h | 2 +- include/configs/mx53loco.h | 2 +- include/configs/mx6sabreauto.h | 2 +- include/configs/mx6sabresd.h | 2 +- include/configs/novena.h | 2 +- include/configs/phycore_imx8mp.h | 2 +- include/configs/pico-imx7d.h | 2 +- include/configs/pico-imx8mq.h | 2 +- include/configs/tqma6.h | 2 +- include/configs/udoo_neo.h | 2 +- include/configs/vining_2000.h | 2 +- include/configs/warp.h | 2 +- include/power/max77686_pmic.h | 2 +- include/power/pmic.h | 15 ++++++++++----- scripts/config_whitelist.txt | 2 +- 34 files changed, 45 insertions(+), 40 deletions(-) (limited to 'scripts') diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index 454c93a572f..c54e02fdb44 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -267,7 +267,7 @@ int board_init(void) return 0; } -#ifdef CONFIG_POWER +#ifdef CONFIG_POWER_LEGACY #define I2C_PMIC 0 int power_init_board(void) { @@ -293,7 +293,7 @@ int power_init_board(void) return 0; } -#endif /* CONFIG_POWER */ +#endif /* CONFIG_POWER_LEGACY */ /* * cl_som_imx7_setup_wdog() - watchdog configuration. diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index a7564e9b1ae..d317f212973 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -63,7 +63,7 @@ struct i2c_pads_info i2c_pad_info1 = { }, }; -#ifdef CONFIG_POWER +#ifdef CONFIG_POWER_LEGACY #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c index e8e0efe4855..6ee6230f748 100644 --- a/board/freescale/imx8mq_evk/spl.c +++ b/board/freescale/imx8mq_evk/spl.c @@ -156,7 +156,7 @@ int board_mmc_init(struct bd_info *bis) return 0; } -#ifdef CONFIG_POWER +#ifdef CONFIG_POWER_LEGACY #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 1c2fe025e89..08f9202b711 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -185,7 +185,7 @@ int board_early_init_f(void) } #endif -#if defined(CONFIG_POWER) || defined(CONFIG_DM_PMIC) +#if defined(CONFIG_POWER_LEGACY) || defined(CONFIG_DM_PMIC) int power_init_board(void) { set_ps_hold_ctrl(); diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 2d749dac19a..81b1fb35122 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -60,7 +60,7 @@ int dram_init(void) return 0; } -#ifdef CONFIG_POWER +#ifdef CONFIG_POWER_LEGACY #define I2C_PMIC 3 int power_init_board(void) { diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 0d8229d1123..f851e1948cf 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -247,7 +247,7 @@ static const char *tqma6_get_boardname(void) }; } -#ifdef CONFIG_POWER +#ifdef CONFIG_POWER_LEGACY /* setup board specific PMIC */ int power_init_board(void) { diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index 92a1e084b52..88889df2d2f 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -96,7 +96,7 @@ static struct i2c_pads_info i2c_pad_info1 = { }; #endif -#ifdef CONFIG_POWER +#ifdef CONFIG_POWER_LEGACY int power_init_board(void) { struct pmic *p; diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 0bef06920a7..ab52bc1582c 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -16,7 +16,7 @@ obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o obj-$(CONFIG_TWL4030_POWER) += twl4030.o obj-$(CONFIG_TWL6030_POWER) += twl6030.o obj-$(CONFIG_PALMAS_POWER) += palmas.o -obj-$(CONFIG_POWER) += power_core.o +obj-$(CONFIG_POWER_LEGACY) += power_core.o obj-$(CONFIG_DIALOG_POWER) += power_dialog.o obj-$(CONFIG_POWER_FSL) += power_fsl.o obj-$(CONFIG_POWER_I2C) += power_i2c.o diff --git a/drivers/power/regulator/Makefile b/drivers/power/regulator/Makefile index 677134c822c..4efb32a3228 100644 --- a/drivers/power/regulator/Makefile +++ b/drivers/power/regulator/Makefile @@ -16,7 +16,7 @@ obj-$(CONFIG_$(SPL_)DM_REGULATOR_FAN53555) += fan53555.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_COMMON) += regulator_common.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_FIXED) += fixed.o obj-$(CONFIG_$(SPL_)DM_REGULATOR_GPIO) += gpio-regulator.o -obj-$(CONFIG_REGULATOR_RK8XX) += rk8xx.o +obj-$(CONFIG_$(SPL_TPL_)REGULATOR_RK8XX) += rk8xx.o obj-$(CONFIG_DM_REGULATOR_S2MPS11) += s2mps11_regulator.o obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 83fc00de31f..ac735f87221 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -24,7 +24,7 @@ /* Power */ #if !CONFIG_IS_ENABLED(DM_I2C) -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #endif #define CONFIG_POWER_TPS65218 diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h index 7c7ddadbf5c..0692653a9ff 100644 --- a/include/configs/cl-som-imx7.h +++ b/include/configs/cl-som-imx7.h @@ -22,7 +22,7 @@ #define IMX_FEC_BASE ENET_IPS_BASE_ADDR /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index 80db84162ff..32d2581764f 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h @@ -50,7 +50,7 @@ #define CONFIG_AM437X_USB2PHY2_HOST /* Power */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_TPS65218 diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h index 3f71db3219a..f8af7c427bc 100644 --- a/include/configs/el6x_common.h +++ b/include/configs/el6x_common.h @@ -23,7 +23,7 @@ #define CONFIG_SYS_FSL_USDHC_NUM 2 /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index dbe36989aa9..615cc0b2e05 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -65,7 +65,7 @@ /* * PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/hikey.h b/include/configs/hikey.h index eee342e7748..f6685a928a6 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -13,7 +13,7 @@ #include -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_HI6553 #define CONFIG_REMAKE_ELF diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h index 9dd4bf7b241..16417926c94 100644 --- a/include/configs/imx8mp_evk.h +++ b/include/configs/imx8mp_evk.h @@ -31,7 +31,7 @@ #undef CONFIG_DM_MMC -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PCA9450 diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index e0666c9adda..d694379fddb 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -44,7 +44,7 @@ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h index 2fd1302bcfd..ff8a1682881 100644 --- a/include/configs/imx8mq_phanbell.h +++ b/include/configs/imx8mq_phanbell.h @@ -41,7 +41,7 @@ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #endif diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index 40c045a97f3..b40a6969164 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -124,8 +124,8 @@ #define I2C_RETIMER_ADDR 0x18 /* PMIC */ -#define CONFIG_POWER -#ifdef CONFIG_POWER +#define CONFIG_POWER_LEGACY +#ifdef CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #endif diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 0022c334839..bd2d0e5ee79 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -30,7 +30,7 @@ #define CONFIG_MXC_UART_BASE UART1_BASE /* PMIC Controller */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_SPI #define CONFIG_POWER_FSL #define CONFIG_FSL_PMIC_BUS 0 diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 479ffdf02fc..a546e9620c2 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -33,7 +33,7 @@ #define CONFIG_MXC_USB_FLAGS 0 /* PMIC Controller */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_DIALOG_POWER #define CONFIG_POWER_FSL diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h index f854ddd87b2..ccf631dedd4 100644 --- a/include/configs/mx6sabreauto.h +++ b/include/configs/mx6sabreauto.h @@ -59,7 +59,7 @@ /* DMA stuff, needed for GPMI/MXS NAND support */ /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 73f48c6dae5..ee75ada5a71 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -38,7 +38,7 @@ #endif /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/novena.h b/include/configs/novena.h index 1a175f13150..e39191fa1a9 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -68,7 +68,7 @@ #endif /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/phycore_imx8mp.h b/include/configs/phycore_imx8mp.h index 3f3b175df72..f9686e14a8f 100644 --- a/include/configs/phycore_imx8mp.h +++ b/include/configs/phycore_imx8mp.h @@ -29,7 +29,7 @@ #define CONFIG_SPL_ABORT_ON_RAW_IMAGE -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PCA9450 diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index a1cf8fc7d89..a0e782dbd34 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -122,7 +122,7 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h index 09e0f44872b..c67264da174 100644 --- a/include/configs/pico-imx8mq.h +++ b/include/configs/pico-imx8mq.h @@ -41,7 +41,7 @@ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #endif diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 97113b03432..11ad2f7cc2f 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -42,7 +42,7 @@ #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 #if !defined(CONFIG_DM_PMIC) -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h index cf47e3fbe94..d51a25dd2e4 100644 --- a/include/configs/udoo_neo.h +++ b/include/configs/udoo_neo.h @@ -68,7 +68,7 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h index ade0537f871..4c34bec2924 100644 --- a/include/configs/vining_2000.h +++ b/include/configs/vining_2000.h @@ -40,7 +40,7 @@ #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/warp.h b/include/configs/warp.h index d3921dabf6a..29f69bb7dcd 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -52,7 +52,7 @@ /* I2C Configs */ /* PMIC */ -#define CONFIG_POWER +#define CONFIG_POWER_LEGACY #define CONFIG_POWER_I2C #define CONFIG_EXTRA_ENV_SETTINGS \ diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h index 82fe3509a0b..95ba61d9530 100644 --- a/include/power/max77686_pmic.h +++ b/include/power/max77686_pmic.h @@ -154,7 +154,7 @@ enum { OPMODE_ON, }; -#ifdef CONFIG_POWER +#ifdef CONFIG_POWER_LEGACY int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV); int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode); int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV); diff --git a/include/power/pmic.h b/include/power/pmic.h index be9de6b4de7..a10e1735007 100644 --- a/include/power/pmic.h +++ b/include/power/pmic.h @@ -17,7 +17,8 @@ enum { PMIC_I2C, PMIC_SPI, PMIC_NONE}; -#ifdef CONFIG_POWER +/* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ +#ifdef CONFIG_POWER_LEGACY enum { I2C_PMIC, I2C_NUM, }; enum { PMIC_READ, PMIC_WRITE, }; enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, }; @@ -82,8 +83,9 @@ struct pmic { struct pmic *parent; struct list_head list; }; -#endif /* CONFIG_POWER */ +#endif /* CONFIG_POWER_LEGACY */ +/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ #ifdef CONFIG_DM_PMIC /** * U-Boot PMIC Framework @@ -306,9 +308,12 @@ struct uc_pmic_priv { uint trans_len; }; -#endif /* CONFIG_DM_PMIC */ +#endif /* DM_PMIC */ -#ifdef CONFIG_POWER +/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ +#ifdef CONFIG_POWER_LEGACY + +/* Legacy API, do not use */ int pmic_init(unsigned char bus); int power_init_board(void); int pmic_dialog_init(unsigned char bus); @@ -319,7 +324,7 @@ int pmic_probe(struct pmic *p); int pmic_reg_read(struct pmic *p, u32 reg, u32 *val); int pmic_reg_write(struct pmic *p, u32 reg, u32 val); int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on); -#endif +#endif /* CONFIG_POWER_LEGACY */ #define pmic_i2c_addr (p->hw.i2c.addr) #define pmic_i2c_tx_num (p->hw.i2c.tx_num) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 0dbcc165a6d..50e607f436f 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1032,11 +1032,11 @@ CONFIG_POST_EXTERNAL_WORD_FUNCS CONFIG_POST_SKIP_ENV_FLAGS CONFIG_POST_UART CONFIG_POST_WATCHDOG -CONFIG_POWER CONFIG_POWER_FSL CONFIG_POWER_FSL_MC13892 CONFIG_POWER_HI6553 CONFIG_POWER_I2C +CONFIG_POWER_LEGACY CONFIG_POWER_LTC3676 CONFIG_POWER_LTC3676_I2C_ADDR CONFIG_POWER_MAX77696_I2C_ADDR -- cgit v1.3.1 From 9d8665b7091d7d67df7dd31eafe1b54e25f6c3e4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Aug 2021 12:20:27 -0600 Subject: i2c: Convert CONFIG_POWER_I2C et al to Kconfig This converts the following to Kconfig: CONFIG_POWER_I2C CONFIG_POWER_LEGACY They are handled at the same time due to a dependency between them. Update the Makefile rule to use legacy power only in U-Boot proper. Unfortunately a separate rule is needed in SPL to be able to build legacy power. Add SPL related symbols for both, to allow for SPL-only usage. Signed-off-by: Simon Glass Reviewed-by: Jaehoon Chung [trini: More SPL related cleanups, reword commit message] Signed-off-by: Tom Rini --- board/compulab/cl-som-imx7/cl-som-imx7.c | 4 +- board/freescale/imx8mp_evk/spl.c | 2 +- board/freescale/imx8mq_evk/spl.c | 2 +- board/samsung/common/board.c | 2 +- board/technexion/pico-imx7d/pico-imx7d.c | 2 +- board/tqc/tqma6/tqma6.c | 2 +- board/udoo/neo/neo.c | 2 +- configs/am43xx_evm_qspiboot_defconfig | 2 + configs/cl-som-imx7_defconfig | 2 + configs/cm_t43_defconfig | 2 + configs/gwventana_emmc_defconfig | 2 + configs/gwventana_gw5904_defconfig | 2 + configs/gwventana_nand_defconfig | 2 + configs/hikey_defconfig | 1 + configs/imx8mp_evk_defconfig | 2 + configs/imx8mq_evk_defconfig | 2 + configs/imx8mq_phanbell_defconfig | 2 + configs/ls1046ardb_emmc_defconfig | 2 + configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 2 + configs/ls1046ardb_qspi_defconfig | 2 + configs/ls1046ardb_qspi_spl_defconfig | 2 + configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 2 + configs/ls1046ardb_sdcard_defconfig | 2 + configs/ls1046ardb_tfa_SECURE_BOOT_defconfig | 2 + configs/ls1046ardb_tfa_defconfig | 2 + configs/mx51evk_defconfig | 1 + configs/mx53loco_defconfig | 2 + configs/mx6sabreauto_defconfig | 2 + configs/mx6sabresd_defconfig | 2 + configs/novena_defconfig | 2 + configs/phycore-imx8mp_defconfig | 2 + configs/pico-dwarf-imx7d_defconfig | 2 + configs/pico-hobbit-imx7d_defconfig | 2 + configs/pico-imx7d_bl33_defconfig | 2 + configs/pico-imx7d_defconfig | 2 + configs/pico-imx8mq_defconfig | 2 + configs/pico-nymph-imx7d_defconfig | 2 + configs/pico-pi-imx7d_defconfig | 2 + configs/udoo_neo_defconfig | 2 + configs/vining_2000_defconfig | 2 + configs/warp_defconfig | 2 + drivers/power/Kconfig | 50 +++++++++++++++++++++++++ drivers/power/Makefile | 4 +- include/configs/am43xx_evm.h | 4 -- include/configs/cl-som-imx7.h | 2 - include/configs/cm_t43.h | 2 - include/configs/el6x_common.h | 2 - include/configs/gw_ventana.h | 2 - include/configs/hikey.h | 1 - include/configs/imx8mp_evk.h | 2 - include/configs/imx8mq_evk.h | 2 - include/configs/imx8mq_phanbell.h | 3 -- include/configs/ls1046ardb.h | 4 -- include/configs/mx51evk.h | 1 - include/configs/mx53loco.h | 2 - include/configs/mx6sabreauto.h | 2 - include/configs/mx6sabresd.h | 2 - include/configs/novena.h | 2 - include/configs/phycore_imx8mp.h | 2 - include/configs/pico-imx7d.h | 2 - include/configs/pico-imx8mq.h | 3 -- include/configs/tqma6.h | 2 - include/configs/udoo_neo.h | 2 - include/configs/vining_2000.h | 2 - include/configs/warp.h | 2 - include/power/max77686_pmic.h | 2 +- include/power/pmic.h | 8 ++-- scripts/config_whitelist.txt | 2 - 68 files changed, 131 insertions(+), 65 deletions(-) (limited to 'scripts') diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index c54e02fdb44..3ee13352186 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -267,7 +267,7 @@ int board_init(void) return 0; } -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { @@ -293,7 +293,7 @@ int power_init_board(void) return 0; } -#endif /* CONFIG_POWER_LEGACY */ +#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ /* * cl_som_imx7_setup_wdog() - watchdog configuration. diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index d317f212973..eca42c756e4 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -63,7 +63,7 @@ struct i2c_pads_info i2c_pad_info1 = { }, }; -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c index 6ee6230f748..67d069b2b05 100644 --- a/board/freescale/imx8mq_evk/spl.c +++ b/board/freescale/imx8mq_evk/spl.c @@ -156,7 +156,7 @@ int board_mmc_init(struct bd_info *bis) return 0; } -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 08f9202b711..97791aaeffe 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -185,7 +185,7 @@ int board_early_init_f(void) } #endif -#if defined(CONFIG_POWER_LEGACY) || defined(CONFIG_DM_PMIC) +#if CONFIG_IS_ENABLED(POWER_LEGACY) || CONFIG_IS_ENABLED(DM_PMIC) int power_init_board(void) { set_ps_hold_ctrl(); diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 81b1fb35122..d97e13b1cda 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -60,7 +60,7 @@ int dram_init(void) return 0; } -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) #define I2C_PMIC 3 int power_init_board(void) { diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index f851e1948cf..de9c00174ae 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -247,7 +247,7 @@ static const char *tqma6_get_boardname(void) }; } -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) /* setup board specific PMIC */ int power_init_board(void) { diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index 88889df2d2f..ce005d31cc6 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -96,7 +96,7 @@ static struct i2c_pads_info i2c_pad_info1 = { }; #endif -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) int power_init_board(void) { struct pmic *p; diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig index 6c42cbb1d5c..ebb46d412f2 100644 --- a/configs/am43xx_evm_qspiboot_defconfig +++ b/configs/am43xx_evm_qspiboot_defconfig @@ -49,6 +49,8 @@ CONFIG_SF_DEFAULT_SPEED=48000000 CONFIG_SPI_FLASH_MACRONIX=y CONFIG_MII=y CONFIG_DRIVER_TI_CPSW=y +CONFIG_SPL_POWER_LEGACY=y +CONFIG_SPL_POWER_I2C=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_TI_QSPI=y diff --git a/configs/cl-som-imx7_defconfig b/configs/cl-som-imx7_defconfig index 850bfcf70cf..99c46853a82 100644 --- a/configs/cl-som-imx7_defconfig +++ b/configs/cl-som-imx7_defconfig @@ -82,7 +82,9 @@ CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHYLIB=y CONFIG_PHY_ATHEROS=y CONFIG_MII=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig index 9faf1b863f3..18fbcf0e582 100644 --- a/configs/cm_t43_defconfig +++ b/configs/cm_t43_defconfig @@ -82,6 +82,8 @@ CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHY_ATHEROS=y CONFIG_MII=y CONFIG_DRIVER_TI_CPSW=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_DM_SERIAL=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig index 45ff04bec53..d1074323daf 100644 --- a/configs/gwventana_emmc_defconfig +++ b/configs/gwventana_emmc_defconfig @@ -102,8 +102,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig index 42a22f64976..f579d0fd8d1 100644 --- a/configs/gwventana_gw5904_defconfig +++ b/configs/gwventana_gw5904_defconfig @@ -106,8 +106,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig index 784274b27dc..b587adefb52 100644 --- a/configs/gwventana_nand_defconfig +++ b/configs/gwventana_nand_defconfig @@ -108,8 +108,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig index bf8ac071a51..5d3d28d9319 100644 --- a/configs/hikey_defconfig +++ b/configs/hikey_defconfig @@ -26,6 +26,7 @@ CONFIG_SYS_MMC_ENV_PART=2 CONFIG_MMC_DW=y CONFIG_MMC_DW_K3=y CONFIG_DM_ETH=y +CONFIG_POWER_LEGACY=y CONFIG_CONS_INDEX=4 CONFIG_USB=y CONFIG_USB_DWC2=y diff --git a/configs/imx8mp_evk_defconfig b/configs/imx8mp_evk_defconfig index 20a0a428dac..0abe1370273 100644 --- a/configs/imx8mp_evk_defconfig +++ b/configs/imx8mp_evk_defconfig @@ -81,9 +81,11 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_SPL_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_SPL_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig index 083eba6b0ec..62fe6f15236 100644 --- a/configs/imx8mq_evk_defconfig +++ b/configs/imx8mq_evk_defconfig @@ -52,11 +52,13 @@ CONFIG_PHY=y CONFIG_PHY_IMX8MQ_USB=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_SPL_POWER_LEGACY=y CONFIG_POWER_DOMAIN=y CONFIG_IMX8M_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_SPL_POWER_I2C=y CONFIG_DM_RESET=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig index e5d5d9ee706..911c3391db5 100644 --- a/configs/imx8mq_phanbell_defconfig +++ b/configs/imx8mq_phanbell_defconfig @@ -54,11 +54,13 @@ CONFIG_FSL_USDHC=y CONFIG_DM_ETH=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_SPL_POWER_LEGACY=y CONFIG_POWER_DOMAIN=y CONFIG_IMX8M_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_SPL_POWER_I2C=y CONFIG_DM_RESET=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig index e79da63c9e1..e5402a24a64 100644 --- a/configs/ls1046ardb_emmc_defconfig +++ b/configs/ls1046ardb_emmc_defconfig @@ -83,6 +83,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig index bfaf8c7525f..cd9e3a46416 100644 --- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig @@ -65,6 +65,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig index 36b812d22b8..93f0e88e3a1 100644 --- a/configs/ls1046ardb_qspi_defconfig +++ b/configs/ls1046ardb_qspi_defconfig @@ -69,6 +69,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_qspi_spl_defconfig b/configs/ls1046ardb_qspi_spl_defconfig index 1df12b24286..a88baafd1e3 100644 --- a/configs/ls1046ardb_qspi_spl_defconfig +++ b/configs/ls1046ardb_qspi_spl_defconfig @@ -87,6 +87,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig index dabd60994ea..36b91a05fb1 100644 --- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig @@ -81,6 +81,8 @@ CONFIG_FMAN_ENET=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y CONFIG_SYS_NS16550=y CONFIG_SPI=y diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig index 1e5ec897cd7..9ed24bb554c 100644 --- a/configs/ls1046ardb_sdcard_defconfig +++ b/configs/ls1046ardb_sdcard_defconfig @@ -81,6 +81,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig index 217dc7fe6ae..a14df4dc9f0 100644 --- a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig @@ -62,6 +62,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y CONFIG_SPI=y diff --git a/configs/ls1046ardb_tfa_defconfig b/configs/ls1046ardb_tfa_defconfig index 445fad34b21..85491a37e46 100644 --- a/configs/ls1046ardb_tfa_defconfig +++ b/configs/ls1046ardb_tfa_defconfig @@ -68,6 +68,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y CONFIG_SPI=y diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig index bc2dfde7ac3..f9ca4ee50af 100644 --- a/configs/mx51evk_defconfig +++ b/configs/mx51evk_defconfig @@ -42,6 +42,7 @@ CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig index 9bd0d77e8d5..04df33cdb2b 100644 --- a/configs/mx53loco_defconfig +++ b/configs/mx53loco_defconfig @@ -48,9 +48,11 @@ CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_USB=y CONFIG_USB_EHCI_MX5=y diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig index 3be9064021e..4427079422e 100644 --- a/configs/mx6sabreauto_defconfig +++ b/configs/mx6sabreauto_defconfig @@ -90,7 +90,9 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig index 9431bffdc4a..5216bcaddea 100644 --- a/configs/mx6sabresd_defconfig +++ b/configs/mx6sabresd_defconfig @@ -99,8 +99,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/novena_defconfig b/configs/novena_defconfig index 0770dd14000..81f1534926b 100644 --- a/configs/novena_defconfig +++ b/configs/novena_defconfig @@ -70,6 +70,8 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y diff --git a/configs/phycore-imx8mp_defconfig b/configs/phycore-imx8mp_defconfig index 7d2871351ac..f22798e2bb3 100644 --- a/configs/phycore-imx8mp_defconfig +++ b/configs/phycore-imx8mp_defconfig @@ -92,9 +92,11 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_SPL_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_SPL_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig index 7942d6f2a10..1be6605ae39 100644 --- a/configs/pico-dwarf-imx7d_defconfig +++ b/configs/pico-dwarf-imx7d_defconfig @@ -72,6 +72,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index a1851e1938c..a0c034c83b1 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -72,6 +72,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig index 096a04527cb..df81717a325 100644 --- a/configs/pico-imx7d_bl33_defconfig +++ b/configs/pico-imx7d_bl33_defconfig @@ -66,6 +66,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=4 CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index 4ba23a597cf..7d535625bf7 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -72,6 +72,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig index 5b1dc81feea..b90a4924247 100644 --- a/configs/pico-imx8mq_defconfig +++ b/configs/pico-imx8mq_defconfig @@ -52,11 +52,13 @@ CONFIG_FSL_USDHC=y CONFIG_DM_ETH=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_SPL_POWER_LEGACY=y CONFIG_POWER_DOMAIN=y CONFIG_IMX8M_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_SPL_POWER_I2C=y CONFIG_DM_RESET=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig index 7942d6f2a10..1be6605ae39 100644 --- a/configs/pico-nymph-imx7d_defconfig +++ b/configs/pico-nymph-imx7d_defconfig @@ -72,6 +72,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 3f751410a7e..e0be1b0abc9 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -72,6 +72,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig index 5c463ea771d..2f549b35759 100644 --- a/configs/udoo_neo_defconfig +++ b/configs/udoo_neo_defconfig @@ -50,5 +50,7 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig index 8c79ff3aa61..24989ff2aa9 100644 --- a/configs/vining_2000_defconfig +++ b/configs/vining_2000_defconfig @@ -78,6 +78,8 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_PWM_IMX=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/warp_defconfig b/configs/warp_defconfig index 015a15312fe..3d6c67240f8 100644 --- a/configs/warp_defconfig +++ b/configs/warp_defconfig @@ -38,6 +38,8 @@ CONFIG_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_MXC=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_USB=y CONFIG_WATCHDOG_TIMEOUT_MSECS=30000 diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 26257a72bc6..f5681c947e3 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -1,5 +1,34 @@ menu "Power" +config POWER_LEGACY + bool "Legacy power support" + help + Note: This is a legacy option. Use DM_PMIC instead. + + Enable support for power control in U-Boot. This includes support + for PMICs (Power-management Integrated Circuits) and some of the + features provided by PMICs. In particular, voltage regulators can + be used to enable/disable power and vary its voltage. That can be + useful in U-Boot to turn on boot peripherals and adjust CPU voltage + so that the clock speed can be increased. This enables the drivers + in drivers/power, drivers/power/pmic and drivers/power/regulator + as part of a build. + +config SPL_POWER_LEGACY + bool "Legacy power support in SPL" + default y if POWER_LEGACY + help + Note: This is a legacy option. Use SPL_DM_PMIC instead. + + Enable support for power control in SPL. This includes support + for PMICs (Power-management Integrated Circuits) and some of the + features provided by PMICs. In particular, voltage regulators can + be used to enable/disable power and vary its voltage. That can be + useful in SPL to turn on boot peripherals and adjust CPU voltage + so that the clock speed can be increased. This enables the drivers + in drivers/power, drivers/power/pmic and drivers/power/regulator + as part of a build. + source "drivers/power/acpi_pmc/Kconfig" source "drivers/power/domain/Kconfig" @@ -383,4 +412,25 @@ config POWER_MT6323 This adds poweroff driver for mt6323 this pmic is used on mt7623 / Bananapi R2 +config POWER_I2C + bool "I2C-based power control for legacy power" + depends on POWER_LEGACY + help + Enable this to use the I2C driver designed for the legacy PMIC + interface. + + Not to be used for new designs and existing ones should be moved to + the new PMIC interface based on driver model. + +config SPL_POWER_I2C + bool "I2C-based power control for legacy power" + depends on SPL_POWER_LEGACY + default y if POWER_I2C + help + Enable this to use the I2C driver designed for the legacy PMIC + interface. + + Not to be used for new designs and existing ones should be moved to + the new PMIC interface based on driver model. + endmenu diff --git a/drivers/power/Makefile b/drivers/power/Makefile index ab52bc1582c..801b727c90f 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -16,9 +16,9 @@ obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o obj-$(CONFIG_TWL4030_POWER) += twl4030.o obj-$(CONFIG_TWL6030_POWER) += twl6030.o obj-$(CONFIG_PALMAS_POWER) += palmas.o -obj-$(CONFIG_POWER_LEGACY) += power_core.o +obj-$(CONFIG_$(SPL_TPL_)POWER_LEGACY) += power_core.o obj-$(CONFIG_DIALOG_POWER) += power_dialog.o obj-$(CONFIG_POWER_FSL) += power_fsl.o -obj-$(CONFIG_POWER_I2C) += power_i2c.o +obj-$(CONFIG_$(SPL_TPL_)POWER_I2C) += power_i2c.o obj-$(CONFIG_POWER_SPI) += power_spi.o obj-$(CONFIG_POWER_MT6323) += mt6323.o diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index ac735f87221..d4d463d24e1 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -23,10 +23,6 @@ /* I2C Configuration */ /* Power */ -#if !CONFIG_IS_ENABLED(DM_I2C) -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C -#endif #define CONFIG_POWER_TPS65218 #define CONFIG_POWER_TPS62362 diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h index 0692653a9ff..ebfe356eee0 100644 --- a/include/configs/cl-som-imx7.h +++ b/include/configs/cl-som-imx7.h @@ -22,8 +22,6 @@ #define IMX_FEC_BASE ENET_IPS_BASE_ADDR /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index 32d2581764f..a290cf0cbcc 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h @@ -50,8 +50,6 @@ #define CONFIG_AM437X_USB2PHY2_HOST /* Power */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_TPS65218 /* Enabling L2 Cache */ diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h index f8af7c427bc..279d7122188 100644 --- a/include/configs/el6x_common.h +++ b/include/configs/el6x_common.h @@ -23,8 +23,6 @@ #define CONFIG_SYS_FSL_USDHC_NUM 2 /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 615cc0b2e05..012c9b6ffef 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -65,8 +65,6 @@ /* * PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 #define CONFIG_POWER_LTC3676 diff --git a/include/configs/hikey.h b/include/configs/hikey.h index f6685a928a6..387971c687b 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -13,7 +13,6 @@ #include -#define CONFIG_POWER_LEGACY #define CONFIG_POWER_HI6553 #define CONFIG_REMAKE_ELF diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h index 16417926c94..bec6c1d8e9c 100644 --- a/include/configs/imx8mp_evk.h +++ b/include/configs/imx8mp_evk.h @@ -31,8 +31,6 @@ #undef CONFIG_DM_MMC -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PCA9450 #endif diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index d694379fddb..ff4f7898431 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -44,8 +44,6 @@ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 #endif diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h index ff8a1682881..c04c0191f98 100644 --- a/include/configs/imx8mq_phanbell.h +++ b/include/configs/imx8mq_phanbell.h @@ -40,9 +40,6 @@ #undef CONFIG_DM_MMC #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #endif #define CONFIG_REMAKE_ELF diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index b40a6969164..d3f5d8ce95e 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -124,10 +124,6 @@ #define I2C_RETIMER_ADDR 0x18 /* PMIC */ -#define CONFIG_POWER_LEGACY -#ifdef CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C -#endif /* * Environment diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index bd2d0e5ee79..065e8c7f3b1 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -30,7 +30,6 @@ #define CONFIG_MXC_UART_BASE UART1_BASE /* PMIC Controller */ -#define CONFIG_POWER_LEGACY #define CONFIG_POWER_SPI #define CONFIG_POWER_FSL #define CONFIG_FSL_PMIC_BUS 0 diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index a546e9620c2..50fc9625d02 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -33,8 +33,6 @@ #define CONFIG_MXC_USB_FLAGS 0 /* PMIC Controller */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_DIALOG_POWER #define CONFIG_POWER_FSL #define CONFIG_POWER_FSL_MC13892 diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h index ccf631dedd4..1bfc0354271 100644 --- a/include/configs/mx6sabreauto.h +++ b/include/configs/mx6sabreauto.h @@ -59,8 +59,6 @@ /* DMA stuff, needed for GPMI/MXS NAND support */ /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index ee75ada5a71..a9f353d9b13 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -38,8 +38,6 @@ #endif /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/novena.h b/include/configs/novena.h index e39191fa1a9..46c530161ac 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -68,8 +68,6 @@ #endif /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/phycore_imx8mp.h b/include/configs/phycore_imx8mp.h index f9686e14a8f..874c94e01f9 100644 --- a/include/configs/phycore_imx8mp.h +++ b/include/configs/phycore_imx8mp.h @@ -29,8 +29,6 @@ #define CONFIG_SPL_ABORT_ON_RAW_IMAGE -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PCA9450 #endif diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index a0e782dbd34..36c57923dec 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -122,8 +122,6 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h index c67264da174..6c642391509 100644 --- a/include/configs/pico-imx8mq.h +++ b/include/configs/pico-imx8mq.h @@ -40,9 +40,6 @@ #undef CONFIG_DM_MMC #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #endif #define CONFIG_REMAKE_ELF diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 11ad2f7cc2f..1efe9d57a84 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -42,8 +42,6 @@ #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 #if !defined(CONFIG_DM_PMIC) -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 #define TQMA6_PFUZE100_I2C_BUS 2 diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h index d51a25dd2e4..b06abc9286b 100644 --- a/include/configs/udoo_neo.h +++ b/include/configs/udoo_neo.h @@ -68,8 +68,6 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 #define PFUZE3000_I2C_BUS 0 diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h index 4c34bec2924..dcdaffc09b6 100644 --- a/include/configs/vining_2000.h +++ b/include/configs/vining_2000.h @@ -40,8 +40,6 @@ #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/warp.h b/include/configs/warp.h index 29f69bb7dcd..11a9b31671b 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -52,8 +52,6 @@ /* I2C Configs */ /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h index 95ba61d9530..cf476c85ab3 100644 --- a/include/power/max77686_pmic.h +++ b/include/power/max77686_pmic.h @@ -154,7 +154,7 @@ enum { OPMODE_ON, }; -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV); int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode); int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV); diff --git a/include/power/pmic.h b/include/power/pmic.h index a10e1735007..97f855ce398 100644 --- a/include/power/pmic.h +++ b/include/power/pmic.h @@ -18,7 +18,7 @@ enum { PMIC_I2C, PMIC_SPI, PMIC_NONE}; /* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) enum { I2C_PMIC, I2C_NUM, }; enum { PMIC_READ, PMIC_WRITE, }; enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, }; @@ -83,7 +83,7 @@ struct pmic { struct pmic *parent; struct list_head list; }; -#endif /* CONFIG_POWER_LEGACY */ +#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ /* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ #ifdef CONFIG_DM_PMIC @@ -311,7 +311,7 @@ struct uc_pmic_priv { #endif /* DM_PMIC */ /* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ -#ifdef CONFIG_POWER_LEGACY +#if CONFIG_IS_ENABLED(POWER_LEGACY) /* Legacy API, do not use */ int pmic_init(unsigned char bus); @@ -324,7 +324,7 @@ int pmic_probe(struct pmic *p); int pmic_reg_read(struct pmic *p, u32 reg, u32 *val); int pmic_reg_write(struct pmic *p, u32 reg, u32 val); int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on); -#endif /* CONFIG_POWER_LEGACY */ +#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ #define pmic_i2c_addr (p->hw.i2c.addr) #define pmic_i2c_tx_num (p->hw.i2c.tx_num) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 50e607f436f..6abb18b7aef 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1035,8 +1035,6 @@ CONFIG_POST_WATCHDOG CONFIG_POWER_FSL CONFIG_POWER_FSL_MC13892 CONFIG_POWER_HI6553 -CONFIG_POWER_I2C -CONFIG_POWER_LEGACY CONFIG_POWER_LTC3676 CONFIG_POWER_LTC3676_I2C_ADDR CONFIG_POWER_MAX77696_I2C_ADDR -- cgit v1.3.1 From 5ed16a9511d735feea74d6b4ea940f5e6b5dd8fc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Aug 2021 12:20:30 -0600 Subject: net: Rename SPL_NET_SUPPORT to SPL_NET Rename this option so that CONFIG_IS_ENABLED can be used with it. Signed-off-by: Simon Glass --- common/Makefile | 2 +- common/spl/Kconfig | 10 +++++----- common/spl/Makefile | 2 +- configs/am335x_boneblack_vboot_defconfig | 2 +- configs/am335x_evm_defconfig | 2 +- configs/am335x_guardian_defconfig | 2 +- configs/am335x_sl50_defconfig | 2 +- configs/am43xx_evm_defconfig | 2 +- configs/am43xx_hs_evm_defconfig | 2 +- configs/chromebook_link64_defconfig | 2 +- configs/chromebook_samus_tpl_defconfig | 2 +- configs/qemu-x86_64_defconfig | 2 +- doc/SPL/README.am335x-network | 2 +- lib/tiny-printf.c | 6 +++--- scripts/Makefile.spl | 2 +- tools/buildman/README | 8 ++++---- 16 files changed, 25 insertions(+), 25 deletions(-) (limited to 'scripts') diff --git a/common/Makefile b/common/Makefile index fb0256b57b9..f7852607a55 100644 --- a/common/Makefile +++ b/common/Makefile @@ -69,7 +69,7 @@ endif obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_TPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o -obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o +obj-$(CONFIG_SPL_NET) += miiphyutil.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o ifdef CONFIG_SPL_USB_HOST diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 690926df096..c43df88e4ae 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -590,7 +590,7 @@ config SPL_ETH drivers in SPL. This permits SPL to load U-Boot over an Ethernet link rather than from an on-board peripheral. Environment support is required since the network stack uses a number of environment - variables. See also SPL_NET_SUPPORT. + variables. See also SPL_NET. config SPL_FS_EXT4 bool "Support EXT filesystems" @@ -910,7 +910,7 @@ config UBI_SPL_SILENCE_MSG endif # if SPL_UBI -config SPL_NET_SUPPORT +config SPL_NET bool "Support networking" help Enable support for network devices (such as Ethernet) in SPL. @@ -919,7 +919,7 @@ config SPL_NET_SUPPORT the network stack uses a number of environment variables. See also SPL_ETH. -if SPL_NET_SUPPORT +if SPL_NET config SPL_NET_VCI_STRING string "BOOTP Vendor Class Identifier string sent by SPL" help @@ -928,7 +928,7 @@ config SPL_NET_VCI_STRING of a client. This is often used in practice to allow for the DHCP server to specify different files to load depending on if the ROM, SPL or U-Boot itself makes the request -endif # if SPL_NET_SUPPORT +endif # if SPL_NET config SPL_NO_CPU_SUPPORT bool "Drop CPU code in SPL" @@ -1222,7 +1222,7 @@ config SPL_USB_ETHER USB-connected Ethernet link (such as a USB Ethernet dongle) rather than from an onboard peripheral. Environment support is required since the network stack uses a number of environment variables. - See also SPL_NET_SUPPORT and SPL_ETH. + See also SPL_NET and SPL_ETH. config SPL_DFU bool "Support DFU (Device Firmware Upgrade)" diff --git a/common/spl/Makefile b/common/spl/Makefile index 40107e39bde..cb15c8e827c 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -19,7 +19,7 @@ obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += spl_nand.o obj-$(CONFIG_$(SPL_TPL_)ONENAND_SUPPORT) += spl_onenand.o endif obj-$(CONFIG_$(SPL_TPL_)UBI) += spl_ubi.o -obj-$(CONFIG_$(SPL_TPL_)NET_SUPPORT) += spl_net.o +obj-$(CONFIG_$(SPL_TPL_)NET) += spl_net.o obj-$(CONFIG_$(SPL_TPL_)MMC) += spl_mmc.o obj-$(CONFIG_$(SPL_TPL_)ATF) += spl_atf.o obj-$(CONFIG_$(SPL_TPL_)OPTEE) += spl_optee.o diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig index f411d58b29c..368d013d45f 100644 --- a/configs/am335x_boneblack_vboot_defconfig +++ b/configs/am335x_boneblack_vboot_defconfig @@ -21,7 +21,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_ARCH_MISC_INIT=y CONFIG_SPL_MUSB_NEW=y # CONFIG_SPL_NAND_SUPPORT is not set -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_NET_VCI_STRING="AM33xx U-Boot SPL" CONFIG_SPL_OS_BOOT=y CONFIG_SPL_USB_GADGET=y diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index 4577ee3a604..7fd90ce9fe5 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -21,7 +21,7 @@ CONFIG_SPL_MUSB_NEW=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL" CONFIG_SPL_OS_BOOT=y CONFIG_SPL_USB_GADGET=y diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig index 09cf3d09a3d..658155f0a63 100644 --- a/configs/am335x_guardian_defconfig +++ b/configs/am335x_guardian_defconfig @@ -35,7 +35,7 @@ CONFIG_SPL_MUSB_NEW=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_NET_VCI_STRING="Guardian U-Boot SPL" CONFIG_SPL_POWER=y CONFIG_SPL_USB_GADGET=y diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig index 2a70ffc6188..aa1e196d408 100644 --- a/configs/am335x_sl50_defconfig +++ b/configs/am335x_sl50_defconfig @@ -29,7 +29,7 @@ CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL" CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER=y diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig index f5f2e19fa8b..4960ec2168f 100644 --- a/configs/am43xx_evm_defconfig +++ b/configs/am43xx_evm_defconfig @@ -21,7 +21,7 @@ CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" CONFIG_SPL_OS_BOOT=y CONFIG_SPL_USB_HOST=y diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig index e98fac5027e..820fc075470 100644 --- a/configs/am43xx_hs_evm_defconfig +++ b/configs/am43xx_hs_evm_defconfig @@ -30,7 +30,7 @@ CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" CONFIG_SPL_USB_HOST=y CONFIG_SPL_USB_GADGET=y diff --git a/configs/chromebook_link64_defconfig b/configs/chromebook_link64_defconfig index 147cf687c72..c43d9dcb927 100644 --- a/configs/chromebook_link64_defconfig +++ b/configs/chromebook_link64_defconfig @@ -35,7 +35,7 @@ CONFIG_SPL_CPU=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_I2C=y CONFIG_SPL_DM_SPI_FLASH=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_PCI=y CONFIG_SPL_PCH=y CONFIG_SPL_RTC=y diff --git a/configs/chromebook_samus_tpl_defconfig b/configs/chromebook_samus_tpl_defconfig index d97c305110c..b231b3b0dbd 100644 --- a/configs/chromebook_samus_tpl_defconfig +++ b/configs/chromebook_samus_tpl_defconfig @@ -34,7 +34,7 @@ CONFIG_BLOBLIST_ADDR=0xff7c0000 CONFIG_HANDOFF=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_DM_SPI_FLASH=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_PCI=y CONFIG_SPL_PCH=y CONFIG_TPL_PCI=y diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index ae94e1926d6..2dfb48b3831 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -34,7 +34,7 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_CPU=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_DM_SPI_FLASH=y -CONFIG_SPL_NET_SUPPORT=y +CONFIG_SPL_NET=y CONFIG_SPL_PCI=y CONFIG_SPL_PCH=y CONFIG_SPL_RTC=y diff --git a/doc/SPL/README.am335x-network b/doc/SPL/README.am335x-network index e05270673db..9599729d8f9 100644 --- a/doc/SPL/README.am335x-network +++ b/doc/SPL/README.am335x-network @@ -7,7 +7,7 @@ NAND and bricked (empty) board with only a network cable. I. Building the required images 1. You have to enable generic SPL configuration options (see -doc/README.SPL) as well as CONFIG_SPL_NET_SUPPORT, +doc/README.SPL) as well as CONFIG_SPL_NET, CONFIG_SPL_ETH, CONFIG_SPL_LIBGENERIC_SUPPORT and CONFIG_SPL_LIBCOMMON_SUPPORT in your board configuration file to build SPL with support for booting over the network. Also you have to enable diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 89aaa854771..f661fc65054 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -48,7 +48,7 @@ static void div_out(struct printf_info *info, unsigned long *num, out_dgt(info, dgt); } -#ifdef CONFIG_SPL_NET_SUPPORT +#ifdef CONFIG_SPL_NET static void string(struct printf_info *info, char *s) { char ch; @@ -178,7 +178,7 @@ static void __maybe_unused pointer(struct printf_info *info, const char *fmt, } break; #endif -#ifdef CONFIG_SPL_NET_SUPPORT +#ifdef CONFIG_SPL_NET case 'm': return mac_address_string(info, ptr, false); case 'M': @@ -270,7 +270,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) } break; case 'p': - if (CONFIG_IS_ENABLED(NET_SUPPORT) || _DEBUG) { + if (CONFIG_IS_ENABLED(NET) || _DEBUG) { pointer(info, fmt, va_arg(va, void *)); /* * Skip this because it pulls in _ctype which is diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 25a3e7fa52e..7f8c5f0293d 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -108,7 +108,7 @@ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/cdns3/ libs-y += dts/ libs-y += fs/ libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ -libs-$(CONFIG_SPL_NET_SUPPORT) += net/ +libs-$(CONFIG_SPL_NET) += net/ libs-$(CONFIG_SPL_UNIT_TEST) += test/ head-y := $(addprefix $(obj)/,$(head-y)) diff --git a/tools/buildman/README b/tools/buildman/README index 5f99a50205b..ce277884326 100644 --- a/tools/buildman/README +++ b/tools/buildman/README @@ -1010,13 +1010,13 @@ For example: ... 43: Convert CONFIG_SPL_USBETH_SUPPORT to Kconfig arm: - + u-boot.cfg: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET_SUPPORT=1 + + u-boot.cfg: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET=1 + u-boot-spl.cfg: CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 - + all: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_NET_SUPPORT=1 + + all: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_NET=1 am335x_evm_usbspl : - + u-boot.cfg: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET_SUPPORT=1 + + u-boot.cfg: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET=1 + u-boot-spl.cfg: CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 - + all: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_NET_SUPPORT=1 + + all: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_NET=1 44: Convert CONFIG_SPL_USB_HOST to Kconfig ... -- cgit v1.3.1