mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
PATCH 1/1 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 <[email protected]>
Signed-off-by Josh Wu <[email protected]>
---
drivers/mtd/nand/atmel_nand.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/mtd/nand/atmel_nand.c +7 -7
@@ -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) {
Signature · 1 line
1.9.1
PATCH 1/1 mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
Le 02/04/2015 08:13, Josh Wu a ?crit :
Quoted 4 lines
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 <[email protected]>
Seems good:
Acked-by Nicolas Ferre <[email protected]>
Quoted 33 lines
Signed-off-by Josh Wu <[email protected]>---
drivers/mtd/nand/atmel_nand.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/mtd/nand/atmel_nand.c +7
-7@@ -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) {
Signature · 1 line
Nicolas Ferre
Brian Norris
AppliedPATCH 1/1 mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
In reply to Josh WuQuoted 5 lines · Josh Wu
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 <[email protected]>Signed-off-by Josh Wu <[email protected]>
Pushed to l2-mtd.git.
Brian