Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380211 > unrolled thread

[PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly

Started byRafał Miłecki <zajec5@gmail.com>
First post2016-04-15 22:00 +0200
Last post2016-04-15 22:30 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly Rafał Miłecki <zajec5@gmail.com> - 2016-04-15 22:00 +0200
    Re: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking  algorithm directly Joe Perches <joe@perches.com> - 2016-04-15 22:30 +0200
      Re: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking  algorithm directly Rafał Miłecki <zajec5@gmail.com> - 2016-04-15 22:50 +0200
    Re: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking  algorithm directly Joe Perches <joe@perches.com> - 2016-04-15 22:30 +0200

#1380211 — [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly

FromRafał Miłecki <zajec5@gmail.com>
Date2016-04-15 22:00 +0200
Subject[PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly
Message-ID<roi4j-8kL-29@gated-at.bofh.it>
NAND core sets ECC algorithm in algo field now and it should be
preferred over the mode field. This also prepares driver for dropping
NAND_ECC_SOFT_BCH.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 drivers/mtd/nand/fsmc_nand.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 1372040..0f8c63f 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -958,9 +958,12 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 			nand->ecc.strength = 1;
 			break;
 
+		case NAND_ECC_SOFT:
 		case NAND_ECC_SOFT_BCH:
-			dev_info(&pdev->dev, "Using 4-bit SW BCH ECC scheme\n");
-			break;
+			if (nand->ecc.algo == NAND_ECC_BCH) {
+				dev_info(&pdev->dev, "Using 4-bit SW BCH ECC scheme\n");
+				break;
+			}
 
 		default:
 			dev_err(&pdev->dev, "Unsupported ECC mode!\n");
-- 
1.8.4.5

[toc] | [next] | [standalone]


#1380233 — Re: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly

FromJoe Perches <joe@perches.com>
Date2016-04-15 22:30 +0200
SubjectRe: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly
Message-ID<roixk-pK-7@gated-at.bofh.it>
In reply to#1380211
On Fri, 2016-04-15 at 13:23 -0700, Joe Perches wrote:
> Why not just add NAND_ECC_SOFT above the default case?

Nevermind, misread.

[toc] | [prev] | [next] | [standalone]


#1380250 — Re: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly

FromRafał Miłecki <zajec5@gmail.com>
Date2016-04-15 22:50 +0200
SubjectRe: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly
Message-ID<roiQF-xK-3@gated-at.bofh.it>
In reply to#1380233
On 15 April 2016 at 22:24, Joe Perches <joe@perches.com> wrote:
> On Fri, 2016-04-15 at 13:23 -0700, Joe Perches wrote:
>> Why not just add NAND_ECC_SOFT above the default case?
>
> Nevermind, misread.

At least someone reviews it which is nice :)

-- 
Rafał

[toc] | [prev] | [next] | [standalone]


#1380247 — Re: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly

FromJoe Perches <joe@perches.com>
Date2016-04-15 22:30 +0200
SubjectRe: [PATCH 09/12] mtd: nand: fsmc: validate ECC setup by checking algorithm directly
Message-ID<roixk-pK-9@gated-at.bofh.it>
In reply to#1380211
On Fri, 2016-04-15 at 21:54 +0200, Rafał Miłecki wrote:
> NAND core sets ECC algorithm in algo field now and it should be
> preferred over the mode field. This also prepares driver for dropping
> NAND_ECC_SOFT_BCH.
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
>  drivers/mtd/nand/fsmc_nand.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
> index 1372040..0f8c63f 100644
> --- a/drivers/mtd/nand/fsmc_nand.c
> +++ b/drivers/mtd/nand/fsmc_nand.c
> @@ -958,9 +958,12 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
>  			nand->ecc.strength = 1;
>  			break;
>  
> +		case NAND_ECC_SOFT:
>  		case NAND_ECC_SOFT_BCH:
> -			dev_info(&pdev->dev, "Using 4-bit SW BCH ECC scheme\n");
> -			break;
> +			if (nand->ecc.algo == NAND_ECC_BCH) {
> +				dev_info(&pdev->dev, "Using 4-bit SW BCH ECC scheme\n");
> +				break;
> +			}
>  
>  		default:
>  			dev_err(&pdev->dev, "Unsupported ECC mode!\n");

Why not just add NAND_ECC_SOFT above the default case?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web