]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 4478/1: AT91: Convert AT91RM9200 to use atmel_spi driver
authorAndrew Victor <andrew@sanpeople.com>
Mon, 16 Jul 2007 10:35:40 +0000 (11:35 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 20 Jul 2007 08:43:28 +0000 (09:43 +0100)
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>
arch/arm/mach-at91/at91rm9200_devices.c

index 70599bcf451cf9c64000f71f2af29a6f849db02a..0417c165d50d0a8e732b60b5ad767cddbe757851 100644 (file)
@@ -477,7 +477,7 @@ void __init at91_add_device_i2c(void) {}
  *  SPI
  * -------------------------------------------------------------------- */
 
-#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE)
+#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
 static u64 spi_dmamask = 0xffffffffUL;
 
 static struct resource spi_resources[] = {
@@ -494,7 +494,7 @@ static struct resource spi_resources[] = {
 };
 
 static struct platform_device at91rm9200_spi_device = {
-       .name           = "at91_spi",
+       .name           = "atmel_spi",
        .id             = 0,
        .dev            = {
                                .dma_mask               = &spi_dmamask,
@@ -522,18 +522,14 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
                else
                        cs_pin = spi_standard_cs[devices[i].chip_select];
 
-#ifdef CONFIG_SPI_AT91_MANUAL_CS
+               /* enable chip-select pin */
                at91_set_gpio_output(cs_pin, 1);
-#else
-               at91_set_A_periph(cs_pin, 0);
-#endif
 
                /* pass chip-select pin to driver */
                devices[i].controller_data = (void *) cs_pin;
        }
 
        spi_register_board_info(devices, nr_devices);
-       at91_clock_associate("spi_clk", &at91rm9200_spi_device.dev, "spi");
        platform_device_register(&at91rm9200_spi_device);
 }
 #else