From ba52d00a54866f4d4e70c4a1a2a4288f4783ece8 Mon Sep 17 00:00:00 2001 From: Hou Zhiqiang Date: Wed, 26 Nov 2014 19:03:13 +0800 Subject: 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 Change-Id: I6c3afe1ceab7d792ceaba0a2c94d2baac1ecbe56 Reviewed-on: http://git.am.freescale.net:8181/24585 Tested-by: Review Code-CDREVIEW Reviewed-by: Mingkai Hu Reviewed-by: Richard Schmitt 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; -- cgit v0.10.2