linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] mtd: fsl-quadspi: Call fsl_qspi_set_base_addr after nor_size is set
@ 2015-01-07 10:32 Fabio Estevam
  2015-01-07 10:32 ` [PATCH v3 2/2] mtd: fsl-quadspi: Fix module unbound Fabio Estevam
  2015-01-09 20:26 ` [PATCH v3 1/2] mtd: fsl-quadspi: Call fsl_qspi_set_base_addr after nor_size is set Brian Norris
  0 siblings, 2 replies; 17+ messages in thread
From: Fabio Estevam @ 2015-01-07 10:32 UTC (permalink / raw)
  To: computersforpeace; +Cc: Fabio Estevam, linux-mtd, shijie8

From: Fabio Estevam <fabio.estevam@freescale.com>

fsl_qspi_set_base_addr() uses nor_size information, but it is called prior to
the initialization of nor_size.

Fix it by calling fsl_qspi_set_base_addr() after nor_size is configured.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v2:
- Newly introduced in this version

 drivers/mtd/spi-nor/fsl-quadspi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 39763b9..20cffd2 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -897,9 +897,6 @@ static int fsl_qspi_probe(struct platform_device *pdev)
 		if (ret < 0)
 			goto map_failed;
 
-		/* set the chip address for READID */
-		fsl_qspi_set_base_addr(q, nor);
-
 		ret = spi_nor_scan(nor, modalias, SPI_NOR_QUAD);
 		if (ret)
 			goto map_failed;
@@ -917,6 +914,9 @@ static int fsl_qspi_probe(struct platform_device *pdev)
 			fsl_qspi_set_map_addr(q);
 		}
 
+		/* set the chip address for READID */
+		fsl_qspi_set_base_addr(q, nor);
+
 		/*
 		 * The TX FIFO is 64 bytes in the Vybrid, but the Page Program
 		 * may writes 265 bytes per time. The write is working in the
-- 
1.9.1

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

end of thread, other threads:[~2015-01-15 16:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 10:32 [PATCH v3 1/2] mtd: fsl-quadspi: Call fsl_qspi_set_base_addr after nor_size is set Fabio Estevam
2015-01-07 10:32 ` [PATCH v3 2/2] mtd: fsl-quadspi: Fix module unbound Fabio Estevam
2015-01-09 20:17   ` Brian Norris
2015-01-13 15:35     ` Fabio Estevam
2015-01-13 18:51       ` Brian Norris
2015-01-13 21:45         ` Fabio Estevam
2015-01-13 21:58           ` Brian Norris
2015-01-13 22:04             ` Fabio Estevam
2015-01-13 22:05             ` Frank.Li
2015-01-14  1:04               ` Huang Shijie
2015-01-14 20:26               ` Fabio Estevam
2015-01-14 22:53                 ` Brian Norris
2015-01-15 15:46                   ` Han Xu
2015-01-15 16:34             ` Han Xu
2015-01-15 16:45               ` Fabio Estevam
2015-01-09 20:26 ` [PATCH v3 1/2] mtd: fsl-quadspi: Call fsl_qspi_set_base_addr after nor_size is set Brian Norris
2015-01-12  1:48   ` Huang Shijie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).