]> git.sur5r.net Git - u-boot/commitdiff
Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig
authorAdam Ford <aford173@gmail.com>
Fri, 11 Aug 2017 11:39:34 +0000 (06:39 -0500)
committerTom Rini <trini@konsulko.com>
Sat, 2 Sep 2017 00:44:30 +0000 (20:44 -0400)
This converts the following to Kconfig:
   CONFIG_SYS_I2C_BUS_MAX

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Fix AM43XX drop AM44XX]
Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arm/include/asm/arch-am33xx/i2c.h
arch/arm/include/asm/arch-omap3/i2c.h
arch/arm/include/asm/arch-omap4/i2c.h
arch/arm/include/asm/arch-omap5/i2c.h
drivers/i2c/Kconfig
include/configs/socfpga_common.h
include/configs/ti_armv7_keystone2.h

index a34282adc8c6461fa3d95b36d160892b64248aaa..16e9a9945716e56c18dc514e6199ebe04dba1b29 100644 (file)
@@ -10,7 +10,6 @@
 #define  I2C_BASE1             0x44E0B000
 #define  I2C_BASE2             0x4802A000
 #define  I2C_BASE3             0x4819C000
-#define         CONFIG_SYS_I2C_BUS_MAX         3
 
 #define I2C_DEFAULT_BASE               I2C_BASE1
 
index d1421757dbc7f3228fd55d7c9f5da266dd677f76..48676dd7565ee12bccd06b711a9f5e7073b1286e 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef _OMAP3_I2C_H_
 #define _OMAP3_I2C_H_
 
-#define CONFIG_SYS_I2C_BUS_MAX 3
 #define I2C_DEFAULT_BASE       I2C_BASE1
 
 struct i2c {
index 1c5ed9b17ace162a24420e0a7ffbd4229aa0b9c3..96c095436ad2e3549057d8b46c07d9d14c65ad46 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef _OMAP4_I2C_H_
 #define _OMAP4_I2C_H_
 
-#define CONFIG_SYS_I2C_BUS_MAX 4
 #define I2C_DEFAULT_BASE       I2C_BASE1
 
 struct i2c {
index 5122cd6aa498e06da999d7f5b1ad11712e119387..6d620dc32e3062a268d3646466c287245bf53f3f 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef _OMAP5_I2C_H_
 #define _OMAP5_I2C_H_
 
-#define CONFIG_SYS_I2C_BUS_MAX 5
 #define I2C_DEFAULT_BASE       I2C_BASE1
 
 struct i2c {
index d2d9367bfc46653a0608398bcb3b7d39bbc72c2f..c296985d9baaaf6d7817cf4e144fd3459bef48d1 100644 (file)
@@ -227,6 +227,16 @@ 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_BUS_MAX
+       int "Max I2C busses"
+       depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA
+       default 2 if TI816X
+       default 3 if OMAP34XX || AM33XX || AM43XX || ARCH_KEYSTONE
+       default 4 if ARCH_SOCFPGA || OMAP44XX || TI814X
+       default 5 if OMAP54XX
+       help
+         Define the maximum number of available I2C buses.
+
 source "drivers/i2c/muxes/Kconfig"
 
 endmenu
index 175b01ef84a9f12565b3d29529b30cbdcb9becd8..73a9744176085933ee6e1d1d7bfd8091a4d35522 100644 (file)
  * I2C support
  */
 #define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_BUS_MAX         4
 #define CONFIG_SYS_I2C_BASE            SOCFPGA_I2C0_ADDRESS
 #define CONFIG_SYS_I2C_BASE1           SOCFPGA_I2C1_ADDRESS
 #define CONFIG_SYS_I2C_BASE2           SOCFPGA_I2C2_ADDRESS
index f3563446c1fabda3484a55ef9107d3a92216ec22..2b2b85d085b4d4f3b7520e410c7e6b429202ec13 100644 (file)
 #define CONFIG_SYS_DAVINCI_I2C_SLAVE1  0x10 /* SMBus host address */
 #define CONFIG_SYS_DAVINCI_I2C_SPEED2  100000
 #define CONFIG_SYS_DAVINCI_I2C_SLAVE2  0x10 /* SMBus host address */
-#define CONFIG_SYS_I2C_BUS_MAX                 3
 
 /* EEPROM definitions */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2