mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream
@ 2017-04-18 14:46 Steffen Trumtrar
  2017-04-18 14:46 ` [PATCH 2/2] ARM: socfpga: dtsi: use upstream node Steffen Trumtrar
  2017-04-19  9:52 ` [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Steffen Trumtrar @ 2017-04-18 14:46 UTC (permalink / raw)
  To: barebox; +Cc: Steffen Trumtrar

Upstream devicetree bindings where changed to use "cdns,is-decoded-cs"
instead of "external-decoder". Use it.
Also, get rid of the clock-names "qspi_clk" dependency.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 arch/arm/mach-socfpga/xload.c         |  2 +-
 drivers/mtd/spi-nor/cadence-quadspi.c | 15 ++++++---------
 include/platform_data/cadence_qspi.h  |  2 +-
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-socfpga/xload.c b/arch/arm/mach-socfpga/xload.c
index d24944bbb85e..d7997a6ac42c 100644
--- a/arch/arm/mach-socfpga/xload.c
+++ b/arch/arm/mach-socfpga/xload.c
@@ -51,7 +51,7 @@ static void socfpga_mmc_init(void)
 
 #if defined(CONFIG_SPI_CADENCE_QUADSPI)
 static struct cadence_qspi_platform_data qspi_pdata = {
-	.ext_decoder = 0,
+	.is_decoded_cs = 0,
 	.fifo_depth = 128,
 };
 
diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c
index 680f30f707b4..626966818746 100644
--- a/drivers/mtd/spi-nor/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/cadence-quadspi.c
@@ -58,7 +58,7 @@ struct cqspi_st {
 	unsigned int	irq_mask;
 	int		current_cs;
 	unsigned int	master_ref_clk_hz;
-	unsigned int	ext_decoder;
+	unsigned int	is_decoded_cs;
 	unsigned int	fifo_depth;
 	struct cqspi_flash_pdata f_pdata[CQSPI_MAX_CHIPSELECT];
 	bool no_reconfig;
@@ -903,7 +903,7 @@ static void cqspi_switch_cs(struct cqspi_st *cqspi, unsigned int cs)
 	writel(reg, reg_base + CQSPI_REG_SIZE);
 
 	/* configure the chip select */
-	cqspi_chipselect(cqspi, cs, cqspi->ext_decoder);
+	cqspi_chipselect(cqspi, cs, cqspi->is_decoded_cs);
 
 	cqspi_controller_enable(cqspi);
 }
@@ -1020,12 +1020,9 @@ static int cqspi_parse_dt(struct cqspi_st *cqspi)
 	struct device_node *np = cqspi->dev->device_node;
 	struct device_d *dev = cqspi->dev;
 
-	if (of_property_read_u32(np, "ext-decoder", &cqspi->ext_decoder)) {
-		dev_err(dev, "couldn't determine ext-decoder\n");
-		return -ENXIO;
-	}
+	cqspi->is_decoded_cs = of_property_read_bool(np, "cdns,is-decoded-cs");
 
-	if (of_property_read_u32(np, "fifo-depth", &cqspi->fifo_depth)) {
+	if (of_property_read_u32(np, "cdns,fifo-depth", &cqspi->fifo_depth)) {
 		dev_err(dev, "couldn't determine fifo-depth\n");
 		return -ENXIO;
 	}
@@ -1123,7 +1120,7 @@ static int cqspi_probe(struct device_d *dev)
 	dev->priv = cqspi;
 
 	if (pdata) {
-		cqspi->ext_decoder = pdata->ext_decoder;
+		cqspi->is_decoded_cs = pdata->is_decoded_cs;
 		cqspi->fifo_depth = pdata->fifo_depth;
 	} else {
 		ret = cqspi_parse_dt(cqspi);
@@ -1133,7 +1130,7 @@ static int cqspi_probe(struct device_d *dev)
 		}
 	}
 
-	cqspi->qspi_clk = clk_get(dev, "qspi_clk");
+	cqspi->qspi_clk = clk_get(dev, NULL);
 	if (IS_ERR(cqspi->qspi_clk)) {
 		dev_err(dev, "cannot get qspi clk\n");
 		ret = PTR_ERR(cqspi->qspi_clk);
diff --git a/include/platform_data/cadence_qspi.h b/include/platform_data/cadence_qspi.h
index 4930edce507e..ad1a680c9f95 100644
--- a/include/platform_data/cadence_qspi.h
+++ b/include/platform_data/cadence_qspi.h
@@ -2,7 +2,7 @@
 #define __INCLUDE_PLATFORM_DATA_CADENCE_QSPI_H
 
 struct cadence_qspi_platform_data {
-	unsigned int ext_decoder;
+	unsigned int is_decoded_cs;
 	unsigned int fifo_depth;
 };
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ARM: socfpga: dtsi: use upstream node
  2017-04-18 14:46 [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream Steffen Trumtrar
@ 2017-04-18 14:46 ` Steffen Trumtrar
  2017-04-19  9:52 ` [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Steffen Trumtrar @ 2017-04-18 14:46 UTC (permalink / raw)
  To: barebox; +Cc: Steffen Trumtrar

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 arch/arm/dts/socfpga.dtsi | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi
index 274c491804e0..b3a7f69ffe09 100644
--- a/arch/arm/dts/socfpga.dtsi
+++ b/arch/arm/dts/socfpga.dtsi
@@ -10,22 +10,6 @@
 	aliases {
 		mmc0 = &mmc;
 	};
-
-	soc {
-		qspi: spi@ff705000 {
-			compatible = "cdns,qspi-nor";
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <0xff705000 0x1000>,
-			      <0xffa00000 0x1000>;
-			interrupts = <0 151 4>;
-			ext-decoder = <0>;  /* external decoder */
-			fifo-depth = <128>;
-			clocks = <&qspi_clk>;
-			clock-names = "qspi_clk";
-			status = "disabled";
-		};
-       };
 };
 &osc2 {
 	clock-frequency = <0>;
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream
  2017-04-18 14:46 [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream Steffen Trumtrar
  2017-04-18 14:46 ` [PATCH 2/2] ARM: socfpga: dtsi: use upstream node Steffen Trumtrar
@ 2017-04-19  9:52 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2017-04-19  9:52 UTC (permalink / raw)
  To: Steffen Trumtrar; +Cc: barebox

On Tue, Apr 18, 2017 at 04:46:14PM +0200, Steffen Trumtrar wrote:
> Upstream devicetree bindings where changed to use "cdns,is-decoded-cs"
> instead of "external-decoder". Use it.
> Also, get rid of the clock-names "qspi_clk" dependency.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>  arch/arm/mach-socfpga/xload.c         |  2 +-
>  drivers/mtd/spi-nor/cadence-quadspi.c | 15 ++++++---------
>  include/platform_data/cadence_qspi.h  |  2 +-
>  3 files changed, 8 insertions(+), 11 deletions(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-19  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 14:46 [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream Steffen Trumtrar
2017-04-18 14:46 ` [PATCH 2/2] ARM: socfpga: dtsi: use upstream node Steffen Trumtrar
2017-04-19  9:52 ` [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox