Convert CONFIG_SYS_I2C_SPEED et al to Kconfig
This converts the following to Kconfig: CONFIG_SYS_I2C_SPEED CONFIG_SYS_I2C_SLAVE Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -423,20 +423,6 @@ config SYS_I2C_OMAP24XX
|
||||
help
|
||||
Add support for the OMAP2+ I2C driver.
|
||||
|
||||
if SYS_I2C_OMAP24XX
|
||||
config SYS_I2C_SLAVE
|
||||
int "I2C Slave addr channel 0"
|
||||
default 1
|
||||
help
|
||||
OMAP24xx I2C Slave address channel 0
|
||||
|
||||
config SYS_I2C_SPEED
|
||||
int "I2C Slave channel 0 speed"
|
||||
default 100000
|
||||
help
|
||||
OMAP24xx Slave speed channel 0
|
||||
endif
|
||||
|
||||
config SYS_I2C_RCAR_I2C
|
||||
bool "Renesas RCar I2C driver"
|
||||
depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C
|
||||
@@ -573,6 +559,25 @@ config TEGRA186_BPMP_I2C
|
||||
by the BPMP, and can only be accessed by the main CPU via IPC
|
||||
requests to the BPMP. This driver covers the latter case.
|
||||
|
||||
config SYS_I2C_SLAVE
|
||||
hex "I2C Slave address channel (all buses)"
|
||||
depends on SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY || TPL_SYS_I2C_LEGACY
|
||||
default 0xfe
|
||||
help
|
||||
I2C Slave address channel 0 for all buses in the legacy drivers.
|
||||
Many boards/controllers/drivers don't support an I2C slave
|
||||
interface so provide a default slave address for them for use in
|
||||
common code. A real value for CONFIG_SYS_I2C_SLAVE should be
|
||||
defined for any board which does support a slave interface and
|
||||
this default used otherwise.
|
||||
|
||||
config SYS_I2C_SPEED
|
||||
int "I2C Slave channel 0 speed (all buses)"
|
||||
depends on SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY || TPL_SYS_I2C_LEGACY
|
||||
default 100000
|
||||
help
|
||||
I2C Slave speed channel 0 for all buses in the legacy drivers.
|
||||
|
||||
config SYS_I2C_BUS_MAX
|
||||
int "Max I2C busses"
|
||||
depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA
|
||||
|
||||
@@ -80,7 +80,7 @@ static void i2c_reset(struct mv_i2c *base)
|
||||
|
||||
i2c_clk_enable();
|
||||
|
||||
writel(CONFIG_SYS_I2C_SLAVE, &base->isar); /* set our slave address */
|
||||
writel(0x0, &base->isar); /* set our slave address */
|
||||
/* set control reg values */
|
||||
writel(I2C_ICR_INIT | icr_mode, &base->icr);
|
||||
writel(I2C_ISR_INIT, &base->isr); /* set clear interrupt bits */
|
||||
|
||||
Reference in New Issue
Block a user