public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* porting marvell-nand driver for u-boot
@ 2020-03-05 19:09 Zak Hays
  2020-03-06  8:48 ` Miquel Raynal
  0 siblings, 1 reply; 4+ messages in thread
From: Zak Hays @ 2020-03-05 19:09 UTC (permalink / raw)
  To: u-boot

Hello all!

I've recently run into an issue where I have enabled on-die ECC in Linux which required the block sizing I had been using to change from 2048 to 512. This is now causing UBI to throw the following error:

ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
ubi0 error: validate_ec_hdr: bad VID header offset 512, expected 2048
ubi0 error: validate_ec_hdr: bad EC header

As far as I can tell, the 2048 value is hard-coded in the current pxa nand driver I had been using in u-boot. It seems like the preferred path to proceed would be to port the current marvell-nand driver from Linux into u-boot but that seems a little more involved as it will require changes to the core nand driver as well. Are there any current plans to adapt these changes from v4.16+ of Linux? If so, is there a patch set somewhere that I could pull in to start testing?

Thanks!
Zak Hays

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

* porting marvell-nand driver for u-boot
  2020-03-05 19:09 porting marvell-nand driver for u-boot Zak Hays
@ 2020-03-06  8:48 ` Miquel Raynal
  2020-03-09 14:27   ` Zak Hays
  0 siblings, 1 reply; 4+ messages in thread
From: Miquel Raynal @ 2020-03-06  8:48 UTC (permalink / raw)
  To: u-boot

Hi Zak,

Zak Hays <zak.hays@lexmark.com> wrote on Thu, 5 Mar 2020 19:09:54 +0000:

> Hello all!
> 
> I've recently run into an issue where I have enabled on-die ECC in Linux which required the block sizing I had been using to change from 2048 to 512. This is now causing UBI to throw the following error:

You know that you cannot do that and keep the content of your NAND
device right? You are basically enabling subpage access and UBI does
not support subpage changes.

Otherwise, I think subpage access are supported by the pxa driver.

> ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
> ubi0 error: validate_ec_hdr: bad VID header offset 512, expected 2048
> ubi0 error: validate_ec_hdr: bad EC header
> 
> As far as I can tell, the 2048 value is hard-coded in the current pxa nand driver I had been using in u-boot. It seems like the preferred path to proceed would be to port the current marvell-nand driver from Linux into u-boot but that seems a little more involved as it will require changes to the core nand driver as well. Are there any current plans to adapt these changes from v4.16+ of Linux? If so, is there a patch set somewhere that I could pull in to start testing?
> 
> Thanks!
> Zak Hays

Thanks,
Miqu?l

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

* porting marvell-nand driver for u-boot
  2020-03-06  8:48 ` Miquel Raynal
@ 2020-03-09 14:27   ` Zak Hays
  2020-03-11  9:28     ` Miquel Raynal
  0 siblings, 1 reply; 4+ messages in thread
From: Zak Hays @ 2020-03-09 14:27 UTC (permalink / raw)
  To: u-boot

Hi Miqu?l,

Thanks for the quick response!

>Hi Zak,
>
>Zak Hays <zak.hays@lexmark.com> wrote on Thu, 5 Mar 2020 19:09:54 +0000:
>
>> Hello all!
>>
>> I've recently run into an issue where I have enabled on-die ECC in Linux which required the block sizing I had been using to change from 2048 to 512. This is now causing UBI to throw the following error:
>
>You know that you cannot do that and keep the content of your NAND
>device right? You are basically enabling subpage access and UBI does
>not support subpage changes.

Yes, I am aware of this and have other plans to save away the contents
of the NAND device and rewrite with the new block sizing.

>Otherwise, I think subpage access are supported by the pxa driver.

Can you clarify this a little more? It looks like the u-boot pxa
driver sets the NAND_NO_SUBPAGE_WRITE option by default in
alloc_nand_resource(). That decides the value of mtd->subpage_sft in
nand_base which ultimately leads to the UBI error I get below. Does
the NO_SUBPAGE_WRITE automatically imply that SUBPAGE_READ is not
allowed as well? Is there some other way to bypass this flag?

>> ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
>> ubi0 error: validate_ec_hdr: bad VID header offset 512, expected 2048
>> ubi0 error: validate_ec_hdr: bad EC header
>>
>> As far as I can tell, the 2048 value is hard-coded in the current pxa nand driver I had been using in u-boot. It seems like the preferred path to proceed would be to port the current marvell-nand driver from Linux into u-boot but
>> that seems a little more involved as it will require changes to the core nand driver as well. Are there any current plans to adapt these changes from v4.16+ of Linux? If so, is there a patch set somewhere that I could pull in to start
>> testing?
>>
>> Thanks!
>> Zak Hays
>
>Thanks,
>Miqu?l

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

* porting marvell-nand driver for u-boot
  2020-03-09 14:27   ` Zak Hays
@ 2020-03-11  9:28     ` Miquel Raynal
  0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2020-03-11  9:28 UTC (permalink / raw)
  To: u-boot

Hi Zak,

Zak Hays <zak.hays@lexmark.com> wrote on Mon, 9 Mar 2020 14:27:15 +0000:

> Hi Miqu?l,
> 
> Thanks for the quick response!
> 
> >Hi Zak,
> >
> >Zak Hays <zak.hays@lexmark.com> wrote on Thu, 5 Mar 2020 19:09:54 +0000:
> >  
> >> Hello all!
> >>
> >> I've recently run into an issue where I have enabled on-die ECC in Linux which required the block sizing I had been using to change from 2048 to 512. This is now causing UBI to throw the following error:  
> >
> >You know that you cannot do that and keep the content of your NAND
> >device right? You are basically enabling subpage access and UBI does
> >not support subpage changes.  
> 
> Yes, I am aware of this and have other plans to save away the contents
> of the NAND device and rewrite with the new block sizing.
> 
> >Otherwise, I think subpage access are supported by the pxa driver.  
> 
> Can you clarify this a little more? It looks like the u-boot pxa
> driver sets the NAND_NO_SUBPAGE_WRITE option by default in
> alloc_nand_resource(). That decides the value of mtd->subpage_sft in
> nand_base which ultimately leads to the UBI error I get below. Does
> the NO_SUBPAGE_WRITE automatically imply that SUBPAGE_READ is not
> allowed as well? Is there some other way to bypass this flag?

I think subpage_read are still allowed if the NAND part supports it.
But anyway, if they are enabled in Linux, they should be enabled in
U-Boot otherwise UBI will complain I suppose...

Thanks,
Miqu?l

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

end of thread, other threads:[~2020-03-11  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-05 19:09 porting marvell-nand driver for u-boot Zak Hays
2020-03-06  8:48 ` Miquel Raynal
2020-03-09 14:27   ` Zak Hays
2020-03-11  9:28     ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox