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 5021ddf03f6..ebc4d1fd76e 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-70-g09d2
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 ebc4d1fd76e..1cdef8e0876 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-70-g09d2
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-cpm.c | 14 +++++++-------
drivers/spi/spi-fsl-dspi.c | 18 +++++++++---------
drivers/spi/spi-fsl-espi.c | 12 ++++++------
drivers/spi/spi-fsl-lib.c | 6 +++---
drivers/spi/spi-fsl-spi.c | 22 +++++++++++-----------
5 files changed, 36 insertions(+), 36 deletions(-)
(limited to 'drivers/spi/spi-fsl-dspi.c')
diff --git a/drivers/spi/spi-fsl-cpm.c b/drivers/spi/spi-fsl-cpm.c
index 54b06376f03..c5dd20beee2 100644
--- a/drivers/spi/spi-fsl-cpm.c
+++ b/drivers/spi/spi-fsl-cpm.c
@@ -15,17 +15,17 @@
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
-#include
-#include
-#include
-#include
-#include
-#include
#include
#include
+#include
+#include
+#include
+#include
+#include
+#include
-#include "spi-fsl-lib.h"
#include "spi-fsl-cpm.h"
+#include "spi-fsl-lib.h"
#include "spi-fsl-spi.h"
/* CPM1 and CPM2 are mutually exclusive. */
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 5021ddf03f6..63c3859d24c 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"
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 8ebd724e4c5..68b4254069c 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -8,19 +8,19 @@
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
-#include
#include
-#include
-#include
-#include
+#include
#include
+#include
+#include
+#include
#include
#include
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include "spi-fsl-lib.h"
diff --git a/drivers/spi/spi-fsl-lib.c b/drivers/spi/spi-fsl-lib.c
index e0b773fc29c..5ddb5b098e4 100644
--- a/drivers/spi/spi-fsl-lib.c
+++ b/drivers/spi/spi-fsl-lib.c
@@ -16,10 +16,10 @@
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
-#include
-#include
-#include
#include
+#include
+#include
+#include
#include
#include
#include
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 9452f674099..c15a34ba71f 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -19,25 +19,25 @@
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
-#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
+#include
+#include
+#include
+#include
+#include
#include "spi-fsl-lib.h"
#include "spi-fsl-cpm.h"
--
cgit v1.2.3-70-g09d2
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 448216025ce..831ceb4a91f 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-70-g09d2