aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91rm9200_devices.c
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2007-07-16 06:35:40 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-20 04:43:28 -0400
commitc06911c00b2af93e498ba45200ad903929e71529 (patch)
tree67a8bf9616c71a36f9a0f7398937c7e25c577ad6 /arch/arm/mach-at91/at91rm9200_devices.c
parent9a79b2274186fade17134929d4f85b70d59a3840 (diff)
[ARM] 4478/1: AT91: Convert AT91RM9200 to use atmel_spi driver
Convert the AT91RM9200 platform-setup code to use the new atmel_spi driver (and manually-driven chip-selects), instead of the legacy AT91-only SPI stack. The AT91SAM9 processors are already using the atmel_spi driver. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/at91rm9200_devices.c')
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 70599bcf451c..0417c165d50d 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -477,7 +477,7 @@ void __init at91_add_device_i2c(void) {}
477 * SPI 477 * SPI
478 * -------------------------------------------------------------------- */ 478 * -------------------------------------------------------------------- */
479 479
480#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) 480#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
481static u64 spi_dmamask = 0xffffffffUL; 481static u64 spi_dmamask = 0xffffffffUL;
482 482
483static struct resource spi_resources[] = { 483static struct resource spi_resources[] = {
@@ -494,7 +494,7 @@ static struct resource spi_resources[] = {
494}; 494};
495 495
496static struct platform_device at91rm9200_spi_device = { 496static struct platform_device at91rm9200_spi_device = {
497 .name = "at91_spi", 497 .name = "atmel_spi",
498 .id = 0, 498 .id = 0,
499 .dev = { 499 .dev = {
500 .dma_mask = &spi_dmamask, 500 .dma_mask = &spi_dmamask,
@@ -522,18 +522,14 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
522 else 522 else
523 cs_pin = spi_standard_cs[devices[i].chip_select]; 523 cs_pin = spi_standard_cs[devices[i].chip_select];
524 524
525#ifdef CONFIG_SPI_AT91_MANUAL_CS 525 /* enable chip-select pin */
526 at91_set_gpio_output(cs_pin, 1); 526 at91_set_gpio_output(cs_pin, 1);
527#else
528 at91_set_A_periph(cs_pin, 0);
529#endif
530 527
531 /* pass chip-select pin to driver */ 528 /* pass chip-select pin to driver */
532 devices[i].controller_data = (void *) cs_pin; 529 devices[i].controller_data = (void *) cs_pin;
533 } 530 }
534 531
535 spi_register_board_info(devices, nr_devices); 532 spi_register_board_info(devices, nr_devices);
536 at91_clock_associate("spi_clk", &at91rm9200_spi_device.dev, "spi");
537 platform_device_register(&at91rm9200_spi_device); 533 platform_device_register(&at91rm9200_spi_device);
538} 534}
539#else 535#else