mtd: nand: omap: add field to indicate current ecc-scheme in 'struct omap_nand_info'
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Apr 5 02:59:03 EDT 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4e558072ef91f0ca681a74c3aef9d6a30c116f2a
Commit: 4e558072ef91f0ca681a74c3aef9d6a30c116f2a
Parent: 9a78bc83b4c31f67202b7b0a77fa25da732f44a3
Author: Pekon Gupta <pekon at ti.com>
AuthorDate: Tue Mar 18 18:56:42 2014 +0530
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Thu Mar 20 01:47:59 2014 -0700
mtd: nand: omap: add field to indicate current ecc-scheme in 'struct omap_nand_info'
Information of currently selected ECC scheme 'enum omap_ecc ecc_opt' should
available outside platform-data, so that single nand_chip->ecc callback can
support multiple ecc-scheme configurations.
Tested-by: Stefan Roese <sr at denx.de>
Signed-off-by: Pekon Gupta <pekon at ti.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/omap2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index bf642ce..403afa7 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -160,6 +160,7 @@ struct omap_nand_info {
int gpmc_cs;
unsigned long phys_base;
unsigned long mem_size;
+ enum omap_ecc ecc_opt;
struct completion comp;
struct dma_chan *dma;
int gpmc_irq_fifo;
@@ -1657,6 +1658,7 @@ static int omap_nand_probe(struct platform_device *pdev)
info->gpmc_cs = pdata->cs;
info->reg = pdata->reg;
info->of_node = pdata->of_node;
+ info->ecc_opt = pdata->ecc_opt;
mtd = &info->mtd;
mtd->priv = &info->nand;
mtd->name = dev_name(&pdev->dev);
@@ -1812,7 +1814,7 @@ static int omap_nand_probe(struct platform_device *pdev)
/* populate MTD interface based on ECC scheme */
nand_chip->ecc.layout = &omap_oobinfo;
ecclayout = &omap_oobinfo;
- switch (pdata->ecc_opt) {
+ switch (info->ecc_opt) {
case OMAP_ECC_HAM1_CODE_HW:
pr_info("nand: using OMAP_ECC_HAM1_CODE_HW\n");
nand_chip->ecc.mode = NAND_ECC_HW;
More information about the linux-mtd-cvs
mailing list