* Re: ARM: UBI/UBIFS on spi-nor
@ 2015-03-16 9:13 Rolf Evers-Fischer
0 siblings, 0 replies; 2+ messages in thread
From: Rolf Evers-Fischer @ 2015-03-16 9:13 UTC (permalink / raw)
To: renaud.barbier; +Cc: barebox
> I have a cortex-A9 based platform featuring a spi-nor (n25q256a).
> Copying a bigger file (512KB) leads to a read failure
> Has anybody used UBI/UBIFS on spi-nor successfully or seen a similar
issue?
>
Hello,
I've recently used UBI/UBIFS with a cortex-A7 based platform featuring a
spi-nor from Spansion (s25fl256). I had to introduce some changes for the
4-byte-mode, which will be set automatically, if barebox detects a flash
memory with more than 16MByte, because I was not able to reboot my
platform. But it seems that your problem is a different one.
I've just downloaded the datasheet of the n25q256a, and it seems that this
chip reports the JEDEC_MFR of ST (0x20), but needs the 4-byte CMD of
Macronix (0xb7).
This combination is currently not supported by barebox, but if you add an
additional 'case: CFI_MRF_ST' line to your 'set_4byte()' function, it
should hopefully work:
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 095a4ca..f54eb1f 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -157,6 +157,7 @@ static inline int set_4byte(struct m25p *flash, u32
jedec_id, int enable)
{
switch (JEDEC_MFR(jedec_id)) {
case CFI_MFR_MACRONIX:
+ case CFI_MFR_ST:
flash->command[0] = enable ? OPCODE_EN4B : OPCODE_EX4B;
return spi_write(flash->spi, flash->command, 1);
default:
Best regards,
Rolf
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* ARM: UBI/UBIFS on spi-nor
@ 2015-03-13 15:49 Renaud Barbier
0 siblings, 0 replies; 2+ messages in thread
From: Renaud Barbier @ 2015-03-13 15:49 UTC (permalink / raw)
To: barebox
Hello,
I have a cortex-A9 based platform featuring a spi-nor (n25q256a).
I have disabled 4KB sector for this spi-nor in order to use UBI/UBIFS.
So far I can ubiattach, mount and copy small files (~65KB or 2 sectors)
to ramfs. Copying a bigger file (512KB) leads to a read failure
(ubifs_search_zbranch fails to find matching keys) and only part of the
file is copied (always the same amount).
With Linux, I have not seen any issue and the boot loader SPI driver I
ported seems to work fine as write-read-compare pass.
Has anybody used UBI/UBIFS on spi-nor successfully or seen a similar issue?
cheers.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-16 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-16 9:13 ARM: UBI/UBIFS on spi-nor Rolf Evers-Fischer
-- strict thread matches above, loose matches on Subject: below --
2015-03-13 15:49 Renaud Barbier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox