diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-18 15:10:50 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-23 16:25:13 +0200 |
commit | 66891566ccf72c19c3c25182f98eda4dc2a8ad3e (patch) | |
tree | 354cfc51aaba34cb14ba5802d8a60cb60c2cc91c /drivers/mtd/nand/nand_omap_gpmc.c | |
parent | 69f3d6c93b814c3464dea57538b90552de14caf4 (diff) | |
download | barebox-66891566ccf72c19c3c25182f98eda4dc2a8ad3e.tar.gz barebox-66891566ccf72c19c3c25182f98eda4dc2a8ad3e.tar.xz |
mtd: nand: update to v3.11-rc1
This updates the NAND stuff to Linux-3.11-rc1. It is synchronized
as best as we can get:
- locks removed
- The splitting in different files we had to better support different
features has been dropped. Instead this is now done mostly with the
use of __maybe_unused
Some barebox adjustments are forward ported, like:
- Allow partial page writes
- Optionally allow to erase bad blocks
- check for all_ff before writing a page
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/nand_omap_gpmc.c')
-rw-r--r-- | drivers/mtd/nand/nand_omap_gpmc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c index 9c1f3d7669..1b98a4e7e6 100644 --- a/drivers/mtd/nand/nand_omap_gpmc.c +++ b/drivers/mtd/nand/nand_omap_gpmc.c @@ -697,7 +697,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd, * generate dummy eccs for the unprotected oob area. */ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd, - struct nand_chip *chip, uint8_t *buf) + struct nand_chip *chip, uint8_t *buf, int oob_required, int page) { struct gpmc_nand_info *oinfo = chip->priv; int dev_width = chip->options & NAND_BUSWIDTH_16 ? GPMC_ECC_CONFIG_ECC16B : 0; @@ -886,7 +886,7 @@ static int omap_gpmc_eccmode_set(struct device_d *dev, struct param_d *param, co return omap_gpmc_eccmode(oinfo, i); } -static int gpmc_set_buswidth(struct mtd_info *mtd, struct nand_chip *chip, int buswidth) +static int gpmc_set_buswidth(struct nand_chip *chip, int buswidth) { struct gpmc_nand_info *oinfo = chip->priv; @@ -1007,8 +1007,6 @@ static int gpmc_nand_probe(struct device_d *pdev) nand->options |= NAND_OWN_BUFFERS; nand->buffers = xzalloc(sizeof(*nand->buffers)); - nand->set_buswidth = gpmc_set_buswidth; - /* State my controller */ nand->controller = &oinfo->controller; @@ -1031,11 +1029,13 @@ static int gpmc_nand_probe(struct device_d *pdev) mdelay(1); /* first scan to find the device and get the page size */ - if (nand_scan_ident(minfo, 1)) { + if (nand_scan_ident(minfo, 1, NULL)) { err = -ENXIO; goto out_release_mem; } + gpmc_set_buswidth(nand, nand->options & NAND_BUSWIDTH_16); + if (nand->options & NAND_BUSWIDTH_16) { lsp = &ecc_sp_x16; llp = &ecc_lp_x16; |