diff options
author | Huang Shijie <b32955@freescale.com> | 2010-11-01 13:57:06 +0800 |
---|---|---|
committer | Scott Sweeny <scott.sweeny@timesys.com> | 2011-01-19 11:50:18 -0500 |
commit | dc02b6cbd615884347ce10a5a1747b8dcfa1c64a (patch) | |
tree | 0835dcbfda97da8061bda744ea77e92efa1422e9 /drivers/mtd | |
parent | 7c15a63ac1a4cad23b9dc500e4e360b9111e3501 (diff) |
ENGR00133178-6 NAND : add extra_init() hook for ONFI nand
ONFI nand works in asynchronous mode in normal case,
You have to do extra initialization to let it work in
DDR mode(synchronous mode).
so add extra initialization hook for ONFI nand.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c | 3 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c index 83f5086f37f3..765390638135 100644 --- a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c +++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c @@ -1726,6 +1726,9 @@ static int mil_scan_bbt(struct mtd_info *mtd) /* We use the reference implementation for bad block management. */ + if (nfc->extra_init) + nfc->extra_init(this); + error = nand_default_bbt(mtd); if (error) diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h index 9b0074532917..561dfb22d4c2 100644 --- a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h +++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h @@ -535,6 +535,7 @@ struct nfc_hal { /* Configuration functions. */ int (*init) (struct gpmi_nfc_data *); + int (*extra_init) (struct gpmi_nfc_data *); int (*set_geometry)(struct gpmi_nfc_data *); int (*set_timing) (struct gpmi_nfc_data *, const struct gpmi_nfc_timing *); |