diff options
author | Tom Rini <trini@konsulko.com> | 2023-01-10 11:19:45 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-20 12:27:24 -0500 |
commit | 6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd (patch) | |
tree | ae38e9dcf468b2e4e58293561fae87895d9b549f /drivers/i2c | |
parent | ad242344681f6a0076a6bf100aa83ac9ecbea355 (diff) | |
download | u-boot-6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd.zip u-boot-6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd.tar.gz u-boot-6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd.tar.bz2 |
global: Finish CONFIG -> CFG migration
At this point, the remaining places where we have a symbol that is
defined as CONFIG_... are in fairly odd locations. While as much dead
code has been removed as possible, some of these locations are simply
less obvious at first. In other cases, this code is used, but was
defined in such a way as to have been missed by earlier checks. Perform
a rename of all such remaining symbols to be CFG_... rather than
CONFIG_...
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/fsl_i2c.c | 16 | ||||
-rw-r--r-- | drivers/i2c/lpc32xx_i2c.c | 16 | ||||
-rw-r--r-- | drivers/i2c/mvtwsi.c | 6 | ||||
-rw-r--r-- | drivers/i2c/octeon_i2c.c | 4 |
4 files changed, 21 insertions, 21 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 147a4b9..d312f35 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -23,16 +23,16 @@ * released the bus. If not defined in the board header file, then use a * generic value. */ -#ifndef CONFIG_I2C_MBB_TIMEOUT -#define CONFIG_I2C_MBB_TIMEOUT 100000 +#ifndef CFG_I2C_MBB_TIMEOUT +#define CFG_I2C_MBB_TIMEOUT 100000 #endif /* The maximum number of microseconds we will wait for a read or write * operation to complete. If not defined in the board header file, then use a * generic value. */ -#ifndef CONFIG_I2C_TIMEOUT -#define CONFIG_I2C_TIMEOUT 100000 +#ifndef CFG_I2C_TIMEOUT +#define CFG_I2C_TIMEOUT 100000 #endif #define I2C_READ_BIT 1 @@ -221,7 +221,7 @@ static uint get_i2c_clock(int bus) static int fsl_i2c_fixup(const struct fsl_i2c_base *base) { - const unsigned long long timeout = usec2ticks(CONFIG_I2C_MBB_TIMEOUT); + const unsigned long long timeout = usec2ticks(CFG_I2C_MBB_TIMEOUT); unsigned long long timeval = 0; int ret = -1; uint flags = 0; @@ -270,7 +270,7 @@ err: static void __i2c_init(const struct fsl_i2c_base *base, int speed, int slaveadd, int i2c_clk, int busnum) { - const unsigned long long timeout = usec2ticks(CONFIG_I2C_MBB_TIMEOUT); + const unsigned long long timeout = usec2ticks(CFG_I2C_MBB_TIMEOUT); unsigned long long timeval; writeb(0, &base->cr); /* stop I2C controller */ @@ -296,7 +296,7 @@ static void __i2c_init(const struct fsl_i2c_base *base, int speed, int static int i2c_wait4bus(const struct fsl_i2c_base *base) { unsigned long long timeval = get_ticks(); - const unsigned long long timeout = usec2ticks(CONFIG_I2C_MBB_TIMEOUT); + const unsigned long long timeout = usec2ticks(CFG_I2C_MBB_TIMEOUT); while (readb(&base->sr) & I2C_SR_MBB) { if ((get_ticks() - timeval) > timeout) @@ -310,7 +310,7 @@ static int i2c_wait(const struct fsl_i2c_base *base, int write) { u32 csr; unsigned long long timeval = get_ticks(); - const unsigned long long timeout = usec2ticks(CONFIG_I2C_TIMEOUT); + const unsigned long long timeout = usec2ticks(CFG_I2C_TIMEOUT); do { csr = readb(&base->sr); diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c index 774129a..496f4fe 100644 --- a/drivers/i2c/lpc32xx_i2c.c +++ b/drivers/i2c/lpc32xx_i2c.c @@ -20,12 +20,12 @@ * Provide default speed and slave if target did not */ -#if !defined(CONFIG_SYS_I2C_LPC32XX_SPEED) -#define CONFIG_SYS_I2C_LPC32XX_SPEED 350000 +#if !defined(CFG_SYS_I2C_LPC32XX_SPEED) +#define CFG_SYS_I2C_LPC32XX_SPEED 350000 #endif -#if !defined(CONFIG_SYS_I2C_LPC32XX_SLAVE) -#define CONFIG_SYS_I2C_LPC32XX_SLAVE 0 +#if !defined(CFG_SYS_I2C_LPC32XX_SLAVE) +#define CFG_SYS_I2C_LPC32XX_SLAVE 0 #endif /* TX register fields */ @@ -260,15 +260,15 @@ static unsigned int lpc32xx_i2c_set_bus_speed(struct i2c_adapter *adap, U_BOOT_I2C_ADAP_COMPLETE(lpc32xx_0, lpc32xx_i2c_init, lpc32xx_i2c_probe_chip, lpc32xx_i2c_read, lpc32xx_i2c_write, lpc32xx_i2c_set_bus_speed, - CONFIG_SYS_I2C_LPC32XX_SPEED, - CONFIG_SYS_I2C_LPC32XX_SLAVE, + CFG_SYS_I2C_LPC32XX_SPEED, + CFG_SYS_I2C_LPC32XX_SLAVE, 0) U_BOOT_I2C_ADAP_COMPLETE(lpc32xx_1, lpc32xx_i2c_init, lpc32xx_i2c_probe_chip, lpc32xx_i2c_read, lpc32xx_i2c_write, lpc32xx_i2c_set_bus_speed, - CONFIG_SYS_I2C_LPC32XX_SPEED, - CONFIG_SYS_I2C_LPC32XX_SLAVE, + CFG_SYS_I2C_LPC32XX_SPEED, + CFG_SYS_I2C_LPC32XX_SLAVE, 1) U_BOOT_I2C_ADAP_COMPLETE(lpc32xx_2, lpc32xx_i2c_init, NULL, diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 2822749..93bbc69 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -205,9 +205,9 @@ static struct mvtwsi_registers *twsi_get_base(struct i2c_adapter *adap) case 1: return (struct mvtwsi_registers *)CFG_I2C_MVTWSI_BASE1; #endif -#ifdef CONFIG_I2C_MVTWSI_BASE2 +#ifdef CFG_I2C_MVTWSI_BASE2 case 2: - return (struct mvtwsi_registers *)CONFIG_I2C_MVTWSI_BASE2; + return (struct mvtwsi_registers *)CFG_I2C_MVTWSI_BASE2; #endif #ifdef CONFIG_I2C_MVTWSI_BASE3 case 3: @@ -750,7 +750,7 @@ U_BOOT_I2C_ADAP_COMPLETE(twsi1, twsi_i2c_init, twsi_i2c_probe, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE, 1) #endif -#ifdef CONFIG_I2C_MVTWSI_BASE2 +#ifdef CFG_I2C_MVTWSI_BASE2 U_BOOT_I2C_ADAP_COMPLETE(twsi2, twsi_i2c_init, twsi_i2c_probe, twsi_i2c_read, twsi_i2c_write, twsi_i2c_set_bus_speed, diff --git a/drivers/i2c/octeon_i2c.c b/drivers/i2c/octeon_i2c.c index e54ef18..f2dea56 100644 --- a/drivers/i2c/octeon_i2c.c +++ b/drivers/i2c/octeon_i2c.c @@ -146,7 +146,7 @@ enum { TWSI_STAT_IDLE = 0xf8 }; -#define CONFIG_SYS_I2C_OCTEON_SLAVE_ADDR 0x77 +#define CFG_SYS_I2C_OCTEON_SLAVE_ADDR 0x77 enum { PROBE_PCI = 0, /* PCI based probing */ @@ -800,7 +800,7 @@ static int octeon_i2c_probe(struct udevice *dev) twsi->base += twsi->data->reg_offs; i2c_slave_addr = dev_read_u32_default(dev, "i2c-sda-hold-time-ns", - CONFIG_SYS_I2C_OCTEON_SLAVE_ADDR); + CFG_SYS_I2C_OCTEON_SLAVE_ADDR); ret = clk_get_by_index(dev, 0, &twsi->clk); if (ret < 0) |