summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-07-08 17:17:56 +0200
committerMark Brown <broonie@linaro.org>2014-07-08 17:17:56 +0200
commit8b6c5d8c8b9c8a35b806aaa9dee71d8125e39120 (patch)
tree6e9c1d8fd14cd5cb71d48d4257e1c1a91fb2a569 /drivers/spi/spi-pxa2xx.c
parent19dee0d2c9f36a04387d8d0d7e531ab94eef6dc0 (diff)
parent4c834452aad01531db949414f94f817a86348d59 (diff)
downloadop-kernel-dev-8b6c5d8c8b9c8a35b806aaa9dee71d8125e39120.zip
op-kernel-dev-8b6c5d8c8b9c8a35b806aaa9dee71d8125e39120.tar.gz
Merge tag 'v3.16-rc3' into spi-sh-msiof
Linux 3.16-rc3
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r--drivers/spi/spi-pxa2xx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index a98df7e..fe79210 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -118,6 +118,7 @@ static void lpss_ssp_setup(struct driver_data *drv_data)
*/
orig = readl(drv_data->ioaddr + offset + SPI_CS_CONTROL);
+ /* Test SPI_CS_CONTROL_SW_MODE bit enabling */
value = orig | SPI_CS_CONTROL_SW_MODE;
writel(value, drv_data->ioaddr + offset + SPI_CS_CONTROL);
value = readl(drv_data->ioaddr + offset + SPI_CS_CONTROL);
@@ -126,10 +127,13 @@ static void lpss_ssp_setup(struct driver_data *drv_data)
goto detection_done;
}
- value &= ~SPI_CS_CONTROL_SW_MODE;
+ orig = readl(drv_data->ioaddr + offset + SPI_CS_CONTROL);
+
+ /* Test SPI_CS_CONTROL_SW_MODE bit disabling */
+ value = orig & ~SPI_CS_CONTROL_SW_MODE;
writel(value, drv_data->ioaddr + offset + SPI_CS_CONTROL);
value = readl(drv_data->ioaddr + offset + SPI_CS_CONTROL);
- if (value != orig) {
+ if (value != (orig & ~SPI_CS_CONTROL_SW_MODE)) {
offset = 0x800;
goto detection_done;
}
OpenPOWER on IntegriCloud