]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spear: move CONFIG_SYS_I2C_BASE from arch-spear/hardware to board configs
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Mon, 10 Feb 2014 08:20:11 +0000 (12:20 +0400)
committerHeiko Schocher <hs@denx.de>
Thu, 20 Feb 2014 05:49:02 +0000 (06:49 +0100)
Having CONFIG_SYS_I2C_BASE requires DW I2C driver to explicitly include
<arch/hardware.h> which other platforms may not have at all.

It's always good to have a driver platform-independent.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Tom Rini <trini@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Armando Visconti <armando.visconti@st.com>
arch/arm/include/asm/arch-spear/hardware.h
include/configs/spear-common.h
include/configs/x600.h

index f3afd4d06596f754e33cd75a4e2d0fd619ed3415..c6da405cc07a6fafe346999321187837ee2eaf34 100644 (file)
@@ -26,7 +26,6 @@
 #define CONFIG_SYS_NAND_ALE                    (1 << 17)
 
 #if defined(CONFIG_SPEAR600)
-#define CONFIG_SYS_I2C_BASE                    0xD0200000
 #define CONFIG_SYS_FSMC_BASE                   0xD1800000
 #define CONFIG_FSMC_NAND_BASE                  0xD2000000
 
 #define CONFIG_SPEAR_MPMCREGS                  100
 
 #elif defined(CONFIG_SPEAR300)
-#define CONFIG_SYS_I2C_BASE                    0xD0180000
 #define CONFIG_SYS_FSMC_BASE                   0x94000000
 
 #elif defined(CONFIG_SPEAR310)
-#define CONFIG_SYS_I2C_BASE                    0xD0180000
 #define CONFIG_SYS_FSMC_BASE                   0x44000000
 
 #undef CONFIG_SYS_NAND_CLE
@@ -63,7 +60,6 @@
 #define CONFIG_SYS_MACB3_BASE                  0xB1800000
 
 #elif defined(CONFIG_SPEAR320)
-#define CONFIG_SYS_I2C_BASE                    0xD0180000
 #define CONFIG_SYS_FSMC_BASE                   0x4C000000
 
 #define CONFIG_SPEAR_EMIBASE                   0x40000000
index e090a376d03cc3ae9e3679da81059e0408357f08..c0eba3721d70d30306f2ea9826d63a19547ac3e2 100644 (file)
 /* I2C driver configuration */
 #define CONFIG_HARD_I2C
 #define CONFIG_DW_I2C
+#if defined(CONFIG_SPEAR600)
+#define CONFIG_SYS_I2C_BASE                    0xD0200000
+#elif defined(CONFIG_SPEAR300)
+#define CONFIG_SYS_I2C_BASE                    0xD0180000
+#elif defined(CONFIG_SPEAR310)
+#define CONFIG_SYS_I2C_BASE                    0xD0180000
+#elif defined(CONFIG_SPEAR320)
+#define CONFIG_SYS_I2C_BASE                    0xD0180000
+#endif
 #define CONFIG_SYS_I2C_SPEED                   400000
 #define CONFIG_SYS_I2C_SLAVE                   0x02
 
index d420efe54389aba93f45899c60a5b75cc3381dfb..7405419f0e270a9ad6295cc8d9b6df6c6d40e327 100644 (file)
@@ -85,6 +85,7 @@
 /* I2C config options */
 #define CONFIG_HARD_I2C
 #define CONFIG_DW_I2C
+#define CONFIG_SYS_I2C_BASE                    0xD0200000
 #define CONFIG_SYS_I2C_SPEED                   400000
 #define CONFIG_SYS_I2C_SLAVE                   0x02
 #define CONFIG_I2C_CHIPADDRESS                 0x50