diff options
author | Heiko Stuebner <heiko@sntech.de> | 2012-10-17 03:47:11 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-10-17 03:47:32 -0400 |
commit | 308b3afb97dc342e9c4f958d8b4c459ae0e22bd7 (patch) | |
tree | e369cf2f77f8b5bdbe8085e71459cfb4943e6916 /arch/arm | |
parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) |
ARM: SAMSUNG: Add naming of s3c64xx-spi devices
Commit a5238e360b71 (spi: s3c64xx: move controller information into driver
data) introduced separate device names for the different subtypes of the
spi controller but forgot to set these in the relevant machines.
To fix this introduce a s3c64xx_spi_setname function and populate all
Samsung arches with the correct names. The function resides in a new
header, as the s3c64xx-spi.h contains driver platform data and should
therefore at some later point move out of the Samsung include dir.
Tested on a s3c2416-based machine.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Cc: Stable <stable@vger.kernel.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[s.nawrocki@samsung.com: tested on mach-exynos]
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-exynos/common.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2416.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2443.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/common.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/common.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/common.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/spi-core.h | 30 |
7 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 715b690e5009..1947be8e5f5b 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <plat/fimc-core.h> | 47 | #include <plat/fimc-core.h> |
48 | #include <plat/iic-core.h> | 48 | #include <plat/iic-core.h> |
49 | #include <plat/tv-core.h> | 49 | #include <plat/tv-core.h> |
50 | #include <plat/spi-core.h> | ||
50 | #include <plat/regs-serial.h> | 51 | #include <plat/regs-serial.h> |
51 | 52 | ||
52 | #include "common.h" | 53 | #include "common.h" |
@@ -346,6 +347,8 @@ static void __init exynos4_map_io(void) | |||
346 | 347 | ||
347 | s5p_fb_setname(0, "exynos4-fb"); | 348 | s5p_fb_setname(0, "exynos4-fb"); |
348 | s5p_hdmi_setname("exynos4-hdmi"); | 349 | s5p_hdmi_setname("exynos4-hdmi"); |
350 | |||
351 | s3c64xx_spi_setname("exynos4210-spi"); | ||
349 | } | 352 | } |
350 | 353 | ||
351 | static void __init exynos5_map_io(void) | 354 | static void __init exynos5_map_io(void) |
@@ -366,6 +369,8 @@ static void __init exynos5_map_io(void) | |||
366 | s3c_i2c0_setname("s3c2440-i2c"); | 369 | s3c_i2c0_setname("s3c2440-i2c"); |
367 | s3c_i2c1_setname("s3c2440-i2c"); | 370 | s3c_i2c1_setname("s3c2440-i2c"); |
368 | s3c_i2c2_setname("s3c2440-i2c"); | 371 | s3c_i2c2_setname("s3c2440-i2c"); |
372 | |||
373 | s3c64xx_spi_setname("exynos4210-spi"); | ||
369 | } | 374 | } |
370 | 375 | ||
371 | static void __init exynos4_init_clocks(int xtal) | 376 | static void __init exynos4_init_clocks(int xtal) |
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index ed5a95ece9eb..77ee0b732237 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <plat/nand-core.h> | 61 | #include <plat/nand-core.h> |
62 | #include <plat/adc-core.h> | 62 | #include <plat/adc-core.h> |
63 | #include <plat/rtc-core.h> | 63 | #include <plat/rtc-core.h> |
64 | #include <plat/spi-core.h> | ||
64 | 65 | ||
65 | static struct map_desc s3c2416_iodesc[] __initdata = { | 66 | static struct map_desc s3c2416_iodesc[] __initdata = { |
66 | IODESC_ENT(WATCHDOG), | 67 | IODESC_ENT(WATCHDOG), |
@@ -132,6 +133,7 @@ void __init s3c2416_map_io(void) | |||
132 | /* initialize device information early */ | 133 | /* initialize device information early */ |
133 | s3c2416_default_sdhci0(); | 134 | s3c2416_default_sdhci0(); |
134 | s3c2416_default_sdhci1(); | 135 | s3c2416_default_sdhci1(); |
136 | s3c64xx_spi_setname("s3c2443-spi"); | ||
135 | 137 | ||
136 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); | 138 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); |
137 | } | 139 | } |
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index ab648ad8fa50..165b6a6b3daa 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <plat/nand-core.h> | 43 | #include <plat/nand-core.h> |
44 | #include <plat/adc-core.h> | 44 | #include <plat/adc-core.h> |
45 | #include <plat/rtc-core.h> | 45 | #include <plat/rtc-core.h> |
46 | #include <plat/spi-core.h> | ||
46 | 47 | ||
47 | static struct map_desc s3c2443_iodesc[] __initdata = { | 48 | static struct map_desc s3c2443_iodesc[] __initdata = { |
48 | IODESC_ENT(WATCHDOG), | 49 | IODESC_ENT(WATCHDOG), |
@@ -100,6 +101,9 @@ void __init s3c2443_map_io(void) | |||
100 | s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull; | 101 | s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull; |
101 | s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull; | 102 | s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull; |
102 | 103 | ||
104 | /* initialize device information early */ | ||
105 | s3c64xx_spi_setname("s3c2443-spi"); | ||
106 | |||
103 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); | 107 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); |
104 | } | 108 | } |
105 | 109 | ||
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 6e6a0a9d6778..111e404a81fd 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <plat/sdhci.h> | 44 | #include <plat/sdhci.h> |
45 | #include <plat/adc-core.h> | 45 | #include <plat/adc-core.h> |
46 | #include <plat/fb-core.h> | 46 | #include <plat/fb-core.h> |
47 | #include <plat/spi-core.h> | ||
47 | #include <plat/gpio-cfg.h> | 48 | #include <plat/gpio-cfg.h> |
48 | #include <plat/regs-irqtype.h> | 49 | #include <plat/regs-irqtype.h> |
49 | #include <plat/regs-serial.h> | 50 | #include <plat/regs-serial.h> |
@@ -179,6 +180,7 @@ void __init s5p6440_map_io(void) | |||
179 | /* initialize any device information early */ | 180 | /* initialize any device information early */ |
180 | s3c_adc_setname("s3c64xx-adc"); | 181 | s3c_adc_setname("s3c64xx-adc"); |
181 | s3c_fb_setname("s5p64x0-fb"); | 182 | s3c_fb_setname("s5p64x0-fb"); |
183 | s3c64xx_spi_setname("s5p64x0-spi"); | ||
182 | 184 | ||
183 | s5p64x0_default_sdhci0(); | 185 | s5p64x0_default_sdhci0(); |
184 | s5p64x0_default_sdhci1(); | 186 | s5p64x0_default_sdhci1(); |
@@ -193,6 +195,7 @@ void __init s5p6450_map_io(void) | |||
193 | /* initialize any device information early */ | 195 | /* initialize any device information early */ |
194 | s3c_adc_setname("s3c64xx-adc"); | 196 | s3c_adc_setname("s3c64xx-adc"); |
195 | s3c_fb_setname("s5p64x0-fb"); | 197 | s3c_fb_setname("s5p64x0-fb"); |
198 | s3c64xx_spi_setname("s5p64x0-spi"); | ||
196 | 199 | ||
197 | s5p64x0_default_sdhci0(); | 200 | s5p64x0_default_sdhci0(); |
198 | s5p64x0_default_sdhci1(); | 201 | s5p64x0_default_sdhci1(); |
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c index 621908658861..cc6e561c9958 100644 --- a/arch/arm/mach-s5pc100/common.c +++ b/arch/arm/mach-s5pc100/common.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <plat/fb-core.h> | 45 | #include <plat/fb-core.h> |
46 | #include <plat/iic-core.h> | 46 | #include <plat/iic-core.h> |
47 | #include <plat/onenand-core.h> | 47 | #include <plat/onenand-core.h> |
48 | #include <plat/spi-core.h> | ||
48 | #include <plat/regs-serial.h> | 49 | #include <plat/regs-serial.h> |
49 | #include <plat/watchdog-reset.h> | 50 | #include <plat/watchdog-reset.h> |
50 | 51 | ||
@@ -165,6 +166,8 @@ void __init s5pc100_map_io(void) | |||
165 | s3c_onenand_setname("s5pc100-onenand"); | 166 | s3c_onenand_setname("s5pc100-onenand"); |
166 | s3c_fb_setname("s5pc100-fb"); | 167 | s3c_fb_setname("s5pc100-fb"); |
167 | s3c_cfcon_setname("s5pc100-pata"); | 168 | s3c_cfcon_setname("s5pc100-pata"); |
169 | |||
170 | s3c64xx_spi_setname("s5pc100-spi"); | ||
168 | } | 171 | } |
169 | 172 | ||
170 | void __init s5pc100_init_clocks(int xtal) | 173 | void __init s5pc100_init_clocks(int xtal) |
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index 4c9e9027df9a..a0c50efe8145 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <plat/iic-core.h> | 43 | #include <plat/iic-core.h> |
44 | #include <plat/keypad-core.h> | 44 | #include <plat/keypad-core.h> |
45 | #include <plat/tv-core.h> | 45 | #include <plat/tv-core.h> |
46 | #include <plat/spi-core.h> | ||
46 | #include <plat/regs-serial.h> | 47 | #include <plat/regs-serial.h> |
47 | 48 | ||
48 | #include "common.h" | 49 | #include "common.h" |
@@ -196,6 +197,8 @@ void __init s5pv210_map_io(void) | |||
196 | 197 | ||
197 | /* setup TV devices */ | 198 | /* setup TV devices */ |
198 | s5p_hdmi_setname("s5pv210-hdmi"); | 199 | s5p_hdmi_setname("s5pv210-hdmi"); |
200 | |||
201 | s3c64xx_spi_setname("s5pv210-spi"); | ||
199 | } | 202 | } |
200 | 203 | ||
201 | void __init s5pv210_init_clocks(int xtal) | 204 | void __init s5pv210_init_clocks(int xtal) |
diff --git a/arch/arm/plat-samsung/include/plat/spi-core.h b/arch/arm/plat-samsung/include/plat/spi-core.h new file mode 100644 index 000000000000..0b9428ab3fc3 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/spi-core.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __PLAT_S3C_SPI_CORE_H | ||
10 | #define __PLAT_S3C_SPI_CORE_H | ||
11 | |||
12 | /* These functions are only for use with the core support code, such as | ||
13 | * the cpu specific initialisation code | ||
14 | */ | ||
15 | |||
16 | /* re-define device name depending on support. */ | ||
17 | static inline void s3c64xx_spi_setname(char *name) | ||
18 | { | ||
19 | #ifdef CONFIG_S3C64XX_DEV_SPI0 | ||
20 | s3c64xx_device_spi0.name = name; | ||
21 | #endif | ||
22 | #ifdef CONFIG_S3C64XX_DEV_SPI1 | ||
23 | s3c64xx_device_spi1.name = name; | ||
24 | #endif | ||
25 | #ifdef CONFIG_S3C64XX_DEV_SPI2 | ||
26 | s3c64xx_device_spi2.name = name; | ||
27 | #endif | ||
28 | } | ||
29 | |||
30 | #endif /* __PLAT_S3C_SPI_CORE_H */ | ||