|
@@ -160,6 +160,7 @@ struct omap_nand_info {
|
|
int gpmc_cs;
|
|
int gpmc_cs;
|
|
unsigned long phys_base;
|
|
unsigned long phys_base;
|
|
unsigned long mem_size;
|
|
unsigned long mem_size;
|
|
|
|
+ enum omap_ecc ecc_opt;
|
|
struct completion comp;
|
|
struct completion comp;
|
|
struct dma_chan *dma;
|
|
struct dma_chan *dma;
|
|
int gpmc_irq_fifo;
|
|
int gpmc_irq_fifo;
|
|
@@ -1657,6 +1658,7 @@ static int omap_nand_probe(struct platform_device *pdev)
|
|
info->gpmc_cs = pdata->cs;
|
|
info->gpmc_cs = pdata->cs;
|
|
info->reg = pdata->reg;
|
|
info->reg = pdata->reg;
|
|
info->of_node = pdata->of_node;
|
|
info->of_node = pdata->of_node;
|
|
|
|
+ info->ecc_opt = pdata->ecc_opt;
|
|
mtd = &info->mtd;
|
|
mtd = &info->mtd;
|
|
mtd->priv = &info->nand;
|
|
mtd->priv = &info->nand;
|
|
mtd->name = dev_name(&pdev->dev);
|
|
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 */
|
|
/* populate MTD interface based on ECC scheme */
|
|
nand_chip->ecc.layout = &omap_oobinfo;
|
|
nand_chip->ecc.layout = &omap_oobinfo;
|
|
ecclayout = &omap_oobinfo;
|
|
ecclayout = &omap_oobinfo;
|
|
- switch (pdata->ecc_opt) {
|
|
|
|
|
|
+ switch (info->ecc_opt) {
|
|
case OMAP_ECC_HAM1_CODE_HW:
|
|
case OMAP_ECC_HAM1_CODE_HW:
|
|
pr_info("nand: using OMAP_ECC_HAM1_CODE_HW\n");
|
|
pr_info("nand: using OMAP_ECC_HAM1_CODE_HW\n");
|
|
nand_chip->ecc.mode = NAND_ECC_HW;
|
|
nand_chip->ecc.mode = NAND_ECC_HW;
|