diff options
author | John Crispin <john@phrozen.org> | 2016-12-25 20:11:34 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-08-05 08:46:36 +0200 |
commit | 74d00a8c3849c1340efd713eb94b786e304c201f (patch) | |
tree | de481743de61c34da96ab5f9dba3af3edcfb8260 /target/linux/generic/pending-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch | |
parent | de350550ef648d9728351b986b0516fa29465c45 (diff) | |
download | mtk-20170518-74d00a8c3849c1340efd713eb94b786e304c201f.zip mtk-20170518-74d00a8c3849c1340efd713eb94b786e304c201f.tar.gz mtk-20170518-74d00a8c3849c1340efd713eb94b786e304c201f.tar.bz2 |
kernel: split patches folder up into backport, pending and hack folders
* properly format/comment all patches
* merge debloat patches
* merge Kconfig patches
* merge swconfig patches
* merge hotplug patches
* drop 200-fix_localversion.patch - upstream
* drop 222-arm_zimage_none.patch - unused
* drop 252-mv_cesa_depends.patch - no longer required
* drop 410-mtd-move-forward-declaration-of-struct-mtd_info.patch - unused
* drop 661-fq_codel_keep_dropped_stats.patch - outdated
* drop 702-phy_add_aneg_done_function.patch - upstream
* drop 840-rtc7301.patch - unused
* drop 841-rtc_pt7c4338.patch - upstream
* drop 921-use_preinit_as_init.patch - unused
* drop spio-gpio-old and gpio-mmc - unused
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/generic/pending-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch')
-rw-r--r-- | target/linux/generic/pending-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/generic/pending-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch b/target/linux/generic/pending-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch new file mode 100644 index 0000000..c4c7e6e --- /dev/null +++ b/target/linux/generic/pending-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch @@ -0,0 +1,46 @@ +From 08922f644878c9163ada8df3ef9def89be1d5e90 Mon Sep 17 00:00:00 2001 +From: Vignesh R <vigneshr@ti.com> +Date: Tue, 29 Mar 2016 11:16:17 +0530 +Subject: [PATCH] mtd: devices: m25p80: add support for mmap read request + +Certain SPI controllers may provide accelerated hardware interface to +read from m25p80 type flash devices in order to provide better read +performance. SPI core supports such devices with spi_flash_read() API. +Call spi_flash_read(), if supported, to make use of such interface. + +Signed-off-by: Vignesh R <vigneshr@ti.com> +[Brian: add memset()] +Signed-off-by: Brian Norris <computersforpeace@gmail.com> +--- + +--- a/drivers/mtd/devices/m25p80.c ++++ b/drivers/mtd/devices/m25p80.c +@@ -131,6 +131,28 @@ static int m25p80_read(struct spi_nor *n + /* convert the dummy cycles to the number of bytes */ + dummy /= 8; + ++ if (spi_flash_read_supported(spi)) { ++ struct spi_flash_read_message msg; ++ int ret; ++ ++ memset(&msg, 0, sizeof(msg)); ++ ++ msg.buf = buf; ++ msg.from = from; ++ msg.len = len; ++ msg.read_opcode = nor->read_opcode; ++ msg.addr_width = nor->addr_width; ++ msg.dummy_bytes = dummy; ++ /* TODO: Support other combinations */ ++ msg.opcode_nbits = SPI_NBITS_SINGLE; ++ msg.addr_nbits = SPI_NBITS_SINGLE; ++ msg.data_nbits = m25p80_rx_nbits(nor); ++ ++ ret = spi_flash_read(spi, &msg); ++ *retlen = msg.retlen; ++ return ret; ++ } ++ + spi_message_init(&m); + memset(t, 0, (sizeof t)); + |