global: Move remaining CONFIG_SYS_* to CFG_SYS_*
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do
not easily transition to Kconfig. In many cases they likely should come
from the device tree instead. Move these out of CONFIG namespace and in
to CFG namespace.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index ae17722..25ef937 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -91,7 +91,7 @@
psc = 2;
/* SCLL + SCLH */
- div = (CONFIG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10;
+ div = (CFG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10;
REG(&(i2c_base->i2c_psc)) = psc; /* 27MHz / (2 + 1) = 9MHz */
REG(&(i2c_base->i2c_scll)) = (div * 50) / 100; /* 50% Duty */
REG(&(i2c_base->i2c_sclh)) = div - REG(&(i2c_base->i2c_scll));
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index edbcd83..187db92 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -41,7 +41,7 @@
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_M68K
-#define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
+#define CONFIG_SYS_IMMR CFG_SYS_MBAR
#endif
#if !CONFIG_IS_ENABLED(DM_I2C)
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index c3f6a12..7f65db2 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -35,7 +35,7 @@
#if !defined(CONFIG_SYS_I2C_DIRECT_BUS)
struct i2c_bus_hose i2c_bus[CFG_SYS_NUM_I2C_BUSES] =
- CONFIG_SYS_I2C_BUSES;
+ CFG_SYS_I2C_BUSES;
#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -114,7 +114,7 @@
/* Connect requested bus if behind muxes */
if (i2c_bus_tmp->next_hop[0].chip != 0) {
/* Set all muxes along the path to that bus */
- for (i = 0; i < CONFIG_SYS_I2C_MAX_HOPS; i++) {
+ for (i = 0; i < CFG_SYS_I2C_MAX_HOPS; i++) {
int ret;
if (i2c_bus_tmp->next_hop[i].chip == 0)
@@ -143,7 +143,7 @@
/* Disconnect current bus (turn off muxes if any) */
if ((i2c_bus_tmp->next_hop[0].chip != 0) &&
(I2C_ADAP->init_done != 0)) {
- i = CONFIG_SYS_I2C_MAX_HOPS;
+ i = CFG_SYS_I2C_MAX_HOPS;
do {
uint8_t chip;
int ret;
diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index 4edcba2..b9b0ff1 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -129,7 +129,7 @@
#define DEF_DEVICE(num) \
{(void *)CONFIG_SYS_I2C_BASE##num, DEF_SPD, &std_cfg_table[DEF_SPD_ENUM]}
-static struct bcm_kona_i2c_dev g_i2c_devs[CONFIG_SYS_MAX_I2C_BUS] = {
+static struct bcm_kona_i2c_dev g_i2c_devs[CFG_SYS_MAX_I2C_BUS] = {
#ifdef CONFIG_SYS_I2C_BASE0
DEF_DEVICE(0),
#endif
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index f48a4f2..a9c7d6e 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -42,7 +42,7 @@
#endif /* CONFIG_DM_I2C */
/*
- * On SUNXI, we get CONFIG_SYS_TCLK from this include, so we want to
+ * On SUNXI, we get CFG_SYS_TCLK from this include, so we want to
* always have it.
*/
#if CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_ARCH_SUNXI)
@@ -427,9 +427,9 @@
static uint twsi_calc_freq(const int n, const int m)
{
#ifdef CONFIG_ARCH_SUNXI
- return CONFIG_SYS_TCLK / (10 * (m + 1) * (1 << n));
+ return CFG_SYS_TCLK / (10 * (m + 1) * (1 << n));
#else
- return CONFIG_SYS_TCLK / (10 * (m + 1) * (2 << n));
+ return CFG_SYS_TCLK / (10 * (m + 1) * (2 << n));
#endif
}
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index f80ff53..9a1599d 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -39,8 +39,8 @@
#define VF610_I2C_REGSHIFT 0
#define I2C_EARLY_INIT_INDEX 0
-#ifdef CONFIG_SYS_I2C_IFDR_DIV
-#define I2C_IFDR_DIV_CONSERVATIVE CONFIG_SYS_I2C_IFDR_DIV
+#ifdef CFG_SYS_I2C_IFDR_DIV
+#define I2C_IFDR_DIV_CONSERVATIVE CFG_SYS_I2C_IFDR_DIV
#else
#define I2C_IFDR_DIV_CONSERVATIVE 0x7e
#endif