Re: [PATCH] mtd: nand: raw: mt7621-nand: allow writing ecc region in raw mode

2024-03-15 Thread 高惟杰
On Wed, 2024-03-13 at 07:41 +0100, Michael Nazzareno Trimarchi wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  Hi
> 
> On Wed, Mar 13, 2024 at 4:38 AM Weijie Gao 
> wrote:
> >
> > Allow writing ecc parity region in raw mode. This makes sure the
> > nand write.raw command can write the flash data as-is.
> >
> > Change-Id: Ibed3bdf13c9cf81e54041c5ac7a78192b97dcedc
> > Signed-off-by: Weijie Gao 
> > CR-Id: WCNCR00180092
> 
> I think this is for internal tracking
> 
> > ---
> >  drivers/mtd/nand/raw/mt7621_nand.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/raw/mt7621_nand.c
> b/drivers/mtd/nand/raw/mt7621_nand.c
> > index f6eddb84a9..341ef0bf2d 100644
> > --- a/drivers/mtd/nand/raw/mt7621_nand.c
> > +++ b/drivers/mtd/nand/raw/mt7621_nand.c
> > @@ -1003,9 +1003,9 @@ static int mt7621_nfc_write_page_raw(struct
> mtd_info *mtd,
> > mt7621_nfc_write_data(nfc, oob_fdm_ptr(nand, i),
> >   NFI_FDM_SIZE);
> >
> > -   /* Write dummy ECC parity data */
> > -   mt7621_nfc_write_data_empty(nfc, nfc-
> >spare_per_sector -
> > -   NFI_FDM_SIZE);
> > +   /* Write ECC parity data */
> > +   mt7621_nfc_write_data(nfc, oob_ecc_ptr(nfc, i),
> > + nfc->spare_per_sector -
> NFI_FDM_SIZE);
> > }
> >
> 
> Please describe better what regression you are trying to fix in the
> commit message
> Reviewed-by: Michael Trimarchi 

In fact this patch is not fixing any regression. It just provide the
ability to read/write the whole NAND page with ECC disabled.
Users/developers can the be able to debug NAND related issue or do
anything they want.

> 
> Michael
> 
> > mt7621_nfc_wait_write_completion(nfc, nand);
> > --
> > 2.34.1
> >
> 
> 


Re: [PATCH] mtd: nand: raw: mt7621-nand: allow writing ecc region in raw mode

2024-03-13 Thread Michael Nazzareno Trimarchi
Hi

On Wed, Mar 13, 2024 at 4:38 AM Weijie Gao  wrote:
>
> Allow writing ecc parity region in raw mode. This makes sure the
> nand write.raw command can write the flash data as-is.
>
> Change-Id: Ibed3bdf13c9cf81e54041c5ac7a78192b97dcedc
> Signed-off-by: Weijie Gao 
> CR-Id: WCNCR00180092

I think this is for internal tracking

> ---
>  drivers/mtd/nand/raw/mt7621_nand.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/mt7621_nand.c 
> b/drivers/mtd/nand/raw/mt7621_nand.c
> index f6eddb84a9..341ef0bf2d 100644
> --- a/drivers/mtd/nand/raw/mt7621_nand.c
> +++ b/drivers/mtd/nand/raw/mt7621_nand.c
> @@ -1003,9 +1003,9 @@ static int mt7621_nfc_write_page_raw(struct mtd_info 
> *mtd,
> mt7621_nfc_write_data(nfc, oob_fdm_ptr(nand, i),
>   NFI_FDM_SIZE);
>
> -   /* Write dummy ECC parity data */
> -   mt7621_nfc_write_data_empty(nfc, nfc->spare_per_sector -
> -   NFI_FDM_SIZE);
> +   /* Write ECC parity data */
> +   mt7621_nfc_write_data(nfc, oob_ecc_ptr(nfc, i),
> + nfc->spare_per_sector - NFI_FDM_SIZE);
> }
>

Please describe better what regression you are trying to fix in the
commit message
Reviewed-by: Michael Trimarchi 

Michael

> mt7621_nfc_wait_write_completion(nfc, nand);
> --
> 2.34.1
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
mich...@amarulasolutions.com
__

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
i...@amarulasolutions.com
www.amarulasolutions.com


[PATCH] mtd: nand: raw: mt7621-nand: allow writing ecc region in raw mode

2024-03-12 Thread Weijie Gao
Allow writing ecc parity region in raw mode. This makes sure the
nand write.raw command can write the flash data as-is.

Change-Id: Ibed3bdf13c9cf81e54041c5ac7a78192b97dcedc
Signed-off-by: Weijie Gao 
CR-Id: WCNCR00180092
---
 drivers/mtd/nand/raw/mt7621_nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/raw/mt7621_nand.c 
b/drivers/mtd/nand/raw/mt7621_nand.c
index f6eddb84a9..341ef0bf2d 100644
--- a/drivers/mtd/nand/raw/mt7621_nand.c
+++ b/drivers/mtd/nand/raw/mt7621_nand.c
@@ -1003,9 +1003,9 @@ static int mt7621_nfc_write_page_raw(struct mtd_info *mtd,
mt7621_nfc_write_data(nfc, oob_fdm_ptr(nand, i),
  NFI_FDM_SIZE);
 
-   /* Write dummy ECC parity data */
-   mt7621_nfc_write_data_empty(nfc, nfc->spare_per_sector -
-   NFI_FDM_SIZE);
+   /* Write ECC parity data */
+   mt7621_nfc_write_data(nfc, oob_ecc_ptr(nfc, i),
+ nfc->spare_per_sector - NFI_FDM_SIZE);
}
 
mt7621_nfc_wait_write_completion(nfc, nand);
-- 
2.34.1