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:

committed by
David Woodhouse

parent
712c4add03
commit
604e75444f
@@ -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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user