public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* Problem replacing a Samsung K9F1208U0M NAND flash chip with ST NAND512W3A
@ 2007-11-04 14:34 Santanu Sen
  2007-11-06 21:20 ` Ricardo Scop
  0 siblings, 1 reply; 2+ messages in thread
From: Santanu Sen @ 2007-11-04 14:34 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

Facing some trouble replacing a SAMSUNG K9F1208U0M
with an ST NAND512W3A. I know it is criminal, but we
are still using the 2.4 kernel. The excuse is, it is
impossible to port all our code/drivers to 2.6 within
the project deadline.  


Here is the story. We could successfully install JFFS2
on a Samsung  K9F1208U0M NAND chip mounted on a board
running linux-2.4.20 on a ppc852 processor. But when
we replaced the Samsung chip with an ST NAND512W3A,
creating a JFFS2 partition will no longer work. Raw
read/write to the device is fine. We could even copy a
squashfs image to one of the partitions and mount it
without trouble. But whenever we create a JFFS2
partition, mount it, create a file on it, unmount it
and mount it again the file goes missing. Attaching a
screen-shot of the entire procedure. Note that, the
same steps work fine with Samsung chips. Also, neither
"eraseall" nor "eraseall --jffs2" is of much help in
case of ST. We found some document on the ST site
stating what to do to replace a Samsung chip with an
ST one. The chips are claimed to be equivalent except
that Samsung supports some additional multi-plane
commands. But we could not see those commands being
used anywhere in the mtd code.   

Are there anything special to be done for ST NAND
chips? 

Any help will be appreciated.  

Thanks and Regards, 
Santanu

NB: Posting this message here afetr several
unsuccessful attempts to post it on the "jffs2-dev"
mailing list. 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[-- Attachment #2: 1173074946-st_jffs2_error --]
[-- Type: application/octet-stream, Size: 7705 bytes --]

Tejas U-Boot PrivateBuild:santanu (Oct 10 2007 - 00:35:55)
                                                                                                                                                             
CPU:   XPC852TxxZPnn-VR66 at 50 MHz: 4 kB I-Cache 4 kB D-Cache FEC present
DRAM:  (64 MB SDRAM) 64 MB
I2C:   ready
Eeprom header mismatch ...
Board: ..?  00:+0x
Ethernet Address: 00:04:95:00:00:01
Date:  0/00/2000  0:00:00
Reserving 4096k for protected RAM at 03c00000
Top of RAM usable for U-Boot at: 03c00000
Reserving 178k for U-Boot at: 03bd3000
Reserving 2064k for malloc() at: 039cf000
Reserving 444 Bytes for Board Info at: 039cee44
Reserving 48 Bytes for Global Data at: 039cedf0
Stack Pointer at: 039cedd8
Eeprom header mismatch ...
New Stack Pointer is: 039cedd8
Now running in RAM - U-Boot at: 03bd3000
FLASH:  2 MB
Using default environment
                                                                                                                                                             
In:    serial
Out:   serial
Err:   serial
U-Boot relocated to 03bd3000
NAND:  Probing at 0xf8000000
Flash chip found:
         Manufacturer ID: 0x20, Chip ID: 0x76 (ST Micro 512W3A2BN6)
1 flash chips found. Total nand_chip size: 64 MB
NAND Flash:   64 MB
Net:   FEC ETHERNET
Hit'a' to stop, any other key to autoboot:  0
Tejas-pxat-uboot> boot initrd
                                                                                                                                                             
Loading from device 0: <NULL> at 0xf8000000 (offset 0x0)
   Image Name:   Linux Multiboot-Image
   Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
   Data Size:    1509590 Bytes =  1.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
   Image 0:   700108 Bytes = 683.7 kB
   Image 1:   809470 Bytes = 790.5 kB
Automatic boot of image at addr 0x00200000 ...
## Booting image at 00200000 ...
   Image Name:   Linux Multiboot-Image
   Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
   Data Size:    1509590 Bytes =  1.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
   Image 0:   700108 Bytes = 683.7 kB
   Image 1:   809470 Bytes = 790.5 kB
   Verifying Checksum ... OK
   Uncompressing Multi-File Image ... OK
   Loading Ramdisk to 03908000, end 039cd9fe ... OK
Linux version 2.4.20-denx-PrivateBuild:santanu  (santanu@sephia) (gcc version 2.95.4 20010319 (prerelease/franzo/20011204)) #2 Tue Oct 9 20:50:51 IST 2007
On node 0 totalpages: 15359
zone(0): 15359 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: slram=mtd_tjram01,0x3C00000,+0x400000 console=ttyS0,57600 init=/etc/rc.sh root=/dev/ram rw mtdsize0=0x00040000 mtdparts=a initrd
Decrementer Frequency = 187500000/60
Warning: real time clock seems stuck!
Calibrating delay loop... 49.66 BogoMIPS
Memory: 57584k available (1332k kernel code, 432k data, 56k init, 0k highmem)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
WDT_8xx: SWT not enabled by firmware, SYPCR=0xffffff89
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.1 (2006/08/19) Phillip Lougher
CPM UART driver version 0.04
ttyS0 on SMC1 at 0x0280, BRG1
pty: 256 Unix98 ptys configured
eth0: FEC ENET Version 0.3, FEC irq 11, with MDIO, addr 00:04:95:00:00:01
eth0: Phy @ 0x0, type RTL8201 (0x00008201)
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
tn100map flash device: 00200000 at 40000000
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
Physically mapped flash: JEDEC Device ID is 0xC4. Assuming broken CFI table.
Physically mapped flash: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Using tn100_map partition definition
Creating 1 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "uboot"
NAND device: Manufacture ID: 0x20, Chip ID: 0x76 (ST Micro NAND 64MiB 3,3V)
Creating 10 MTD partitions on "NAND 64MiB 3,3V":
0x00000000-0x00200000 : "linux_initrd"
0x00200000-0x00600000 : "rootfs"
0x00600000-0x00a00000 : "backroot"
0x00a00000-0x01e00000 : "software"
0x01e00000-0x03200000 : "backsoft"
0x03200000-0x03600000 : "tejas"
0x03600000-0x03e00000 : "log"
0x03e00000-0x03f00000 : "diag"
0x03f00000-0x03f40000 : "mapper"
0x03f40000-0x03fc0000 : "tomfpga"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
IPv4 over IPv4 tunneling driver
Linux IP multicast router 0.06 plus PIM-SM
ip_conntrack version 2.1 (479 buckets, 3832 max) - 292 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
arp_tables: (C) 2002 David S. Miller
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 790k freed
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 56k init
/bin/mount -t proc proc /proc
mount -t ramfs none /var && mkdir /var/cron /var/lock /var/lock/subsys /var/log /var/run /var/tmp /var/dumps && touch /var/log/wtmp /var/run/utmp
cp -a /dev/* /tmp && mount -t ramfs none /dev && mv /tmp/* /dev
eth0: config: auto-negotiation on, 100HDX, 10HDX.
slram=mtd_tjram01,0x3C00000,+0x400000 console=ttyS0,57600 init=/etc/rc.sh root=/dev/ram rw mtdsize0=0x00040000 mtdparts=a initrd
init started:  BusyBox v0.60.5 (2006.05.15-11:55+0000) multi-call
                                                                                                                                                             
BusyBox v0.60.5 (2006.06.02-06:31+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
                                                                                                                                                             
source: not found
(none)> eth0: status: link up, 100 Mbps Half Duplex, auto-negotiation complete.
                                                                                                                                                             
(none)>
(none)> eraseall /dev/mtd8
Erasing 16 Kibyte @ 7fc000 -- 99 % complete.
(none)> mount -t jffs2 /dev/mtdblock8 /tmp/drive1
(none)> cd /tmp/drive1
(none)> echo "aa" > txt
(none)> cat txt
aa
(none)> sync
(none)> cd ..
(none)> umount drive1
(none)> mount -t jffs2 /dev/mtdblock8 drive1
Node header CRC failed at 007f8244. But it must have been OK earlier.
Node was: { ffff, ffff, ffffffff, ffffffff }
Eep. Unknown node type ffff at 007f8270 was marked REF_UNCHECKED
Node header CRC failed at 007f8270. But it must have been OK earlier.
Node was: { ffff, ffff, ffffffff, ffffffff }
(none)> Eep. Unknown node type ffff at 007f8200 was marked REF_UNCHECKED
Node header CRC failed at 007f8200. But it must have been OK earlier.
Node was: { ffff, ffff, ffffffff, ffffffff }
                                                                                                                                                             
(none)> cd drive1
(none)> ls
(none)>


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

* Re: Problem replacing a Samsung K9F1208U0M NAND flash chip with ST NAND512W3A
  2007-11-04 14:34 Problem replacing a Samsung K9F1208U0M NAND flash chip with ST NAND512W3A Santanu Sen
@ 2007-11-06 21:20 ` Ricardo Scop
  0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Scop @ 2007-11-06 21:20 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: Santanu Sen

Hi Santanu,

On Sunday 04 November 2007 12:34, Santanu Sen wrote:
> Facing some trouble replacing a SAMSUNG K9F1208U0M
> with an ST NAND512W3A. I know it is criminal, but we
> are still using the 2.4 kernel. The excuse is, it is
> impossible to port all our code/drivers to 2.6 within
> the project deadline.
I know the feeling...

>
>
> Here is the story. We could successfully install JFFS2
> on a Samsung  K9F1208U0M NAND chip mounted on a board
> running linux-2.4.20 on a ppc852 processor. 
Hmmm, I would go for the newest 2.4.x kernel release from kernel.org. JFFS2 
support there is reportedly more stable, AFAIK.

Anyway, these are just my 2 cents.

HTH,

-- 
Ricardo Scop.

        \|/
    ___ -*-
   (@ @)/|\
  /  V  \|  R SCOP Consult.
 /(     )\  Linux-based communications
--^^---^^+------------------------------
rscop@matrix•com.br
+55 51 999-36-777
Porto Alegre, RS - BRazil

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

end of thread, other threads:[~2007-11-06 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-04 14:34 Problem replacing a Samsung K9F1208U0M NAND flash chip with ST NAND512W3A Santanu Sen
2007-11-06 21:20 ` Ricardo Scop

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