diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2012-12-17 16:36:57 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-12-19 10:27:22 +0100 |
commit | d723373013e9c37292f2ffcd747d7758df4550d8 (patch) | |
tree | 44c25cd2a81493122c921ed7674ca3c6b41c86e8 | |
parent | b6accb5e560c3b39e738fad619a140f6247d27c6 (diff) | |
download | barebox-d723373013e9c37292f2ffcd747d7758df4550d8.tar.gz barebox-d723373013e9c37292f2ffcd747d7758df4550d8.tar.xz |
nand: mxs: NO_SUBPAGE_WRITE flag was overwritten
It is not the chip, but this controller which cannot do subpage writes.
So, make sure we add the flag at the proper place, so it doesn't get
overwritten by flash detection anymore.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/nand/nand_mxs.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c index c4509d3dd6..bc345262ad 100644 --- a/drivers/mtd/nand/nand_mxs.c +++ b/drivers/mtd/nand/nand_mxs.c @@ -1217,7 +1217,6 @@ static int mxs_nand_probe(struct device_d *dev) mtd->parent = dev; nand->priv = nand_info; - nand->options |= NAND_NO_SUBPAGE_WRITE; nand->cmd_ctrl = mxs_nand_cmd_ctrl; @@ -1241,8 +1240,15 @@ static int mxs_nand_probe(struct device_d *dev) nand->ecc.bytes = 9; nand->ecc.size = 512; - /* Scan to find existence of the device */ - err = nand_scan(mtd, 1); + /* first scan to find the device and get the page size */ + err = nand_scan_ident(mtd, 1); + if (err) + goto err2; + + nand->options |= NAND_NO_SUBPAGE_WRITE; + + /* second phase scan */ + err = nand_scan_tail(mtd); if (err) goto err2; |