summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorHou Zhiqiang <B48286@freescale.com>2014-11-26 11:03:13 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:41:35 (GMT)
commitba52d00a54866f4d4e70c4a1a2a4288f4783ece8 (patch)
tree4fe04fbfbdb906457597a29dba17040042b7527b /drivers/mtd
parentb32b856075821a4195286eedd5b19c40758accac (diff)
downloadlinux-fsl-qoriq-ba52d00a54866f4d4e70c4a1a2a4288f4783ece8.tar.xz
mtd: m25p80: Initialize the addr_width field of spi_message
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@freescale.com> Change-Id: I6c3afe1ceab7d792ceaba0a2c94d2baac1ecbe56 Reviewed-on: http://git.am.freescale.net:8181/24585 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/m25p80.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 1839730..fa5e463 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;
@@ -140,6 +141,7 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len,
return ret;
spi_message_init(&m);
+ m.addr_width = flash->spi_nor.addr_width;
memset(t, 0, (sizeof t));
flash->command[0] = nor->read_opcode;