diff options
author | Wu, Josh <Josh.wu@atmel.com> | 2015-04-02 02:13:47 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-04-05 20:47:56 -0400 |
commit | 41c7540d0c4e362212845aa2258c15aaa878665f (patch) | |
tree | dc1a70771a9ecae9d104feca2478a8d09bcc77d9 | |
parent | 477478aedc8bdf1925785835609bc7e790f69aef (diff) |
mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
if atmel,pmecc-lookup-table-offset is not found in DT node, we don't
need to map the ROM table as we will build a runtime gf table anyway.
Reported-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 0361c1992673..46010bd895b1 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -1204,14 +1204,14 @@ static int atmel_pmecc_nand_init_params(struct platform_device *pdev, | |||
1204 | goto err; | 1204 | goto err; |
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3); | 1207 | if (!host->has_no_lookup_table) { |
1208 | host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev, regs_rom); | 1208 | regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3); |
1209 | if (IS_ERR(host->pmecc_rom_base)) { | 1209 | host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev, |
1210 | if (!host->has_no_lookup_table) | 1210 | regs_rom); |
1211 | /* Don't display the information again */ | 1211 | if (IS_ERR(host->pmecc_rom_base)) { |
1212 | dev_err(host->dev, "Can not get I/O resource for ROM, will build a lookup table in runtime!\n"); | 1212 | dev_err(host->dev, "Can not get I/O resource for ROM, will build a lookup table in runtime!\n"); |
1213 | 1213 | host->has_no_lookup_table = true; | |
1214 | host->has_no_lookup_table = true; | 1214 | } |
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | if (host->has_no_lookup_table) { | 1217 | if (host->has_no_lookup_table) { |