summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-06-25 14:43:32 +0200
committerTom Rini <trini@ti.com>2015-01-13 11:51:23 -0500
commitc316f577b4b72d1a1aeb559e9b3fad20808f1ffd (patch)
tree9923bfbaeae9a43482ee6838dcb0cd31a7d36e6d /include/linux
parent92fa7f53f1f3f03296f8ffb14bdf1baefab83368 (diff)
mtd: OMAP: Enable GPMC prefetch mode
Enable GPMC's prefetch feature for NAND access. This speeds up NAND read access a lot by pre-fetching contents in the background and reading them through the FIFO address. The current implementation has two limitations: a) it only works in 8-bit mode b) it only supports read access Both is easily fixable by someone who has hardware to implement it. Note that U-Boot code uses non word-aligned buffers to read data into, and request read lengths that are not multiples of 4, so both partial buffers (head and tail) have to be addressed. Tested on AM335x hardware. Tested-by: Guido Martínez <guido@vanguardiasur.com.ar> Reviewed-by: Guido Martínez <guido@vanguardiasur.com.ar> Signed-off-by: Daniel Mack <zonque@gmail.com> [trini: Make apply again, use 'cs' fix pointed out by Guido] Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/omap_gpmc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/mtd/omap_gpmc.h b/include/linux/mtd/omap_gpmc.h
index 9a8658257f..6cbae45022 100644
--- a/include/linux/mtd/omap_gpmc.h
+++ b/include/linux/mtd/omap_gpmc.h
@@ -66,7 +66,11 @@ struct gpmc {
u32 status; /* 0x54 */
u8 res5[0x8]; /* 0x58 */
struct gpmc_cs cs[8]; /* 0x60, 0x90, .. */
- u8 res6[0x14]; /* 0x1E0 */
+ u32 prefetch_config1; /* 0x1E0 */
+ u32 prefetch_config2; /* 0x1E4 */
+ u32 res6; /* 0x1E8 */
+ u32 prefetch_control; /* 0x1EC */
+ u32 prefetch_status; /* 0x1F0 */
u32 ecc_config; /* 0x1F4 */
u32 ecc_control; /* 0x1F8 */
u32 ecc_size_config; /* 0x1FC */