* [U-Boot] [PATCH 2/2] Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig
@ 2017-08-11 11:39 Adam Ford
2017-08-16 5:57 ` Heiko Schocher
2017-09-02 1:58 ` [U-Boot] [U-Boot, " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Adam Ford @ 2017-08-11 11:39 UTC (permalink / raw)
To: u-boot
This converts the following to Kconfig:
CONFIG_SYS_I2C_BUS_MAX
Signed-off-by: Adam Ford <aford173@gmail.com>
---
arch/arm/include/asm/arch-am33xx/i2c.h | 1 -
arch/arm/include/asm/arch-omap3/i2c.h | 1 -
arch/arm/include/asm/arch-omap4/i2c.h | 1 -
arch/arm/include/asm/arch-omap5/i2c.h | 1 -
drivers/i2c/Kconfig | 10 ++++++++++
include/configs/socfpga_common.h | 1 -
include/configs/ti_armv7_keystone2.h | 1 -
7 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/arch-am33xx/i2c.h b/arch/arm/include/asm/arch-am33xx/i2c.h
index a34282a..16e9a99 100644
--- a/arch/arm/include/asm/arch-am33xx/i2c.h
+++ b/arch/arm/include/asm/arch-am33xx/i2c.h
@@ -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
diff --git a/arch/arm/include/asm/arch-omap3/i2c.h b/arch/arm/include/asm/arch-omap3/i2c.h
index d142175..48676dd 100644
--- a/arch/arm/include/asm/arch-omap3/i2c.h
+++ b/arch/arm/include/asm/arch-omap3/i2c.h
@@ -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 {
diff --git a/arch/arm/include/asm/arch-omap4/i2c.h b/arch/arm/include/asm/arch-omap4/i2c.h
index 1c5ed9b..96c0954 100644
--- a/arch/arm/include/asm/arch-omap4/i2c.h
+++ b/arch/arm/include/asm/arch-omap4/i2c.h
@@ -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 {
diff --git a/arch/arm/include/asm/arch-omap5/i2c.h b/arch/arm/include/asm/arch-omap5/i2c.h
index 5122cd6..6d620dc 100644
--- a/arch/arm/include/asm/arch-omap5/i2c.h
+++ b/arch/arm/include/asm/arch-omap5/i2c.h
@@ -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 {
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 720e82d..f4fd843 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -207,6 +207,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 || ARCH_KEYSTONE
+ default 4 if ARCH_SOCFPGA || OMAP44XX || AM44XX || AM43XX ||TI814X
+ default 5 if OMAP54XX
+ help
+ Define the maximum number of available I2C buses.
+
source "drivers/i2c/muxes/Kconfig"
endmenu
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 175b01e..73a9744 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -156,7 +156,6 @@
* 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
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 812ba51..6831b2c 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -160,7 +160,6 @@
#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
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH 2/2] Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig
2017-08-11 11:39 [U-Boot] [PATCH 2/2] Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig Adam Ford
@ 2017-08-16 5:57 ` Heiko Schocher
2017-09-02 1:58 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2017-08-16 5:57 UTC (permalink / raw)
To: u-boot
Hello Adam,
Am 11.08.2017 um 13:39 schrieb Adam Ford:
> This converts the following to Kconfig:
> CONFIG_SYS_I2C_BUS_MAX
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> arch/arm/include/asm/arch-am33xx/i2c.h | 1 -
> arch/arm/include/asm/arch-omap3/i2c.h | 1 -
> arch/arm/include/asm/arch-omap4/i2c.h | 1 -
> arch/arm/include/asm/arch-omap5/i2c.h | 1 -
> drivers/i2c/Kconfig | 10 ++++++++++
> include/configs/socfpga_common.h | 1 -
> include/configs/ti_armv7_keystone2.h | 1 -
> 7 files changed, 10 insertions(+), 6 deletions(-)
Reviewed-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [U-Boot, 2/2] Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig
2017-08-11 11:39 [U-Boot] [PATCH 2/2] Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig Adam Ford
2017-08-16 5:57 ` Heiko Schocher
@ 2017-09-02 1:58 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-09-02 1:58 UTC (permalink / raw)
To: u-boot
On Fri, Aug 11, 2017 at 06:39:34AM -0500, Adam Ford wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170901/e8c37e23/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-02 1:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11 11:39 [U-Boot] [PATCH 2/2] Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig Adam Ford
2017-08-16 5:57 ` Heiko Schocher
2017-09-02 1:58 ` [U-Boot] [U-Boot, " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.