aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorVipin Kumar <vipin.kumar@st.com>2012-03-14 02:17:17 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 20:00:14 -0400
commit604e75444fa82cfdcba339e3bd4da1dfd6947539 (patch)
tree44e3c2dd6ce4e9ef871ca5dd9f74fa197f655b2d /include/linux/mtd
parent712c4add03277197168210bb628b8273e36adf76 (diff)
mtd: nand/fsmc: Access the NAND device word by word whenever possible
The default way of accessing nand device is using the nand width. This means that 8bit devices are using u8 * and 16bit devices are accessed using u16 *. This results in a non-optimal performance since the FSMC is designed to translate the normal word accesses into device width based accesses. This patch implements read_buf and write_buf callbacks using word by word accesses. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/fsmc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
index c4ac07a19691..1edd2b3ac38e 100644
--- a/include/linux/mtd/fsmc.h
+++ b/include/linux/mtd/fsmc.h
@@ -141,6 +141,11 @@ struct fsmc_nand_timings {
141 uint8_t tset; 141 uint8_t tset;
142}; 142};
143 143
144enum access_mode {
145 USE_DMA_ACCESS = 1,
146 USE_WORD_ACCESS,
147};
148
144/** 149/**
145 * fsmc_nand_platform_data - platform specific NAND controller config 150 * fsmc_nand_platform_data - platform specific NAND controller config
146 * @partitions: partition table for the platform, use a default fallback 151 * @partitions: partition table for the platform, use a default fallback
@@ -164,6 +169,7 @@ struct fsmc_nand_platform_data {
164 /* CLE, ALE offsets */ 169 /* CLE, ALE offsets */
165 unsigned long cle_off; 170 unsigned long cle_off;
166 unsigned long ale_off; 171 unsigned long ale_off;
172 enum access_mode mode;
167 173
168 void (*select_bank)(uint32_t bank, uint32_t busw); 174 void (*select_bank)(uint32_t bank, uint32_t busw);
169}; 175};