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>
This commit is contained in:
Vipin Kumar
2012-03-14 11:47:17 +05:30
committed by David Woodhouse
parent 712c4add03
commit 604e75444f
2 changed files with 61 additions and 0 deletions

View File

@@ -141,6 +141,11 @@ struct fsmc_nand_timings {
uint8_t tset;
};
enum access_mode {
USE_DMA_ACCESS = 1,
USE_WORD_ACCESS,
};
/**
* fsmc_nand_platform_data - platform specific NAND controller config
* @partitions: partition table for the platform, use a default fallback
@@ -164,6 +169,7 @@ struct fsmc_nand_platform_data {
/* CLE, ALE offsets */
unsigned long cle_off;
unsigned long ale_off;
enum access_mode mode;
void (*select_bank)(uint32_t bank, uint32_t busw);
};