Merge tag 'nand/for-4.10' of github.com:linux-nand/linux
From Boris Brezillon:
"""
This pull request contains the following notable changes:
- new tango NAND controller driver
- new ox820 NAND controller driver
- addition of a new full-ID entry in the nand_ids table
- rework of the s3c240 driver to support DT
- extension of the nand_sdr_timings to expose tCCS, tPROG and tR
- addition of a new flag to ask the core to wait for tCCS when sending
a RNDIN/RNDOUT command
- addition of a new flag to ask the core to let the controller driver
send the READ/PROGPAGE command
This pull request also contains minor fixes/cleanup/cosmetic changes:
- properly support 512 ECC step size in the sunxi driver
- improve the error messages in the pxa probe path
- fix module autoload in the omap2 driver
- cleanup of several nand drivers to return nand_scan{_tail}() error
code instead of returning -EIO
- various cleanups in the denali driver
- cleanups in the ooblayout handling (MTD core)
- fix an error check in nandsim
"""
This commit is contained in:
@@ -142,6 +142,12 @@ enum nand_ecc_algo {
|
||||
*/
|
||||
#define NAND_ECC_GENERIC_ERASED_CHECK BIT(0)
|
||||
#define NAND_ECC_MAXIMIZE BIT(1)
|
||||
/*
|
||||
* If your controller already sends the required NAND commands when
|
||||
* reading or writing a page, then the framework is not supposed to
|
||||
* send READ0 and SEQIN/PAGEPROG respectively.
|
||||
*/
|
||||
#define NAND_ECC_CUSTOM_PAGE_ACCESS BIT(2)
|
||||
|
||||
/* Bit mask for flags passed to do_nand_read_ecc */
|
||||
#define NAND_GET_DEVICE 0x80
|
||||
@@ -186,6 +192,7 @@ enum nand_ecc_algo {
|
||||
/* Macros to identify the above */
|
||||
#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
|
||||
#define NAND_HAS_SUBPAGE_READ(chip) ((chip->options & NAND_SUBPAGE_READ))
|
||||
#define NAND_HAS_SUBPAGE_WRITE(chip) !((chip)->options & NAND_NO_SUBPAGE_WRITE)
|
||||
|
||||
/* Non chip related options */
|
||||
/* This option skips the bbt scan during initialization. */
|
||||
@@ -210,6 +217,16 @@ enum nand_ecc_algo {
|
||||
*/
|
||||
#define NAND_USE_BOUNCE_BUFFER 0x00100000
|
||||
|
||||
/*
|
||||
* In case your controller is implementing ->cmd_ctrl() and is relying on the
|
||||
* default ->cmdfunc() implementation, you may want to let the core handle the
|
||||
* tCCS delay which is required when a column change (RNDIN or RNDOUT) is
|
||||
* requested.
|
||||
* If your controller already takes care of this delay, you don't need to set
|
||||
* this flag.
|
||||
*/
|
||||
#define NAND_WAIT_TCCS 0x00200000
|
||||
|
||||
/* Options set by nand scan */
|
||||
/* Nand scan has allocated controller struct */
|
||||
#define NAND_CONTROLLER_ALLOC 0x80000000
|
||||
@@ -558,6 +575,11 @@ struct nand_ecc_ctrl {
|
||||
int page);
|
||||
};
|
||||
|
||||
static inline int nand_standard_page_accessors(struct nand_ecc_ctrl *ecc)
|
||||
{
|
||||
return !(ecc->options & NAND_ECC_CUSTOM_PAGE_ACCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* struct nand_buffers - buffer structure for read/write
|
||||
* @ecccalc: buffer pointer for calculated ECC, size is oobsize.
|
||||
@@ -584,6 +606,10 @@ struct nand_buffers {
|
||||
*
|
||||
* All these timings are expressed in picoseconds.
|
||||
*
|
||||
* @tBERS_max: Block erase time
|
||||
* @tCCS_min: Change column setup time
|
||||
* @tPROG_max: Page program time
|
||||
* @tR_max: Page read time
|
||||
* @tALH_min: ALE hold time
|
||||
* @tADL_min: ALE to data loading time
|
||||
* @tALS_min: ALE setup time
|
||||
@@ -621,6 +647,10 @@ struct nand_buffers {
|
||||
* @tWW_min: WP# transition to WE# low
|
||||
*/
|
||||
struct nand_sdr_timings {
|
||||
u32 tBERS_max;
|
||||
u32 tCCS_min;
|
||||
u32 tPROG_max;
|
||||
u32 tR_max;
|
||||
u32 tALH_min;
|
||||
u32 tADL_min;
|
||||
u32 tALS_min;
|
||||
|
||||
Reference in New Issue
Block a user