From c99428d035908b9c0b8be452f9b091bc5e090256 Mon Sep 17 00:00:00 2001
From: Xiubo Li
Date: Mon, 18 Aug 2014 15:48:20 +0800
Subject: spi: fsl-dspi: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li
Acked-by: Chao Fu
Signed-off-by: Mark Brown
---
drivers/spi/spi-fsl-dspi.c | 3 ---
1 file changed, 3 deletions(-)
(limited to 'drivers/spi/spi-fsl-dspi.c')
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 5021ddf03f60..ebc4d1fd76e2 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -493,9 +493,6 @@ static int dspi_probe(struct platform_device *pdev)
}
dspi_regmap_config.lock_arg = dspi;
- dspi_regmap_config.val_format_endian =
- of_property_read_bool(np, "big-endian")
- ? REGMAP_ENDIAN_BIG : REGMAP_ENDIAN_DEFAULT;
dspi->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "dspi", base,
&dspi_regmap_config);
if (IS_ERR(dspi->regmap)) {
--
cgit v1.2.3
From 90f90bbb6049db243289f31800e750b2ce160322 Mon Sep 17 00:00:00 2001
From: Alexander Stein
Date: Thu, 25 Sep 2014 13:32:24 +0200
Subject: spi: fsl-dspi: Remove probe info message
Remove the probe info message which also has wrong output. No need to add
KERN_INFO to pr_info. Output was:
6Freescale DSPI master initialized
Signed-off-by: Alexander Stein
Signed-off-by: Mark Brown
---
drivers/spi/spi-fsl-dspi.c | 1 -
1 file changed, 1 deletion(-)
(limited to 'drivers/spi/spi-fsl-dspi.c')
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index ebc4d1fd76e2..1cdef8e0876b 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -532,7 +532,6 @@ static int dspi_probe(struct platform_device *pdev)
goto out_clk_put;
}
- pr_info(KERN_INFO "Freescale DSPI master initialized\n");
return ret;
out_clk_put:
--
cgit v1.2.3
From a31083600476ac11b656bbc70784767f231469ff Mon Sep 17 00:00:00 2001
From: Xiubo Li
Date: Mon, 29 Sep 2014 10:57:06 +0800
Subject: spi: fsl: Sort include headers alphabetically
Sort all the include headers alphabetically for the freescale
spi drivers. If the inlcude headers sorted out of order, maybe
the best logical choice is to append new ones after the exist
ones, while this may create a lot of potential for duplicates
and conflicts for each diffenent changes will add new headers
in the same location.
Signed-off-by: Xiubo Li
Signed-off-by: Mark Brown
---
drivers/spi/spi-fsl-dspi.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
(limited to 'drivers/spi/spi-fsl-dspi.c')
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 5021ddf03f60..63c3859d24cf 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -13,22 +13,22 @@
*
*/
+#include
+#include
+#include
+#include
+#include
+#include
#include
#include
-#include
-#include
+#include
+#include
#include
+#include
#include
#include
-#include
-#include
-#include
-#include
#include
#include
-#include
-#include
-#include
#define DRIVER_NAME "fsl-dspi"
--
cgit v1.2.3
From 409851c38c742e56747b1911a5091e22b6c8514f Mon Sep 17 00:00:00 2001
From: Xiubo Li
Date: Thu, 9 Oct 2014 11:27:45 +0800
Subject: spi: fsl-dspi: remove useless code for dspi driver.
Since we are using regmap framework's internal locks, so the
lock_arg for dspi_regmap_config is redundant here.
This patch just remove it, and then the dspi_regmap_config could
be const type.
Signed-off-by: Xiubo Li
Signed-off-by: Mark Brown
---
drivers/spi/spi-fsl-dspi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
(limited to 'drivers/spi/spi-fsl-dspi.c')
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 448216025ce8..12dc99546394 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -438,7 +438,7 @@ static int dspi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
-static struct regmap_config dspi_regmap_config = {
+static const struct regmap_config dspi_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
@@ -492,7 +492,6 @@ static int dspi_probe(struct platform_device *pdev)
goto out_master_put;
}
- dspi_regmap_config.lock_arg = dspi;
dspi->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "dspi", base,
&dspi_regmap_config);
if (IS_ERR(dspi->regmap)) {
--
cgit v1.2.3
From 5cc7b04740effa5cc0af53f434134b5859d58b73 Mon Sep 17 00:00:00 2001
From: Alexander Stein
Date: Tue, 4 Nov 2014 09:20:18 +0100
Subject: spi: fsl-dspi: Fix CTAR selection
There are only 4 CTAR registers (CTAR0 - CTAR3) so we can only use the
lower 2 bits of the chip select to select a CTAR register.
SPI_PUSHR_CTAS used the lower 3 bits which would result in wrong bit values
if the chip selects 4/5 are used. For those chip selects SPI_CTAR even
calculated offsets of non-existing registers.
Signed-off-by: Alexander Stein
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
---
drivers/spi/spi-fsl-dspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'drivers/spi/spi-fsl-dspi.c')
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 448216025ce8..831ceb4a91f6 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -46,7 +46,7 @@
#define SPI_TCR 0x08
-#define SPI_CTAR(x) (0x0c + (x * 4))
+#define SPI_CTAR(x) (0x0c + (((x) & 0x3) * 4))
#define SPI_CTAR_FMSZ(x) (((x) & 0x0000000f) << 27)
#define SPI_CTAR_CPOL(x) ((x) << 26)
#define SPI_CTAR_CPHA(x) ((x) << 25)
@@ -70,7 +70,7 @@
#define SPI_PUSHR 0x34
#define SPI_PUSHR_CONT (1 << 31)
-#define SPI_PUSHR_CTAS(x) (((x) & 0x00000007) << 28)
+#define SPI_PUSHR_CTAS(x) (((x) & 0x00000003) << 28)
#define SPI_PUSHR_EOQ (1 << 27)
#define SPI_PUSHR_CTCNT (1 << 26)
#define SPI_PUSHR_PCS(x) (((1 << x) & 0x0000003f) << 16)
--
cgit v1.2.3