Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-23 Thread Boris Brezillon
On Thu, 23 Mar 2017 16:06:19 +0900 Masahiro Yamada wrote: > Hi Boris, > > 2017-03-23 6:09 GMT+09:00 Boris Brezillon > : > > On Wed, 22 Mar 2017 23:07:19 +0900 > > Masahiro Yamada wrote: > > >

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-23 Thread Boris Brezillon
On Thu, 23 Mar 2017 16:06:19 +0900 Masahiro Yamada wrote: > Hi Boris, > > 2017-03-23 6:09 GMT+09:00 Boris Brezillon > : > > On Wed, 22 Mar 2017 23:07:19 +0900 > > Masahiro Yamada wrote: > > > >> @@ -339,6 +352,7 @@ struct denali_nand_info { > >> int bbtskipbytes; > >> int

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-23 Thread Masahiro Yamada
Hi Boris, 2017-03-23 6:12 GMT+09:00 Boris Brezillon : > On Wed, 22 Mar 2017 23:07:19 +0900 > Masahiro Yamada wrote: > >> +static int denali_hw_ecc_fixup(struct mtd_info *mtd, >> +struct

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-23 Thread Masahiro Yamada
Hi Boris, 2017-03-23 6:12 GMT+09:00 Boris Brezillon : > On Wed, 22 Mar 2017 23:07:19 +0900 > Masahiro Yamada wrote: > >> +static int denali_hw_ecc_fixup(struct mtd_info *mtd, >> +struct denali_nand_info *denali) >> +{ >> + int bank = denali->flash_bank; >> +

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-23 Thread Masahiro Yamada
Hi Boris, 2017-03-23 6:09 GMT+09:00 Boris Brezillon : > On Wed, 22 Mar 2017 23:07:19 +0900 > Masahiro Yamada wrote: > >> @@ -339,6 +352,7 @@ struct denali_nand_info { >> int bbtskipbytes; >> int max_banks; >>

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-23 Thread Masahiro Yamada
Hi Boris, 2017-03-23 6:09 GMT+09:00 Boris Brezillon : > On Wed, 22 Mar 2017 23:07:19 +0900 > Masahiro Yamada wrote: > >> @@ -339,6 +352,7 @@ struct denali_nand_info { >> int bbtskipbytes; >> int max_banks; >> unsigned int caps; >> +#define DENALI_CAP_HW_ECC_FIXUP

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Boris Brezillon
On Wed, 22 Mar 2017 23:07:19 +0900 Masahiro Yamada wrote: > +static int denali_hw_ecc_fixup(struct mtd_info *mtd, > +struct denali_nand_info *denali) > +{ > + int bank = denali->flash_bank; > + uint32_t ecc_cor; > + unsigned

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Boris Brezillon
On Wed, 22 Mar 2017 23:07:19 +0900 Masahiro Yamada wrote: > +static int denali_hw_ecc_fixup(struct mtd_info *mtd, > +struct denali_nand_info *denali) > +{ > + int bank = denali->flash_bank; > + uint32_t ecc_cor; > + unsigned int max_bitflips; > + > +

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Boris Brezillon
On Wed, 22 Mar 2017 23:07:19 +0900 Masahiro Yamada wrote: > @@ -339,6 +352,7 @@ struct denali_nand_info { > int bbtskipbytes; > int max_banks; > unsigned int caps; > +#define DENALI_CAP_HW_ECC_FIXUP BIT(0) Can you move this

Re: [PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Boris Brezillon
On Wed, 22 Mar 2017 23:07:19 +0900 Masahiro Yamada wrote: > @@ -339,6 +352,7 @@ struct denali_nand_info { > int bbtskipbytes; > int max_banks; > unsigned int caps; > +#define DENALI_CAP_HW_ECC_FIXUP BIT(0) Can you move this definition outside of the struct

[RESEND PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Masahiro Yamada
Some old versions of the Denali IP (perhaps used only for Intel?) detects ECC errors and provides correct data via a register, but does not touch the transferred data. So, the software must fixup the data in the buffer according to the provided ECC correction information. Newer versions perform

[RESEND PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Masahiro Yamada
Some old versions of the Denali IP (perhaps used only for Intel?) detects ECC errors and provides correct data via a register, but does not touch the transferred data. So, the software must fixup the data in the buffer according to the provided ECC correction information. Newer versions perform

[PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Masahiro Yamada
Some old versions of the Denali IP (perhaps used only for Intel?) detects ECC errors and provides correct data via a register, but does not touch the transferred data. So, the software must fixup the data in the buffer according to the provided ECC correction information. Newer versions perform

[PATCH v2 12/53] mtd: nand: denali: support HW_ECC_FIXUP capability

2017-03-22 Thread Masahiro Yamada
Some old versions of the Denali IP (perhaps used only for Intel?) detects ECC errors and provides correct data via a register, but does not touch the transferred data. So, the software must fixup the data in the buffer according to the provided ECC correction information. Newer versions perform