summaryrefslogtreecommitdiff
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2014-04-24 17:53:52 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 11:02:32 -0600
commite231d0400a1d8cbfcb7a974d897d32ce0112848c (patch)
treec77b8443cea03a3da9e9c67c2f04791bbf6e2182 /drivers/mtd/devices
parent516db20f24938aa5482334d2726d70e9935ed32b (diff)
ENGR00318895-3 mtd: spi-nor: add a new field for spi_nor{}
We need the SPI NOR child node to store some specific features, such as the dummy cycles for the DDR Quad read. But now, we only have the @dev field in the spi_nor{}. The @dev may points to a spi_device{} for m25p80, while it may points to a platform_deivice{} for the SPI NOR controller, such as fsl_quadspi.c. It is not convenient for us to get come information from the SPI NOR flash. This patch adds a new field @np to spi_nor{}, it points to the child node for the SPI NOR flash. Signed-off-by: Huang Shijie <b32955@freescale.com> (cherry picked from commit 9b4c87e0756093a04eb0948396928c8adbd1ee08)
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/m25p80.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 3af137f49ac9..318ff8d9706d 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -201,6 +201,7 @@ static int m25p_probe(struct spi_device *spi)
nor->read_reg = m25p80_read_reg;
nor->dev = &spi->dev;
+ nor->np = spi->dev.of_node;
nor->mtd = &flash->mtd;
nor->priv = flash;