Commit f93f589ca2defd02fa76a3d0cde695d61820390d
Committed by
Heiko Schocher
1 parent
d5243359e1
Exists in
master
and in
49 other branches
spear: move CONFIG_SYS_I2C_BASE from arch-spear/hardware to board configs
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>
Showing 3 changed files with 10 additions and 4 deletions Side-by-side Diff
arch/arm/include/asm/arch-spear/hardware.h
... | ... | @@ -26,7 +26,6 @@ |
26 | 26 | #define CONFIG_SYS_NAND_ALE (1 << 17) |
27 | 27 | |
28 | 28 | #if defined(CONFIG_SPEAR600) |
29 | -#define CONFIG_SYS_I2C_BASE 0xD0200000 | |
30 | 29 | #define CONFIG_SYS_FSMC_BASE 0xD1800000 |
31 | 30 | #define CONFIG_FSMC_NAND_BASE 0xD2000000 |
32 | 31 | |
33 | 32 | |
... | ... | @@ -42,11 +41,9 @@ |
42 | 41 | #define CONFIG_SPEAR_MPMCREGS 100 |
43 | 42 | |
44 | 43 | #elif defined(CONFIG_SPEAR300) |
45 | -#define CONFIG_SYS_I2C_BASE 0xD0180000 | |
46 | 44 | #define CONFIG_SYS_FSMC_BASE 0x94000000 |
47 | 45 | |
48 | 46 | #elif defined(CONFIG_SPEAR310) |
49 | -#define CONFIG_SYS_I2C_BASE 0xD0180000 | |
50 | 47 | #define CONFIG_SYS_FSMC_BASE 0x44000000 |
51 | 48 | |
52 | 49 | #undef CONFIG_SYS_NAND_CLE |
... | ... | @@ -63,7 +60,6 @@ |
63 | 60 | #define CONFIG_SYS_MACB3_BASE 0xB1800000 |
64 | 61 | |
65 | 62 | #elif defined(CONFIG_SPEAR320) |
66 | -#define CONFIG_SYS_I2C_BASE 0xD0180000 | |
67 | 63 | #define CONFIG_SYS_FSMC_BASE 0x4C000000 |
68 | 64 | |
69 | 65 | #define CONFIG_SPEAR_EMIBASE 0x40000000 |
include/configs/spear-common.h
... | ... | @@ -39,6 +39,15 @@ |
39 | 39 | /* I2C driver configuration */ |
40 | 40 | #define CONFIG_HARD_I2C |
41 | 41 | #define CONFIG_DW_I2C |
42 | +#if defined(CONFIG_SPEAR600) | |
43 | +#define CONFIG_SYS_I2C_BASE 0xD0200000 | |
44 | +#elif defined(CONFIG_SPEAR300) | |
45 | +#define CONFIG_SYS_I2C_BASE 0xD0180000 | |
46 | +#elif defined(CONFIG_SPEAR310) | |
47 | +#define CONFIG_SYS_I2C_BASE 0xD0180000 | |
48 | +#elif defined(CONFIG_SPEAR320) | |
49 | +#define CONFIG_SYS_I2C_BASE 0xD0180000 | |
50 | +#endif | |
42 | 51 | #define CONFIG_SYS_I2C_SPEED 400000 |
43 | 52 | #define CONFIG_SYS_I2C_SLAVE 0x02 |
44 | 53 |
include/configs/x600.h