diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-11-06 20:33:36 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-12 08:36:23 +0100 |
commit | 7230ca2380dbf15ab05531aee67a38f32af9a0e9 (patch) | |
tree | 08ca0a6c3b14ac6d90265911f40cd0682d851f00 /arch | |
parent | 45e9e0b1dc75c4d8a5a4f7d5bdcbd0723f1777f1 (diff) | |
download | barebox-7230ca2380dbf15ab05531aee67a38f32af9a0e9.tar.gz barebox-7230ca2380dbf15ab05531aee67a38f32af9a0e9.tar.xz |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91/at91rm9200_devices.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 8cb2f57751..c9ceef9654 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c @@ -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); } |