Commit 6e1f9708 authored by Sascha Hauer's avatar Sascha Hauer Committed by Boris Brezillon

mtd: nand: Expose data interface for ONFI mode 0

The nand layer will need ONFI mode 0 to use it as timing mode
before and right after reset.
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent b88730ad
...@@ -298,3 +298,14 @@ int onfi_init_data_interface(struct nand_chip *chip, ...@@ -298,3 +298,14 @@ int onfi_init_data_interface(struct nand_chip *chip,
return 0; return 0;
} }
EXPORT_SYMBOL(onfi_init_data_interface); EXPORT_SYMBOL(onfi_init_data_interface);
/**
* nand_get_default_data_interface - [NAND Interface] Retrieve NAND
* data interface for mode 0. This is used as default timing after
* reset.
*/
const struct nand_data_interface *nand_get_default_data_interface(void)
{
return &onfi_sdr_timings[0];
}
EXPORT_SYMBOL(nand_get_default_data_interface);
...@@ -1154,6 +1154,8 @@ static inline int jedec_feature(struct nand_chip *chip) ...@@ -1154,6 +1154,8 @@ static inline int jedec_feature(struct nand_chip *chip)
/* get timing characteristics from ONFI timing mode. */ /* get timing characteristics from ONFI timing mode. */
const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode); const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode);
/* get data interface from ONFI timing mode 0, used after reset. */
const struct nand_data_interface *nand_get_default_data_interface(void);
int nand_check_erased_ecc_chunk(void *data, int datalen, int nand_check_erased_ecc_chunk(void *data, int datalen,
void *ecc, int ecclen, void *ecc, int ecclen,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment