diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:46 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:09:07 -0400 |
commit | 980f9f601ad456dc5a699bf526b6bd894957bad3 (patch) | |
tree | f5e1bd57495bf3dabc17eadd4eda8a36d14637b9 /arch/arm/mach-dove | |
parent | aac7ffa3ed121846b61347028828617c5dd1ce46 (diff) |
ARM: orion: Consolidate SPI initialization.
This change removes the interrupt resource. The driver does not use
it.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-dove')
-rw-r--r-- | arch/arm/mach-dove/common.c | 65 |
1 files changed, 3 insertions, 62 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 198760b1b17d..e3e043c0004c 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/mbus.h> | 18 | #include <linux/mbus.h> |
19 | #include <linux/ata_platform.h> | 19 | #include <linux/ata_platform.h> |
20 | #include <linux/serial_8250.h> | 20 | #include <linux/serial_8250.h> |
21 | #include <linux/spi/orion_spi.h> | ||
22 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
23 | #include <asm/page.h> | 22 | #include <asm/page.h> |
24 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
@@ -234,71 +233,16 @@ void __init dove_uart3_init(void) | |||
234 | } | 233 | } |
235 | 234 | ||
236 | /***************************************************************************** | 235 | /***************************************************************************** |
237 | * SPI0 | 236 | * SPI |
238 | ****************************************************************************/ | 237 | ****************************************************************************/ |
239 | static struct orion_spi_info dove_spi0_data = { | ||
240 | .tclk = 0, | ||
241 | }; | ||
242 | |||
243 | static struct resource dove_spi0_resources[] = { | ||
244 | { | ||
245 | .start = DOVE_SPI0_PHYS_BASE, | ||
246 | .end = DOVE_SPI0_PHYS_BASE + SZ_512 - 1, | ||
247 | .flags = IORESOURCE_MEM, | ||
248 | }, { | ||
249 | .start = IRQ_DOVE_SPI0, | ||
250 | .end = IRQ_DOVE_SPI0, | ||
251 | .flags = IORESOURCE_IRQ, | ||
252 | }, | ||
253 | }; | ||
254 | |||
255 | static struct platform_device dove_spi0 = { | ||
256 | .name = "orion_spi", | ||
257 | .id = 0, | ||
258 | .resource = dove_spi0_resources, | ||
259 | .dev = { | ||
260 | .platform_data = &dove_spi0_data, | ||
261 | }, | ||
262 | .num_resources = ARRAY_SIZE(dove_spi0_resources), | ||
263 | }; | ||
264 | |||
265 | void __init dove_spi0_init(void) | 238 | void __init dove_spi0_init(void) |
266 | { | 239 | { |
267 | platform_device_register(&dove_spi0); | 240 | orion_spi_init(DOVE_SPI0_PHYS_BASE, get_tclk()); |
268 | } | 241 | } |
269 | 242 | ||
270 | /***************************************************************************** | ||
271 | * SPI1 | ||
272 | ****************************************************************************/ | ||
273 | static struct orion_spi_info dove_spi1_data = { | ||
274 | .tclk = 0, | ||
275 | }; | ||
276 | |||
277 | static struct resource dove_spi1_resources[] = { | ||
278 | { | ||
279 | .start = DOVE_SPI1_PHYS_BASE, | ||
280 | .end = DOVE_SPI1_PHYS_BASE + SZ_512 - 1, | ||
281 | .flags = IORESOURCE_MEM, | ||
282 | }, { | ||
283 | .start = IRQ_DOVE_SPI1, | ||
284 | .end = IRQ_DOVE_SPI1, | ||
285 | .flags = IORESOURCE_IRQ, | ||
286 | }, | ||
287 | }; | ||
288 | |||
289 | static struct platform_device dove_spi1 = { | ||
290 | .name = "orion_spi", | ||
291 | .id = 1, | ||
292 | .resource = dove_spi1_resources, | ||
293 | .dev = { | ||
294 | .platform_data = &dove_spi1_data, | ||
295 | }, | ||
296 | .num_resources = ARRAY_SIZE(dove_spi1_resources), | ||
297 | }; | ||
298 | |||
299 | void __init dove_spi1_init(void) | 243 | void __init dove_spi1_init(void) |
300 | { | 244 | { |
301 | platform_device_register(&dove_spi1); | 245 | orion_spi_init(DOVE_SPI1_PHYS_BASE, get_tclk()); |
302 | } | 246 | } |
303 | 247 | ||
304 | /***************************************************************************** | 248 | /***************************************************************************** |
@@ -613,9 +557,6 @@ void __init dove_init(void) | |||
613 | #endif | 557 | #endif |
614 | dove_setup_cpu_mbus(); | 558 | dove_setup_cpu_mbus(); |
615 | 559 | ||
616 | dove_spi0_data.tclk = tclk; | ||
617 | dove_spi1_data.tclk = tclk; | ||
618 | |||
619 | /* internal devices that every board has */ | 560 | /* internal devices that every board has */ |
620 | dove_rtc_init(); | 561 | dove_rtc_init(); |
621 | dove_xor0_init(); | 562 | dove_xor0_init(); |