mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed Apr 22 10:59:07 PDT 2015
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=41c7540d0c4e362212845aa2258c15aaa878665f
Commit: 41c7540d0c4e362212845aa2258c15aaa878665f
Parent: 477478aedc8bdf1925785835609bc7e790f69aef
Author: Wu, Josh <Josh.wu at atmel.com>
AuthorDate: Thu Apr 2 14:13:47 2015 +0800
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Sun Apr 5 17:47:56 2015 -0700
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 at atmel.com>
Signed-off-by: Josh Wu <josh.wu at atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre at atmel.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/atmel_nand.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 0361c19..46010bd 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,
goto err;
}
- regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3);
- 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 */
+ 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);
+ 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");
-
- host->has_no_lookup_table = true;
+ host->has_no_lookup_table = true;
+ }
}
if (host->has_no_lookup_table) {
More information about the linux-mtd-cvs
mailing list