9
0
Fork 0

at91rm9200: fix spi cs support

the rm9200 have a errata the cs0 must be used via hw cs not gpio

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-11-06 20:33:36 +01:00 committed by Sascha Hauer
parent 45e9e0b1dc
commit 7230ca2380
1 changed files with 6 additions and 1 deletions

View File

@ -182,7 +182,12 @@ void at91_add_device_spi(int spi_id, struct at91_spi_platform_data *pdata)
cs_pin = pdata->chipselect[i];
/* enable chip-select pin */
if (cs_pin > 0)
if (!gpio_is_valid(cs_pin))
continue;
if (cs_pin == AT91_PIN_PA3)
at91_set_A_periph(cs_pin, 0);
else
at91_set_gpio_output(cs_pin, 1);
}