[PATCH v3 1/2] mtd: fsl-quadspi: Call fsl_qspi_set_base_addr after nor_size is set
Fabio Estevam
festevam at gmail.com
Wed Jan 7 02:32:06 PST 2015
From: Fabio Estevam <fabio.estevam at 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 at 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
More information about the linux-mtd
mailing list