mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Alexander Shiyan <eagle.alexander923@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>,
	Oleksij Rempel <o.rempel@pengutronix.de>
Subject: Re: NOR damage problem
Date: Tue, 1 Apr 2025 14:05:56 +0200	[thread overview]
Message-ID: <a9bad484-6301-4acf-838d-0d75ec11e756@pengutronix.de> (raw)
In-Reply-To: <CAP1tNvQ3qtYdsBE5W2Ep3Wz1em0GqGJamW0zQapu73bywFCigA@mail.gmail.com>

Hello Alexander,

On 4/1/25 13:56, Alexander Shiyan wrote:
> Hello.
> 
>>> Found NOR partition damage after use ubiformat.
>>> There is a NOR memory (256M) connected via atmel-qspi.
> ...
>> The messages above say that 64bytes were written which matches the
>> number of bytes that are corrupted here. Maybe this can be a starting
>> point where to look at. Also the 64 bytes were written without the block
>> being erased. You could erase the block manually before calling
>> ubiformat, then you could see what the code really tried to write here.
>>
>> Just an idea: Is the size of your Flash correctly detected? When writing
>> past the device then the write operations could roll over to the first
>> block.
> 
> The problem is more complex than I thought...
> ATMEL QSPI only works in the mapping range up to 128 MB,
> larger chips will not work correctly.
> To solve this, we will have to update the spi-mem and atmel-quadspi
> drivers and add spi_transfer() support to the driver (and in the kernel too).

The spi-mem core is also limited to 1 bit currently. Just saying in case
you want to fix that as well. I haven't been successful to talk Oleksij
into it. :D

Cheers,
Ahmad

> 
> Thanks!
> 
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2025-04-01 12:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  6:20 Alexander Shiyan
2025-04-01  7:45 ` Sascha Hauer
2025-04-01 11:56   ` Alexander Shiyan
2025-04-01 12:05     ` Ahmad Fatoum [this message]
2025-04-02  7:47       ` Alexander Shiyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9bad484-6301-4acf-838d-0d75ec11e756@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eagle.alexander923@gmail.com \
    --cc=o.rempel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox