Commit 41c7540d authored by Wu, Josh's avatar Wu, Josh Committed by Brian Norris

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: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarJosh Wu <josh.wu@atmel.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 477478ae
......@@ -1204,15 +1204,15 @@ static int atmel_pmecc_nand_init_params(struct platform_device *pdev,
goto err;
}
if (!host->has_no_lookup_table) {
regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3);
host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev, regs_rom);
host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev,
regs_rom);
if (IS_ERR(host->pmecc_rom_base)) {
if (!host->has_no_lookup_table)
/* Don't display the information again */
dev_err(host->dev, "Can not get I/O resource for ROM, will build a lookup table in runtime!\n");
host->has_no_lookup_table = true;
}
}
if (host->has_no_lookup_table) {
/* Build the look-up table in runtime */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment