mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-06 11:19:56 +00:00
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>
This commit is contained in:
parent
477478aedc
commit
41c7540d0c
@ -1204,14 +1204,14 @@ static int atmel_pmecc_nand_init_params(struct platform_device *pdev,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3);
|
if (!host->has_no_lookup_table) {
|
||||||
host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev, regs_rom);
|
regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3);
|
||||||
if (IS_ERR(host->pmecc_rom_base)) {
|
host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev,
|
||||||
if (!host->has_no_lookup_table)
|
regs_rom);
|
||||||
/* Don't display the information again */
|
if (IS_ERR(host->pmecc_rom_base)) {
|
||||||
dev_err(host->dev, "Can not get I/O resource for ROM, will build a lookup table in runtime!\n");
|
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;
|
||||||
host->has_no_lookup_table = true;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (host->has_no_lookup_table) {
|
if (host->has_no_lookup_table) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user