Skip to content

Commit

Permalink
[ARM] 4760/1: [AT91] SPI CS0 errata on AT91RM9200
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Victor authored and Russell King committed Jan 26, 2008
1 parent 6d2a840 commit 2743f0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/arm/mach-at91/at91rm9200_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,11 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
else
cs_pin = spi_standard_cs[devices[i].chip_select];

/* enable chip-select pin */
at91_set_gpio_output(cs_pin, 1);
if (devices[i].chip_select == 0) /* for CS0 errata */
at91_set_A_periph(cs_pin, 0);
else
at91_set_gpio_output(cs_pin, 1);


/* pass chip-select pin to driver */
devices[i].controller_data = (void *) cs_pin;
Expand Down

0 comments on commit 2743f0c

Please sign in to comment.