[brcm63xx] backport upstream spi-bcm63xx fixes
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.3 / 015-spi-bcm63xx-set-master-driver-mode_bits.patch
1 From 88a3a255a510ed193bf0cc35424761c3c9247586 Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <florian@openwrt.org>
3 Date: Fri, 20 Apr 2012 15:37:35 +0200
4 Subject: [PATCH] spi/bcm63xx: set master driver mode_bits.
5
6 We were not properly advertising the MODE bits supported by this driver, fix
7 that.
8
9 Signed-off-by: Florian Fainelli <florian@openwrt.org>
10 Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
11 ---
12 drivers/spi/spi-bcm63xx.c | 1 +
13 1 file changed, 1 insertion(+)
14
15 --- a/drivers/spi/spi-bcm63xx.c
16 +++ b/drivers/spi/spi-bcm63xx.c
17 @@ -404,6 +404,7 @@ static int __devinit bcm63xx_spi_probe(s
18 master->prepare_transfer_hardware = bcm63xx_spi_prepare_transfer;
19 master->unprepare_transfer_hardware = bcm63xx_spi_unprepare_transfer;
20 master->transfer_one_message = bcm63xx_spi_transfer_one;
21 + master->mode_bits = MODEBITS;
22 bs->speed_hz = pdata->speed_hz;
23 bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA));
24 bs->rx_io = (const u8 *)(bs->regs + bcm63xx_spireg(SPI_RX_DATA));