diff options
author | Florian Fainelli <florian@openwrt.org> | 2014-02-28 20:30:08 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2014-02-28 20:30:08 +0000 |
commit | bb39b8d99aae1f7eb13a97bd874838da91080de6 (patch) | |
tree | 3046f53937c0bc5dc13e2b2ab7b688a1932199bf /target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch | |
parent | c6c0d09f85c211560a1405441925681cfa25e8b1 (diff) | |
download | upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.gz upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.bz2 upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.zip |
brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y
rebased against linux-3.10.y stable (3.10.32). This should hopefully
make it easier for us in the future to leverage the raspberry/rpi-*
branches.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39770
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch')
-rw-r--r-- | target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch b/target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch new file mode 100644 index 0000000000..0baa6cbf6c --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch @@ -0,0 +1,42 @@ +From 444149f35455bfe551ce9dfa21d00b5b34ffb04f Mon Sep 17 00:00:00 2001 +From: Kamal Mostafa <kamal@whence.com> +Date: Mon, 22 Oct 2012 15:52:44 -0700 +Subject: [PATCH 046/174] spi/spi-bcm2708: respect per-transfer SPI clock + speed_hz value + +The bcm2708 SPI driver's bcm2708_process_transfer() was ignoring the +per-transfer speed_hz value even when it was provided (it always just +used the spi device's max_speed_hz value). Now, per-transfer speed_hz +values are respected. + +Also added debug print to bcm2708_setup_state() to help keep an eye on +the configured SPI parameters. + +Signed-off-by: Kamal Mostafa <kamal@whence.com> +--- + drivers/spi/spi-bcm2708.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/spi/spi-bcm2708.c ++++ b/drivers/spi/spi-bcm2708.c +@@ -259,6 +259,10 @@ static int bcm2708_setup_state(struct sp + if (state) { + state->cs = cs; + state->cdiv = cdiv; ++ dev_dbg(dev, "setup: want %d Hz; " ++ "bus_hz=%lu / cdiv=%u == %lu Hz; " ++ "mode %u: cs 0x%08X\n", ++ hz, bus_hz, cdiv, bus_hz/cdiv, mode, cs); + } + + return 0; +@@ -277,7 +281,8 @@ static int bcm2708_process_transfer(stru + + if (xfer->bits_per_word || xfer->speed_hz) { + ret = bcm2708_setup_state(spi->master, &spi->dev, &state, +- spi->max_speed_hz, spi->chip_select, spi->mode, ++ xfer->speed_hz ? xfer->speed_hz : spi->max_speed_hz, ++ spi->chip_select, spi->mode, + spi->bits_per_word); + if (ret) + return ret; |