From 66891566ccf72c19c3c25182f98eda4dc2a8ad3e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 18 Jul 2013 15:10:50 +0200 Subject: 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 --- drivers/mtd/nand/nand_omap_gpmc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/mtd/nand/nand_omap_gpmc.c') 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; -- cgit v1.2.3