* Mount of jffs2 partition fails
@ 2003-10-14 4:53 Robin Gilks
2003-10-14 6:04 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Robin Gilks @ 2003-10-14 4:53 UTC (permalink / raw)
To: mtd list
Greetings
I'm using mtd-snapshot-20031013, kernel 2.4.21 cross compiled from x86
to ppc MPC8xx cpu. Mount (and other tools) are busybox-1.00pre3. The
flash device is a M28W320CB from STMicroelectronics.
I'm hitting a problem at mount time of a jffs2 partition which is
probably down to a configuration error but I've not been able to
identify it (so far!!)
I've loaded a very small jffs2 image, created on the host, into flash
and despite the errors (below) I'm able to read the contents of that
filesystem.
First attempt...
================
/ # mount -t jffs2 /dev/mtdblock1 /mnt
/ # Erase at 0x000d0000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x000c0000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x000b0000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x000a0000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00090000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00080000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00070000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00060000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00050000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00040000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00030000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00020000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x00010000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x000f0000 failed immediately: -EROFS. Is the sector locked?
Erase at 0x000e0000 failed immediately: -EROFS. Is the sector locked?
================
Second attempt, having unlocked the flash in the bootloader (although
I'd have thought mtd would do it!!)
================
/ # mount -t jffs2 /dev/mtdblock1 /mnt
/ # Write clean marker to block at 0x000d0000 failed: -30
Write clean marker to block at 0x000c0000 failed: -30
Write clean marker to block at 0x000b0000 failed: -30
Write clean marker to block at 0x000a0000 failed: -30
Write clean marker to block at 0x00090000 failed: -30
Write clean marker to block at 0x00080000 failed: -30
Write clean marker to block at 0x00070000 failed: -30
Write clean marker to block at 0x00060000 failed: -30
Write clean marker to block at 0x00050000 failed: -30
Write clean marker to block at 0x00040000 failed: -30
Write clean marker to block at 0x00030000 failed: -30
Write clean marker to block at 0x00020000 failed: -30
Write clean marker to block at 0x00010000 failed: -30
Write clean marker to block at 0x000f0000 failed: -30
Write clean marker to block at 0x000e0000 failed: -30
================
The relevant kernel config is as follows:
================
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_GEN_PROBE=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_CFI_STAA is not set
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_AMDSTD is not set
# CONFIG_MTD_SHARP is not set
# CONFIG_MTD_JEDEC is not set
#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_PHYSMAP_START=40000000
CONFIG_MTD_PHYSMAP_LEN=400000
CONFIG_MTD_PHYSMAP_BUSWIDTH=2
# CONFIG_MTD_CFI_FLAGADM is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_PCMCIA is not set
#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
# CONFIG_MTD_DOCPROBE is not set
#
# NAND Flash Device Drivers
#
# CONFIG_MTD_NAND is not set
================
The partitions reported by the proc filesystem are:
================
/ # cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00010000 "initrd"
mtd1: 00100000 00010000 "disk"
mtd2: 00100000 00010000 "kernel2"
mtd3: 00040000 00010000 "u-boot"
mtd4: 000c0000 00010000 "kernel"
================
and dmesg reports as follows:
no idea why its trying to load the cmdlinepart & redboot modules as they
are not defined!!
================
physmap flash device: 400000 at 40000000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit mode
Intel/Sharp Extended Query Table at 0x0035
cfi_cmdset_0001: Erase suspend on write enabled
0: offset=0x0,size=0x2000,blocks=8
1: offset=0x10000,size=0x10000,blocks=63
Using buffer write method
kmod: failed to exec /sbin/modprobe -s -k cmdlinepart, errno = 2
cmdlinepart partition parsing not available
kmod: failed to exec /sbin/modprobe -s -k RedBoot, errno = 2
RedBoot partition parsing not available
Using physmap partition definition
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00100000 : "initrd"
0x00100000-0x00200000 : "disk"
0x00200000-0x00300000 : "kernel2"
0x00300000-0x00340000 : "u-boot"
0x00340000-0x00400000 : "kernel"
================
after the mount, dmesg reports
================
/ # mount -t jffs2 /dev/mtdblock1 /mnt && dmesg
erase_pending_list: 000b0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000a0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00090000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00080000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00070000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00060000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00050000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00040000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00030000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00020000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00010000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erasable_pending_wbuf_list: empty
free_list: empty
bad_list: empty
bad_used_list: empty
Pass 2 (re)starting
Pass 2: ino #1, nlink 1, ic c066f260, nodes c0670360
Pass 2: ino #2, nlink 1, ic c066f278, nodes c0670370
jffs2_dump_block_lists:
flash_size: 00100000
used_size: 00000040
dirty_size: 00000000
wasted_size: 00000000
unchecked_size: 000001f8
free_size: 000ffdc8
erasing_size: 00000000
bad_size: 00000000
sector_size: 00010000
jffs2_reserved_blocks size: 00000000
nextblock: 00000000 (used 00000040, dirty 00000000, wasted 00000000,
unchecked 000001f8, free 0000fdc8)
gcblock: NULL
clean_list: empty
very_dirty_list: empty
dirty_list: empty
erasable_list: empty
erasing_list: empty
erase_pending_list: 000f0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000e0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000d0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000c0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000b0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000a0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00090000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00080000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00070000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00060000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00050000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00040000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00030000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00020000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00010000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erasable_pending_wbuf_list: empty
free_list: empty
bad_list: empty
bad_used_list: empty
Pass 2 complete
Pass 3: ino #1, ic c066f260, nodes c0670360
Pass 3: ino #2, ic c066f278, nodes c0670370
Pass 3 complete
jffs2_dump_block_lists:
flash_size: 00100000
used_size: 00000040
dirty_size: 00000000
wasted_size: 00000000
unchecked_size: 000001f8
free_size: 000ffdc8
erasing_size: 00000000
bad_size: 00000000
sector_size: 00010000
jffs2_reserved_blocks size: 00000000
nextblock: 00000000 (used 00000040, dirty 00000000, wasted 00000000,
unchecked 000001f8, free 0000fdc8)
gcblock: NULL
clean_list: empty
very_dirty_list: empty
dirty_list: empty
erasable_list: empty
erasing_list: empty
erase_pending_list: 000f0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000e0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000d0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000c0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000b0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 000a0000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00090000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00080000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00070000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00060000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00050000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00040000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00030000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00020000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erase_pending_list: 00010000 (used 00000000, dirty 00000000, wasted
00000000, unchecked 00000000, free 00010000)
erasable_pending_wbuf_list: empty
free_list: empty
bad_list: empty
bad_used_list: empty
Not rotating empty clean_list
Not rotating empty very_dirty_list
Not rotating empty dirty_list
Not rotating empty erasable_list
Rotating erase_pending_list by 1
Erase block at front of erase_pending_list is at 000d0000
Not rotating empty free_list
JFFS2 trigger levels (size 1024 KiB, block size 64 KiB, 16 blocks)
Blocks required to allow deletion: 2 (128 KiB)
Blocks required to allow writes: 3 (192 KiB)
Blocks required to quiesce GC thread: 4 (256 KiB)
Blocks required to allow GC merges: 3 (192 KiB)
Blocks required to GC bad blocks: 0 (0 KiB)
Amount of dirty space required to GC: 76021 bytes
jffs2_do_fill_super(): Getting root inode
jffs2_read_inode(): inode->i_ino == 1
jffs2_do_read_inode(): getting inocache
jffs2_get_ino_cache(): ino 1
jffs2_get_ino_cache found c0676260 for ino 1
jffs2_do_read_inode(): Got inocache at c0676260
jffs2_do_read_inode_internal(): ino #1 nlink is 1
jffs2_get_inode_nodes(): ino #1
Node at 0000000c (2) is a dirent node
Adding fd "initrd.mk", ino #2
jffs2_add_fd_to_list( c01be7d0, c068bc0c (->00000000))
Dirent "initrd.mk" (hash 0x4028c47a, ino #2
jffs2_read_inode() returning
jffs2_do_fill_super(): d_alloc_root()
JFFS2: Garbage collect thread is pid 38
thread_should_wake(): unchecked_size 504, checked_ino #0
jffs2_garbage_collect_thread(): pass
jffs2_get_ino_cache(): ino 0
jffs2_get_ino_cache found 00000000 for ino 0
jffs2_get_ino_cache(): ino 1
jffs2_get_ino_cache found c0676260 for ino 1
Skipping ino #1 already checked
jffs2_get_ino_cache(): ino 2
jffs2_get_ino_cache found c0676278 for ino 2
jffs2_garbage_collect_pass() triggering inode scan of ino#2
jffs2_do_read_inode_internal(): ino #2 nlink is 1
jffs2_get_inode_nodes(): ino #2
Node at 00000040 (0) is a data node
version 1, highest_version now 1
Marking node at 0x00000040 REF_PRISTINE
dnode @00000040: ver 1, offset 0000, dsize 03e0
jffs2_add_full_dnode_to_inode(ino #2, f c01be810, fn c0680350)
adding node 0000-03e0 @0x00000040 on flash, newfrag *c0703210
jffs2_lookup_node_frag(c01be820, 0)
Returning NULL, empty fragtree
j_a_f_d_t_f: Lookup gave no frag
Adding new frag (c0703210) at root of tree
frag 0000-03e0: 0x00000040(2) on flash (*c0703210). left (00000000),
right (00000000), parent (00000000)
jffs2_lookup_node_frag(c01be820, 992)
Considering frag 0-992 (c0703210). left 00000000, right 00000000
Going right from frag 0-992, before the region we care about
No match. Returning frag 0,992, closest previous
Truncating fraglist to 0x000003e0 bytes
Truncating frag 0x00000000-0x000003e0
jffs2_kill_fragtree: frag at 0x0-0x3e0: node c0680350, frags 1--
thread_should_wake(): nr_free_blocks 0, nr_erasing_blocks 15, dirty_size
0x0: no
jffs2_garbage_collect_thread sleeping...
jffs2_write_super()
thread_should_wake(): nr_free_blocks 0, nr_erasing_blocks 15, dirty_size
0x0: no
Starting erase of pending block 0x000d0000
Freeing all node refs for eraseblock offset 0x000d0000
Erase completed successfully at 0x000d0000
Verifying erase at 0x000d0000
Writing erased marker to block at 0x000d0000
Write clean marker to block at 0x000d0000 failed: -30
Starting erase of pending block 0x000c0000
Freeing all node refs for eraseblock offset 0x000c0000
Erase completed successfully at 0x000c0000
Verifying erase at 0x000c0000
Writing erased marker to block at 0x000c0000
Write clean marker to block at 0x000c0000 failed: -30
Starting erase of pending block 0x000b0000
Freeing all node refs for eraseblock offset 0x000b0000
Erase completed successfully at 0x000b0000
Verifying erase at 0x000b0000
Writing erased marker to block at 0x000b0000
Write clean marker to block at 0x000b0000 failed: -30
....
================
the write failures repeat over time for the whole 1Mb of the partition.
--
Robin Gilks
Senior Design Engineer Phone: (+64)(3) 357 1569
Tait Electronics Fax : (+64)(3) 359 4632
PO Box 1645 Christchurch Email : robin.gilks@tait.co.nz
New Zealand
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mount of jffs2 partition fails
2003-10-14 4:53 Mount of jffs2 partition fails Robin Gilks
@ 2003-10-14 6:04 ` David Woodhouse
2003-10-15 21:34 ` Robin Gilks
0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2003-10-14 6:04 UTC (permalink / raw)
To: Robin Gilks; +Cc: mtd list
On Tue, 2003-10-14 at 17:53 +0000, Robin Gilks wrote:
> / # mount -t jffs2 /dev/mtdblock1 /mnt
> Write clean marker to block at 0x000d0000 failed: -30
-30 is also -EROFS but we don't normally see it there so we don't have a
nice helpful message telling you the reason :)
I have no clue why your flash allows erases but not writes. This is a
flash hardware/driver problem, not JFFS2. Can you do more testing on the
raw /dev/mtd0 device itself using
read/write/ioctl(MEMERASE)/ioctl(MEMUNLOCK) to see what you need to do
to make it work?
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mount of jffs2 partition fails
2003-10-14 6:04 ` David Woodhouse
@ 2003-10-15 21:34 ` Robin Gilks
2003-10-15 23:47 ` Christopher Hoover
2003-10-16 21:30 ` Robin Gilks
0 siblings, 2 replies; 7+ messages in thread
From: Robin Gilks @ 2003-10-15 21:34 UTC (permalink / raw)
To: mtd list
David Woodhouse wrote:
> On Tue, 2003-10-14 at 17:53 +0000, Robin Gilks wrote:
>
>
>>/ # mount -t jffs2 /dev/mtdblock1 /mnt
>>Write clean marker to block at 0x000d0000 failed: -30
>
>
> -30 is also -EROFS but we don't normally see it there so we don't have a
> nice helpful message telling you the reason :)
>
> I have no clue why your flash allows erases but not writes. This is a
> flash hardware/driver problem, not JFFS2. Can you do more testing on the
> raw /dev/mtd0 device itself using
> read/write/ioctl(MEMERASE)/ioctl(MEMUNLOCK) to see what you need to do
> to make it work?
I've concluded that the ST chip I'm using, although being Intel command
set compatible, requires a different approach. That being the case I
enabled the ST chip option and on booting I now get the following.
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit mode
kmod: failed to exec /sbin/modprobe -s -k cfi_cmdset_0003, errno = 2
Support for command set 0003 not present
gen_probe: No supported Vendor Command Set found
kmod: failed to exec /sbin/modprobe -s -k jedec_probe, errno = 2
kmod: failed to exec /sbin/modprobe -s -k map_rom, errno = 2
The items to note here are
1. cfi_cmdset_0003 does not exist, its replaced (as far as I can see) by
cfi_cmdset_0020
2. I'm not using any modules so why is the kernel trying to load some!!
3. when I try to use the alternate Jedec probe method, I get a compile
error in jedec_probe.c of:
jedec_probe.c:1756: error: parse error before "jedec_probe_init"
jedec_probe.c:1757: warning: return type defaults to `int'
jedec_probe.c:1762: error: parse error before "jedec_probe_exit"
jedec_probe.c:1763: warning: return type defaults to `int'
jedec_probe.c:1767: warning: type defaults to `int' in declaration of
`module_init'
jedec_probe.c:1767: warning: parameter names (without types) in function
declaration
jedec_probe.c:1767: warning: data definition has no type or storage class
jedec_probe.c:1768: warning: type defaults to `int' in declaration of
`module_exit'
jedec_probe.c:1768: warning: parameter names (without types) in function
declaration
jedec_probe.c:1768: warning: data definition has no type or storage class
I take it that the code concerned has only ever been tested as modules?
I'll try that in the meantime but that will require major work on my
root filesystem :-((
--
Robin Gilks
Senior Design Engineer Phone: (+64)(3) 357 1569
Tait Electronics Fax : (+64)(3) 359 4632
PO Box 1645 Christchurch Email : robin.gilks@tait.co.nz
New Zealand
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Mount of jffs2 partition fails
2003-10-15 21:34 ` Robin Gilks
@ 2003-10-15 23:47 ` Christopher Hoover
2003-10-16 15:20 ` Thayne Harbaugh
2003-10-16 21:30 ` Robin Gilks
1 sibling, 1 reply; 7+ messages in thread
From: Christopher Hoover @ 2003-10-15 23:47 UTC (permalink / raw)
To: 'Robin Gilks', 'mtd list'
> 3. when I try to use
> the alternate Jedec probe method, I get a compile
> error in jedec_probe.c of:
> jedec_probe.c:1756: error: parse error before "jedec_probe_init"
> jedec_probe.c:1757: warning: return type defaults to `int'
> [...]
Add #include <linux/init.h>.
-ch
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mount of jffs2 partition fails
2003-10-15 21:34 ` Robin Gilks
2003-10-15 23:47 ` Christopher Hoover
@ 2003-10-16 21:30 ` Robin Gilks
2003-10-17 4:10 ` Robin Gilks
1 sibling, 1 reply; 7+ messages in thread
From: Robin Gilks @ 2003-10-16 21:30 UTC (permalink / raw)
To: mtd list
Robin Gilks wrote:
> David Woodhouse wrote:
>
>> On Tue, 2003-10-14 at 17:53 +0000, Robin Gilks wrote:
>>
>>
>>> / # mount -t jffs2 /dev/mtdblock1 /mnt
>>> Write clean marker to block at 0x000d0000 failed: -30
>>
>>
>>
>> -30 is also -EROFS but we don't normally see it there so we don't have a
>> nice helpful message telling you the reason :)
>>
>> I have no clue why your flash allows erases but not writes. This is a
>> flash hardware/driver problem, not JFFS2. Can you do more testing on the
>> raw /dev/mtd0 device itself using
>> read/write/ioctl(MEMERASE)/ioctl(MEMUNLOCK) to see what you need to do
>> to make it work?
>
>
> I've concluded that the ST chip I'm using, although being Intel command
> set compatible, requires a different approach. That being the case I
> enabled the ST chip option and on booting I now get the following.
>
In a message from Stuart Menefy on (CFI fixup code ref:
<20030523235020.3ca198e1.stuart.menefy@st.com>) on 24th May 2003, this
exact problem was highlighted and is due to the ST chip not supporting
the buffer write mode of the Intel CFI chips. I'll try applying Stuarts
patches to 2.4.22 stock kernel and see how I get on!!
I'm still working on why the lock/unlock is operating correctly (or
should I just unprotect the block that MTD is using in the bootstrap?)
--
Robin Gilks
Senior Design Engineer Phone: (+64)(3) 357 1569
Tait Electronics Fax : (+64)(3) 359 4632
PO Box 1645 Christchurch Email : robin.gilks@tait.co.nz
New Zealand
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mount of jffs2 partition fails
2003-10-16 21:30 ` Robin Gilks
@ 2003-10-17 4:10 ` Robin Gilks
0 siblings, 0 replies; 7+ messages in thread
From: Robin Gilks @ 2003-10-17 4:10 UTC (permalink / raw)
To: mtd list
[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]
No more replies to myself - promise...
Patch below:-))
Robin Gilks wrote:
>
> In a message from Stuart Menefy on (CFI fixup code ref:
> <20030523235020.3ca198e1.stuart.menefy@st.com>) on 24th May 2003, this
> exact problem was highlighted and is due to the ST chip not supporting
> the buffer write mode of the Intel CFI chips. I'll try applying Stuarts
> patches to 2.4.22 stock kernel and see how I get on!!
>
> I'm still working on why the lock/unlock is operating correctly (or
> should I just unprotect the block that MTD is using in the bootstrap?)
>
Looks like I was on the right lines - the fixups that Stuart introduced
just didn't go far enough!! The m28w320cb also doesn't support buffer
write (just like the m28w320ct doesn't) so a 2 line patch fixes it :-))
The bootloader is providing the correct unlock status of the flash over
the partition I'm interested in so nearly all my errors have gone away.
Just got to now work out why I get
kmod: failed to exec /sbin/modprobe -s -k cmdlinepart, errno = 2
cmdlinepart partition parsing not available
kmod: failed to exec /sbin/modprobe -s -k RedBoot, errno = 2
RedBoot partition parsing not available
at boot time when I have no modules defined in my system at all!!
--
Robin Gilks
Senior Design Engineer Phone: (+64)(3) 357 1569
Tait Electronics Fax : (+64)(3) 359 4632
PO Box 1645 Christchurch Email : robin.gilks@tait.co.nz
New Zealand
[-- Attachment #2: mtd-patch --]
[-- Type: text/plain, Size: 687 bytes --]
diff -purN /home/gilksr/mtd/drivers/mtd/chips/cfi_cmdset_0001.c /home/packages/mtd/drivers/mtd/chips/cfi_cmdset_0001.c
--- /home/gilksr/mtd/drivers/mtd/chips/cfi_cmdset_0001.c 2003-08-12 10:00:05.000000000 +1200
+++ /home/packages/mtd/drivers/mtd/chips/cfi_cmdset_0001.c 2003-10-17 16:53:47.000000000 +1300
@@ -147,6 +147,8 @@ static void fixup_st_m28w320cb(struct ma
/* Note this is done after the region info is endian swapped */
cfi->cfiq->EraseRegionInfo[1] =
(cfi->cfiq->EraseRegionInfo[1] & 0xffff0000) | 0x3e;
+ cfi->cfiq->BufWriteTimeoutTyp = 0; /* Not supported */
+ cfi->cfiq->BufWriteTimeoutMax = 0; /* Not supported */
};
static struct cfi_fixup fixup_table[] = {
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-10-17 4:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-14 4:53 Mount of jffs2 partition fails Robin Gilks
2003-10-14 6:04 ` David Woodhouse
2003-10-15 21:34 ` Robin Gilks
2003-10-15 23:47 ` Christopher Hoover
2003-10-16 15:20 ` Thayne Harbaugh
2003-10-16 21:30 ` Robin Gilks
2003-10-17 4:10 ` Robin Gilks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox