Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266261
| From | Vignesh R <vigneshr@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 3/5] mtd: devices: m25p80: add support for mmap read request |
| Date | 2015-11-10 06:40 +0100 |
| Message-ID | <qt9OW-TO-9@gated-at.bofh.it> (permalink) |
| References | <qt9OW-TO-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Certain spi controllers may support memory mapped interface to read from m25p80 type flash devices. This interface provides better read performance than regular SPI interface. Call spi_mtd_mmap_read() interface, if supported, to make use of memory-mapped interface. Signed-off-by: Vignesh R <vigneshr@ti.com> --- drivers/mtd/devices/m25p80.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index fe9ceb7b5405..7ef0c5009ead 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -131,6 +131,11 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len, /* convert the dummy cycles to the number of bytes */ dummy /= 8; + if (spi_mmap_read_supported(spi)) + return spi_mtd_mmap_read(spi, from, len, retlen, buf, + nor->read_opcode, + nor->addr_width, dummy); + spi_message_init(&m); memset(t, 0, (sizeof t)); -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v3 3/5] mtd: devices: m25p80: add support for mmap read request Vignesh R <vigneshr@ti.com> - 2015-11-10 06:40 +0100
csiph-web