diff options
author | Andrew Victor <linux@maxim.org.za> | 2008-01-23 03:29:46 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 10:00:32 -0500 |
commit | 2743f0c1dcca54d6c80b0de1273b3f4e90051a85 (patch) | |
tree | 9a07294ddc3aa731497924bc1980a1455bf6dab5 /arch/arm/mach-at91/at91rm9200_devices.c | |
parent | 6d2a8401d27e3eb8b71d09dd67e0e7d0085b5e29 (diff) |
[ARM] 4760/1: [AT91] SPI CS0 errata on AT91RM9200
Due to errata regarding the handling of SPI CS0 on the AT91RM9200, the
atmel_spi driver drives CS0 from the SPI controller and not as a GPIO
pin.
We therefore need to configure CS0 for use by the controller
Signed-off-by: Andrew Victor <linux@maxim.org.za>
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.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index ea9a952fb877..ef6aeb86e980 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -558,8 +558,11 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
558 | else | 558 | else |
559 | cs_pin = spi_standard_cs[devices[i].chip_select]; | 559 | cs_pin = spi_standard_cs[devices[i].chip_select]; |
560 | 560 | ||
561 | /* enable chip-select pin */ | 561 | if (devices[i].chip_select == 0) /* for CS0 errata */ |
562 | at91_set_gpio_output(cs_pin, 1); | 562 | at91_set_A_periph(cs_pin, 0); |
563 | else | ||
564 | at91_set_gpio_output(cs_pin, 1); | ||
565 | |||
563 | 566 | ||
564 | /* pass chip-select pin to driver */ | 567 | /* pass chip-select pin to driver */ |
565 | devices[i].controller_data = (void *) cs_pin; | 568 | devices[i].controller_data = (void *) cs_pin; |