[PATCH 2/3] mtd: m25p80: Initialize the addr_width field of spi_message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hou Zhiqiang <B48286@xxxxxxxxxxxxx>

Add the addr_width information of spi_nor delivery to SPI controller.

For the Freescale eSPI controller, the address width is needed to do
the correct operations.

Signed-off-by: Hou Zhiqiang <B48286@xxxxxxxxxxxxx>
---
 drivers/mtd/devices/m25p80.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 7c8b169..0ae72a0 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -85,6 +85,7 @@ static void m25p80_write(struct spi_nor *nor, loff_t to, size_t len,
 	int cmd_sz = m25p_cmdsz(nor);
 
 	spi_message_init(&m);
+	m.addr_width = flash->spi_nor.addr_width;
 
 	if (nor->program_opcode == SPINOR_OP_AAI_WP && nor->sst_write_second)
 		cmd_sz = 1;
@@ -134,6 +135,7 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len,
 	dummy /= 8;
 
 	spi_message_init(&m);
+	m.addr_width = flash->spi_nor.addr_width;
 	memset(t, 0, (sizeof t));
 
 	flash->command[0] = nor->read_opcode;
-- 
2.1.0.27.g96db324

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux