* Jffs2 issue on latest mtd for Sibley NOR
@ 2005-11-22 15:55 Menon, Nishanth
2005-11-22 16:15 ` Artem B. Bityutskiy
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Menon, Nishanth @ 2005-11-22 15:55 UTC (permalink / raw)
To: linux-mtd
Hi All,
I have been trying Sibley NOR flash and the latest (as of today) MTD
tree on my kernel.
When I use the character device, I am able to unlock, erase, write and
read from it successfully. Unfortunately, when I try to use jffs2 on it,
I face the following issue:
root@128.247.81.110:/mnt# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "bootloader"
mtd1: 00020000 00020000 "params"
mtd2: 00200000 00020000 "kernel"
mtd3: 03dc0000 00020000 "filesystem"
mtd4: 00040000 00040000 "bootloader"
mtd5: 00040000 00040000 "params"
mtd6: 00200000 00040000 "kernel"
mtd7: 07d80000 00040000 "filesystem"
> The first 4 are my strata flash partitions which work fine - even
jffs2 works on it.
root@128.247.81.110:~/nor/mtd-util# mount -t jffs2 /dev/mtdblock/6 /mnt/
root@128.247.81.110:~/nor/mtd-util# cd /mnt
root@128.247.81.110:/mnt# ls
root@128.247.81.110:/mnt# touch a
root@128.247.81.110:/mnt# jffs2: Couldn't find erase block to garbage
collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00000000
Refiling block at 00000000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00040000
Refiling block at 00040000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00080000
Refiling block at 00080000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 000c0000
Refiling block at 000c0000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00100000
Refiling block at 00100000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00140000
Refiling block at 00140000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 00180000
Refiling block at 00180000 to bad_used_list
Sibley: buffer write error (status 0x190)
jffs2_flush_wbuf(): Write failed with -22
About to refile bad block at 001c0000
Refiling block at 001c0000 to bad_used_list
jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they
all?
jffs2: Couldn't find erase block to garbage collect!
root@128.247.81.110:/mnt# ls
a
root@128.247.81.110:/mnt# cd
root@128.247.81.110:~# umount /mnt
root@128.247.81.110:~# mount -t jffs2 /dev/mtdblock/6 /mnt/
Empty flash at 0x00040018 ends at 0x00040400
Eraseblock header found at 0x00040400 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040418 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040430 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040448 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040460 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040478 is not at the beginning of block
(0x00040000)
Eraseblock header found at 0x00040490 is not at the beginning of block
(0x00040000)
Empty flash at 0x000404a8 ends at 0x000404c0
root@128.247.81.110:~#
For comparison: Strata flash:
root@128.247.81.110:~/nor/mtd-util# ./flash_unlock /dev/mtd/2
root@128.247.81.110:~/nor/mtd-util# ./flash_eraseall -j /dev/mtd/2
Erasing 128 Kibyte @ 1e0000 -- 93 % complete. Cleanmarker written at
1e0000.
root@128.247.81.110:~/nor/mtd-util# mount -t jffs2 /dev/mtdblock/2 /mnt
root@128.247.81.110:~/nor/mtd-util# cd /mnt
root@128.247.81.110:/mnt# touch a
root@128.247.81.110:/mnt# ls
a
root@128.247.81.110:/mnt# echo "ehllow">a
root@128.247.81.110:/mnt# cd -
/root/nor/mtd-util
root@128.247.81.110:~/nor/mtd-util# umount /mnt
root@128.247.81.110:~/nor/mtd-util# mount -t jffs2 /dev/mtdblock/2 /mnt
root@128.247.81.110:~/nor/mtd-util# cd -
/mnt
root@128.247.81.110:/mnt# cat a
ehllow
root@128.247.81.110:/mnt# cd -
/root/nor/mtd-util
root@128.247.81.110:~/nor/mtd-util# umount /mnt
root@128.247.81.110:~/nor/mtd-util# ./flash_info /dev/mtd/2
Device /dev/mtd/2 has 0 erase regions
root@128.247.81.110:~/nor/mtd-util# ./flash_info /dev/mtd/6
Device /dev/mtd/6 has 0 erase regions
My .config for JFFS2 looks like the following:
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=2
CONFIG_JFFS2_FS_WRITEBUFFER=y
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
# CONFIG_JFFS2_LZO is not set
# CONFIG_JFFS2_LZARI is not set
# CONFIG_JFFS2_CMODE_NONE is not set
CONFIG_JFFS2_CMODE_PRIORITY=y
# CONFIG_JFFS2_CMODE_SIZE is not set
CONFIG_JFFS2_PROC=y
Has any body else seen a similar problem?
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Jffs2 issue on latest mtd for Sibley NOR
2005-11-22 15:55 Jffs2 issue on latest mtd for Sibley NOR Menon, Nishanth
@ 2005-11-22 16:15 ` Artem B. Bityutskiy
2005-11-22 16:57 ` Nicolas Pitre
2005-11-22 22:24 ` Todd Poynor
2005-11-23 18:09 ` Nicolas Pitre
2 siblings, 1 reply; 10+ messages in thread
From: Artem B. Bityutskiy @ 2005-11-22 16:15 UTC (permalink / raw)
To: Menon, Nishanth; +Cc: linux-mtd
Menon, Nishanth wrote:
> Hi All,
> I have been trying Sibley NOR flash and the latest (as of today) MTD
> tree on my kernel.
> When I use the character device, I am able to unlock, erase, write and
> read from it successfully. Unfortunately, when I try to use jffs2 on it,
> I face the following issue:
Could you please try to reproduce this on mtdram device which is just an
emulator of NOR flash in RAM ?
> CONFIG_JFFS2_FS=y
> CONFIG_JFFS2_FS_DEBUG=2
Uhh. Too much log rubbish will be produced with this.
> CONFIG_JFFS2_FS_WRITEBUFFER=y
This is not usually needed for NOR. is 'siblay' an exception? But JFFS2
still should work.
> CONFIG_JFFS2_ZLIB=y
> CONFIG_JFFS2_RTIME=y
> # CONFIG_JFFS2_RUBIN is not set
> # CONFIG_JFFS2_LZO is not set
> # CONFIG_JFFS2_LZARI is not set
> # CONFIG_JFFS2_CMODE_NONE is not set
> CONFIG_JFFS2_CMODE_PRIORITY=y
> # CONFIG_JFFS2_CMODE_SIZE is not set
> CONFIG_JFFS2_PROC=y
Uh, it is interesting. I did not know anything about this option. I
thought JFFS2 does not expose anything to /proc ...
--
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Jffs2 issue on latest mtd for Sibley NOR
2005-11-22 16:15 ` Artem B. Bityutskiy
@ 2005-11-22 16:57 ` Nicolas Pitre
2005-11-22 17:01 ` Artem B. Bityutskiy
0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Pitre @ 2005-11-22 16:57 UTC (permalink / raw)
To: Artem B. Bityutskiy; +Cc: linux-mtd, Menon, Nishanth
On Tue, 22 Nov 2005, Artem B. Bityutskiy wrote:
> Menon, Nishanth wrote:
> > Hi All,
> > I have been trying Sibley NOR flash and the latest (as of today) MTD
> > tree on my kernel.
> > When I use the character device, I am able to unlock, erase, write and
> > read from it successfully. Unfortunately, when I try to use jffs2 on it,
> > I face the following issue:
> Could you please try to reproduce this on mtdram device which is just an
> emulator of NOR flash in RAM ?
That's useless in this case.
> > CONFIG_JFFS2_FS_WRITEBUFFER=y
> This is not usually needed for NOR. is 'siblay' an exception?
Yes it is.
Nicolas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Jffs2 issue on latest mtd for Sibley NOR
2005-11-22 16:57 ` Nicolas Pitre
@ 2005-11-22 17:01 ` Artem B. Bityutskiy
0 siblings, 0 replies; 10+ messages in thread
From: Artem B. Bityutskiy @ 2005-11-22 17:01 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Artem B. Bityutskiy, linux-mtd, Menon, Nishanth
On Tue, 2005-11-22 at 11:57 -0500, Nicolas Pitre wrote:
> > Could you please try to reproduce this on mtdram device which is just an
> > emulator of NOR flash in RAM ?
>
> That's useless in this case.
>
OK, fine, then it must be something related to 'Sibley' flash drivers or
the jffs2-to-Sibley port.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Jffs2 issue on latest mtd for Sibley NOR
2005-11-22 15:55 Jffs2 issue on latest mtd for Sibley NOR Menon, Nishanth
2005-11-22 16:15 ` Artem B. Bityutskiy
@ 2005-11-22 22:24 ` Todd Poynor
2005-11-22 22:47 ` Nicolas Pitre
2005-12-03 22:01 ` Jared Hulbert
2005-11-23 18:09 ` Nicolas Pitre
2 siblings, 2 replies; 10+ messages in thread
From: Todd Poynor @ 2005-11-22 22:24 UTC (permalink / raw)
To: Menon, Nishanth; +Cc: linux-mtd
Menon, Nishanth wrote:
> Sibley: buffer write error (status 0x190)
According to the datasheet that looks like:
SR[9] SR[8] SR[4]
0 1 1 = Error - Attempted rewrite to Object Mode region
but I've no clue what causes it...
--
Todd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Jffs2 issue on latest mtd for Sibley NOR
2005-11-22 22:24 ` Todd Poynor
@ 2005-11-22 22:47 ` Nicolas Pitre
2005-12-03 22:01 ` Jared Hulbert
1 sibling, 0 replies; 10+ messages in thread
From: Nicolas Pitre @ 2005-11-22 22:47 UTC (permalink / raw)
To: Todd Poynor; +Cc: linux-mtd, Menon, Nishanth
On Tue, 22 Nov 2005, Todd Poynor wrote:
> Menon, Nishanth wrote:
>
> > Sibley: buffer write error (status 0x190)
>
> According to the datasheet that looks like:
>
> SR[9] SR[8] SR[4]
> 0 1 1 = Error - Attempted rewrite to Object Mode region
>
> but I've no clue what causes it...
Either the JFFS2 partition wasn't properly erased, or the JFFS2
write-buffering support (mandatory for Sibley) has been broken somehow.
Nicolas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Jffs2 issue on latest mtd for Sibley NOR
2005-11-22 15:55 Jffs2 issue on latest mtd for Sibley NOR Menon, Nishanth
2005-11-22 16:15 ` Artem B. Bityutskiy
2005-11-22 22:24 ` Todd Poynor
@ 2005-11-23 18:09 ` Nicolas Pitre
2 siblings, 0 replies; 10+ messages in thread
From: Nicolas Pitre @ 2005-11-23 18:09 UTC (permalink / raw)
To: Menon, Nishanth; +Cc: linux-mtd
On Tue, 22 Nov 2005, Menon, Nishanth wrote:
> Hi All,
> I have been trying Sibley NOR flash and the latest (as of today) MTD
> tree on my kernel.
> When I use the character device, I am able to unlock, erase, write and
> read from it successfully. Unfortunately, when I try to use jffs2 on it,
> I face the following issue:
> root@128.247.81.110:/mnt# cat /proc/mtd
> dev: size erasesize name
> mtd0: 00020000 00020000 "bootloader"
> mtd1: 00020000 00020000 "params"
> mtd2: 00200000 00020000 "kernel"
> mtd3: 03dc0000 00020000 "filesystem"
> mtd4: 00040000 00040000 "bootloader"
> mtd5: 00040000 00040000 "params"
> mtd6: 00200000 00040000 "kernel"
> mtd7: 07d80000 00040000 "filesystem"
>
> The first 4 are my strata flash partitions which work fine - even
> jffs2 works on it.
Do you have separate master MTD devices for them before registering
partitions? In other words, how do you probe them (what does your map
driver look like)?
If you have only a single do_map_probe() for both chip types then you're
in trouble. A single do_map_probe() can indeed detect and handle
multiple flash chips as long as they are of the same model. Otherwise
you'll have to provide two map objects covering a single chip model each
and register separate MTD objects.
I just tested JFFS2 over Sibley flash using linux 2.6.15-rc2 and
everything just worked fine with this simple test:
root@mainstone:~# flash_unlock /dev/mtd2
root@mainstone:~# flash_eraseall /dev/mtd2
Erased 61184 Kibyte @ 0 -- 100% complete.
root@mainstone:~# mount -t jffs2 /dev/mtdblock2 /mnt
root@mainstone:~# touch /mnt/test
root@mainstone:~# echo "Hello World" > /mnt/test2
root@mainstone:~# umount /mnt
root@mainstone:~# mount -t jffs2 /dev/mtdblock2 /mnt
root@mainstone:~# ls -l /mnt
total 1
-rw-r--r-- 1 root root 0 Nov 23 17:59 test
-rw-r--r-- 1 root root 12 Nov 23 17:59 test2
root@mainstone:~# cat /mnt/test2
Hello World
Nicolas
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Jffs2 issue on latest mtd for Sibley NOR
[not found] <520AB2AD990DC04082102F77CA17263801D40623@dlee03.ent.ti.com>
@ 2005-11-23 18:51 ` Nicolas Pitre
0 siblings, 0 replies; 10+ messages in thread
From: Nicolas Pitre @ 2005-11-23 18:51 UTC (permalink / raw)
To: Menon, Nishanth; +Cc: linux-mtd
On Wed, 23 Nov 2005, Menon, Nishanth wrote:
> > Do you have separate master MTD devices for them before registering
> > partitions? In other words, how do you probe them (what does your map
> > driver look like)?
> The file I am using is a modification to drivers/mtd/maps/omap_nor.c.
> Modification being only with another info, mtd_partition, mtd_info and
> map_info structure set for sibley.
> The init sequence is:
> simple_map_init, do_map_probe, parse_mtd_partitions-> add_mtd_partitions
>
> So this sequence happens to two set of structures (twice basically -
> once for strata and second time for sibley).
Can you provide your boot log? Just do dmesg > log.txt once booted and
send that file.
Nicolas
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Jffs2 issue on latest mtd for Sibley NOR
[not found] <520AB2AD990DC04082102F77CA17263801D4063E@dlee03.ent.ti.com>
@ 2005-11-23 19:40 ` Nicolas Pitre
0 siblings, 0 replies; 10+ messages in thread
From: Nicolas Pitre @ 2005-11-23 19:40 UTC (permalink / raw)
To: Menon, Nishanth; +Cc: linux-mtd
On Wed, 23 Nov 2005, Menon, Nishanth wrote:
> Sibley: Found 1 x16 devices at 0x0 in 16-bit bank
> Sibley: Found 1 x16 devices at 0x4000000 in 16-bit bank
What if you limit your map_info.size to 0x4000000 just to prevent the
second chip from being detected? I only ever tested the Sibley support
with a single 1x16 chip so...
Can you also test with the stock MTD and JFFS2 code as found in Linux
2.6.15-rc2?
If the problem still persist for you in those conditions while it works
for me then you'll have to look at your own changes outside of JFFS2 or
cfi_cmdset_0001 for the culprit.
Nicolas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Jffs2 issue on latest mtd for Sibley NOR
2005-11-22 22:24 ` Todd Poynor
2005-11-22 22:47 ` Nicolas Pitre
@ 2005-12-03 22:01 ` Jared Hulbert
1 sibling, 0 replies; 10+ messages in thread
From: Jared Hulbert @ 2005-12-03 22:01 UTC (permalink / raw)
To: Todd Poynor; +Cc: linux-mtd, Menon, Nishanth
On 11/22/05, Todd Poynor <tpoynor@mvista.com> wrote:
> Menon, Nishanth wrote:
>
> > Sibley: buffer write error (status 0x190)
>
> According to the datasheet that looks like:
>
> SR[9] SR[8] SR[4]
> 0 1 1 = Error - Attempted rewrite to Object Mode region
>
> but I've no clue what causes it...
>
> --
> Todd
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
Oh you used the MTD's flash_eraseall -j /dev/mtdX. Yeah...
That would do it. That's got me before too I think. This writes a
header to each block and then JFFS2 with writebuffer will step on that
already written to Programming Region and you give you this error.
Technical Explanation:
For M18 you can't do Word Programs to a Programming Region (1KB
region) after a Buffered Program has been done there _unless_ your
Buffered Program had a data pattern that puts the Programming Region
in Object Mode. More details at
(http://developer.intel.com/design/flcomp/products/M18/techdocs.htm)
Moral of the story: Don't write to the same 1KB chunk of M18 unless
you know very well what you are doing. If you get 0x190 that what you
did.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-12-03 22:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-22 15:55 Jffs2 issue on latest mtd for Sibley NOR Menon, Nishanth
2005-11-22 16:15 ` Artem B. Bityutskiy
2005-11-22 16:57 ` Nicolas Pitre
2005-11-22 17:01 ` Artem B. Bityutskiy
2005-11-22 22:24 ` Todd Poynor
2005-11-22 22:47 ` Nicolas Pitre
2005-12-03 22:01 ` Jared Hulbert
2005-11-23 18:09 ` Nicolas Pitre
[not found] <520AB2AD990DC04082102F77CA17263801D40623@dlee03.ent.ti.com>
2005-11-23 18:51 ` Nicolas Pitre
[not found] <520AB2AD990DC04082102F77CA17263801D4063E@dlee03.ent.ti.com>
2005-11-23 19:40 ` Nicolas Pitre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox