linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
@ 2015-04-02  6:13 Josh Wu
  2015-04-02  9:08 ` Nicolas Ferre
  2015-04-06  1:00 ` Brian Norris
  0 siblings, 2 replies; 3+ messages in thread
From: Josh Wu @ 2015-04-02  6:13 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---

 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) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
  2015-04-02  6:13 [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT Josh Wu
@ 2015-04-02  9:08 ` Nicolas Ferre
  2015-04-06  1:00 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2015-04-02  9:08 UTC (permalink / raw)
  To: linux-arm-kernel

Le 02/04/2015 08:13, Josh Wu a ?crit :
> 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>

Seems good:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> Signed-off-by: Josh Wu <josh.wu@atmel.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) {
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
  2015-04-02  6:13 [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT Josh Wu
  2015-04-02  9:08 ` Nicolas Ferre
@ 2015-04-06  1:00 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2015-04-06  1:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 02, 2015 at 02:13:47PM +0800, Josh Wu wrote:
> 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>

Pushed to l2-mtd.git.

Brian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-06  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02  6:13 [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT Josh Wu
2015-04-02  9:08 ` Nicolas Ferre
2015-04-06  1:00 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).