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 <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
[trini: More SPL related cleanups, reword commit message]
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass
2021-08-08 12:20:27 -06:00
committed by Tom Rini
parent 29d7153ec3
commit 9d8665b709
68 changed files with 131 additions and 65 deletions

View File

@@ -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.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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