]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS: BCM63xx: Fix SPI message control register handling for BCM6338/6348.
authorFlorian Fainelli <florian@openwrt.org>
Mon, 18 Jun 2012 10:07:51 +0000 (12:07 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 14 Aug 2012 13:08:49 +0000 (15:08 +0200)
commitd486fc08076c7143673f464f232e39e254aaa4ed
treecf564579dba51a1b5c7ae29ac5b169f6cc7431ed
parentc409af7e481447797db4348eb6ff7171753e51f7
MIPS: BCM63xx: Fix SPI message control register handling for BCM6338/6348.

BCM6338 and BCM6348 have a message control register width of 8 bits, instead
of 16-bits like what the SPI driver assumes right now. Also the SPI message
type shift value of 14 is actually 6 for these SoCs.
This resulted in transmit FIFO corruption because we were writing 16-bits
to an 8-bits wide register, thus spanning on the first byte of the transmit
FIFO, which had already been filed in bcm63xx_spi_fill_txrx_fifo().

Fix this by passing the message control register width and message type
shift through platform data back to the SPI driver so that it can use
it properly.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: grant.likely@secretlab.ca
Cc: spi-devel-general@lists.sourceforge.net
Cc: jonas.gorski@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/3983/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/bcm63xx/dev-spi.c
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
drivers/spi/spi-bcm63xx.c