ar71xx: use backported SPI patches
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / patches-3.8 / 003-spi-ath79-remove-superfluous-chip-select-code.patch
1 From 622d87da7f99b29dde053881bf42c46de7572ce5 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Thu, 27 Dec 2012 10:42:26 +0100
4 Subject: [PATCH] spi/ath79: remove superfluous chip select code
5
6 commit f1e8fc9898fd8ca78b7438d3c2e60028d3ae2a34 upstream.
7
8 The spi_bitbang driver calls the chipselect function
9 of the driver from spi_bitbang_setup in order to
10 deselect the given SPI chip, so we don't have to
11 initialize the CS line here.
12
13 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
14 Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 ---
16 drivers/spi/spi-ath79.c | 6 ------
17 1 file changed, 6 deletions(-)
18
19 --- a/drivers/spi/spi-ath79.c
20 +++ b/drivers/spi/spi-ath79.c
21 @@ -128,12 +128,6 @@ static int ath79_spi_setup_cs(struct spi
22 gpio_free(cdata->gpio);
23 return status;
24 }
25 - } else {
26 - if (spi->mode & SPI_CS_HIGH)
27 - sp->ioc_base |= AR71XX_SPI_IOC_CS0;
28 - else
29 - sp->ioc_base &= ~AR71XX_SPI_IOC_CS0;
30 - ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
31 }
32
33 return 0;