* problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x
@ 2006-07-21 14:56 Arun Kumar
2006-07-21 16:20 ` Ben Warren
0 siblings, 1 reply; 6+ messages in thread
From: Arun Kumar @ 2006-07-21 14:56 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 15658 bytes --]
Hi ,
Can anyone help me in this naive problem ?
I am using k 2.4.x based on ppc8245 based .I have a 8MB flash mapped to
adress -0xff800000 .with 4 interleaved AMD flash devices each of size 2Mib .
Inte
The problem I am facing are two :
I am not sure whether my flash read/write routines are working properly
.(cfi_cmdset_0002.c routines )
I am able to detect my flash and do MTD partions too on the flash .But I
cannot see that in my
dev directory .I mean I should see something like /dev/mtd0 ...etc .
As I want to mount JFFS2 and I am not sure of whether i can mount any
Filesystem without seeing it in /dev directory .
Is there way wherein I can invoke mtd->write/mtd/->
read routines so that I can be sure that my CFI driver is working fine ?
these routines are mapped to amdstd_read/write routines in cfi_cmdset_0002
routine .
mtd->read = cfi_amdstd_read;
mtd->write = cfi_amdstd_write;
Here is my dump
################################################################
LSP Revision 1
Starting kswapd
Disabling the Out Of Memory Killer
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis
Communications
AB.
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
SERIAL_PCI en
abled
ttyS00 at 0xfcf04500 (irq = 13) is a ST16650
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
AMD_FLASH_INIT called *aks *
physmap flash device: 800000 at ff800000 virtual address Number of erase
regions
: 4
Primary Vendor Command Set: 0002 (AMD/Fujitsu Standard)
Primary Algorithm Table at 0040
Alternative Vendor Command Set: 0000 (None)
No Alternate Algorithm Table
Vcc Minimum: 2.7 V
Vcc Maximum: 3.6 V
No Vpp line
Typical byte/word write timeout: 128 µs
Maximum byte/word write timeout: 256 µs
Full buffer write not supported
Typical block erase timeout: 1024 ms
Maximum block erase timeout: 16384 ms
Chip erase not supported
Device size: 0x200000 bytes (2 MiB)
Flash Device Interface description: 0x0002
- supports x8 and x16 via BYTE# with asynchronous interface
Max. bytes in buffer write: 0x1
Number of Erase Block Regions: 4
Erase Region #0: BlockSize 0x4000 bytes, 1 blocks
Erase Region #1: BlockSize 0x2000 bytes, 2 blocks
Erase Region #2: BlockSize 0x8000 bytes, 1 blocks
Erase Region #3: BlockSize 0x10000 bytes, 31 blocks
Amd/Fujitsu Extended Query Table v1.3 at 0x0040
number of CFI chips: 4
in amdstd_setup 0:
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
in MTD Partitioning <5>No RedBoot partition table detected in
phys_mapped_flash
Using physmap partition definition
Creating 3 MTD partitions on "phys_mapped_flash":
0x00000000-0x00040000 : "foo-ets0"
mtd: Giving out device 0 to foo-ets0
0x00040000-0x001e0000 : "foo-ets1"
mtd: partition "agere-ets1" doesn't end on an erase block -- force read-only
mtd: Giving out device 1 to foo-ets1
0x001e0000-0x00200000 : "foo-ets2"
mtd: partition "foo-ets2" doesn't start on an erase block boundary -- force
re
ad-only
mtd: Giving out device 2 to foo-ets2
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 8192)
IP-Config: No network devices available.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
/dev/console mapped to mkdev 5: minor: 1
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1247k freed
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 76k init
calling sbin/init
init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
Starting pid 8, console /dev/ttyS0: '/bin/ash'
/ $ cd /dev
/dev $ ls
console loop2 loop7 ram1 ram14 ram4 ram9 urandom
full loop3 mem ram10 ram15 ram5 random zero
kmem loop4 null ram11 ram16 ram6 tty
loop0 loop5 port ram12 ram2 ram7 tty0
loop1 loop6 ram0 ram13 ram3 ram8 ttyS0
################################################################
#
# Automatically generated make config: don't edit
#
# CONFIG_UID16 is not set
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_HAVE_DEC_LOCK=y
CONFIG_GENERIC_ISA_DMA=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_ADVANCED_OPTIONS is not set
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
#
# Platform support
#
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_6xx=y
# CONFIG_40x is not set
# CONFIG_440 is not set
# CONFIG_POWER3 is not set
# CONFIG_8xx is not set
# CONFIG_8260 is not set
CONFIG_PPC_STD_MMU=y
# CONFIG_EMBEDDED_OOM_KILLER is not set
# CONFIG_ALL_PPC is not set
# CONFIG_APUS is not set
# CONFIG_WILLOW is not set
# CONFIG_CPCI690 is not set
# CONFIG_PCORE is not set
# CONFIG_POWERPMC250 is not set
# CONFIG_PPMC260 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_PUMA_A is not set
# CONFIG_HXEB100 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
# CONFIG_PPLUS is not set
# CONFIG_PRPMC750 is not set
# CONFIG_PRPMC800 is not set
CONFIG_SANDPOINT=y
# CONFIG_POWERK2 is not set
# CONFIG_ADIR is not set
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_MPC10X_STORE_GATHERING is not set
# CONFIG_SANDPOINT_X3 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_IKCONFIG is not set
# CONFIG_ALTIVEC is not set
# CONFIG_TAU is not set
CONFIG_PPC_ISATIMER=y
#
# General setup
#
CONFIG_MAX_POSIX_TIMERS=3000
# CONFIG_HIGH_RES_TIMERS is not set
# CONFIG_HIGHMEM is not set
# CONFIG_ILATENCY is not set
# CONFIG_ISA is not set
# CONFIG_EISA is not set
# CONFIG_SBUS is not set
# CONFIG_MCA is not set
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SEMMNI=128
CONFIG_SYSVIPC_SEMMSL=250
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_MAX_USER_RT_PRIO=100
CONFIG_MAX_RT_PRIO=0
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_MULTITHREADED_CORES=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PCI_NAMES is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
CONFIG_PPC_RTC=m
# CONFIG_CMDLINE_BOOL is not set
#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=2
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CONCAT=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_CMDLINE_PARTS=y
#
# User Modules And Translation Layers
#
# CONFIG_MTD_CHAR is not set
# CONFIG_MTD_BLOCK is not set
# CONFIG_MTD_BLOCK_RO is not set
# 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=y
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
# CONFIG_MTD_CFI_NOSWAP is not set
CONFIG_MTD_CFI_BE_BYTE_SWAP=y
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
CONFIG_MTD_CFI_GEOMETRY=y
# CONFIG_MTD_CFI_B1 is not set
CONFIG_MTD_CFI_B2=y
# CONFIG_MTD_CFI_B4 is not set
# CONFIG_MTD_CFI_B8 is not set
# CONFIG_MTD_CFI_I1 is not set
# CONFIG_MTD_CFI_I2 is not set
CONFIG_MTD_CFI_I4=y
# CONFIG_MTD_CFI_I8 is not set
# CONFIG_MTD_CFI_INTELEXT is not set
CONFIG_MTD_CFI_AMDSTD=y
# CONFIG_MTD_CFI_STAA is not set
# 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
#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
CONFIG_MTD_PHYSMAP=y
# CONFIG_MTD_MOT_MVP is not set
# CONFIG_MTD_POWERPLUS is not set
# CONFIG_MTD_K2 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
#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
# CONFIG_MTD_DOCPROBE is not set
#
# Serial Flash Device Drivers
#
# CONFIG_MTD_SFLASH is not set
#
# NAND Flash Device Drivers
#
# CONFIG_MTD_NAND is not set
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y
# CONFIG_BLK_STATS is not set
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
#
# Cryptography support (CryptoAPI)
#
# CONFIG_CRYPTO is not set
#
# 128 bit blocksize
#
#
# 64 bit blocksize
#
#
# Deprecated
#
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_FILTER is not set
# CONFIG_NET_NEIGH_DEBUG is not set
# CONFIG_NET_RESTRICTED_REUSE is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IPSEC is not set
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
CONFIG_IPV4_IPSEC_TUNNEL=y
#
# IP: Netfilter Configuration
#
# CONFIG_IP_NF_CONNTRACK is not set
# CONFIG_IP_NF_QUEUE is not set
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
CONFIG_IPV6=m
# CONFIG_IPV6_DEBUG is not set
# CONFIG_IPV6_IM is not set
# CONFIG_IPV6_ZONE is not set
# CONFIG_IPV6_DROP_FAKE_V4MAPPED is not set
# CONFIG_IPV6_6TO4_NEXTHOP is not set
# CONFIG_IPV6_PRIVACY is not set
# CONFIG_IPV6_ANYCAST is not set
# CONFIG_IPV6_ISATAP is not set
# CONFIG_IPV6_PREFIXLIST is not set
# CONFIG_IPV6_SUBTREES is not set
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_MLD6_ALL_DONE is not set
# CONFIG_IPV6_NODEINFO is not set
#
# IPv6: Netfilter Configuration
#
# CONFIG_IP6_NF_QUEUE is not set
# CONFIG_IP6_NF_IPTABLES is not set
CONFIG_IPV6_IPSEC_TUNNEL=y
# CONFIG_IPV6_IPV6_TUNNEL is not set
# CONFIG_IPV6_MOBILITY is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
#
# Appletalk devices
#
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
#
# ATA/IDE/MFM/RLL support
#
# CONFIG_IDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Fusion MPT device support
#
# CONFIG_FUSION_BOOT is not set
# CONFIG_FUSION_ISENSE is not set
# CONFIG_FUSION_CTL is not set
# CONFIG_FUSION_LAN is not set
#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
#
# CONFIG_IEEE1394 is not set
#
# I2O device support
#
# CONFIG_I2O is not set
#
# Network device support
#
# CONFIG_NETDEVICES is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Console drivers
#
# CONFIG_VGA_CONSOLE is not set
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Input core support
#
CONFIG_INPUT=m
CONFIG_INPUT_KEYBDEV=m
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_EVDEV=m
#
# Macintosh device drivers
#
#
# Character devices
#
# CONFIG_VT is not set
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_UNIX98_PTYS is not set
# CONFIG_HVC_CONSOLE is not set
# CONFIG_IXP2000_SLAVE is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
#
# Joysticks
#
# CONFIG_INPUT_GAMEPORT is not set
# CONFIG_INPUT_SERIO is not set
#
# Joysticks
#
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_LINUX_LED is not set
# CONFIG_AMD_PM768 is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
CONFIG_AUTOFS_FS=m
CONFIG_AUTOFS4_FS=m
# CONFIG_REISERFS_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
CONFIG_EXT3_FS=m
CONFIG_JBD=m
# CONFIG_JBD_DEBUG is not set
# CONFIG_FAT_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=2
CONFIG_JFFS2_FS_NAND=y
# CONFIG_CRAMFS is not set
# CONFIG_POSIX_MQUEUE_FS is not set
# CONFIG_TMPFS is not set
CONFIG_RAMFS=y
# CONFIG_ISO9660_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS=m
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_XFS_FS is not set
# Network File Systems
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_SUNRPC is not set
# CONFIG_LOCKD is not set
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_ZISOFS_FS is not set
# Partition Types
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_SMB_NLS is not set
# CONFIG_NLS is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
#
# Bluetooth support
#
# CONFIG_BLUEZ is not set
#
# Kernel tracing
#
# CONFIG_TRACE is not set
#
# Library routines
#
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_SERIAL_TEXT_DEBUG is not set
################################################################
Can any happy soul let me know :--
1)How to mount jffs2 on this flash and also to test mtd->read/write routines
?
2) Is it ok not to see mtd0.. partions in /dev directory .
3 ) Where do I register the mtd partitions to get them noticed here ??
Thanks
Arun
[-- Attachment #2: Type: text/html, Size: 17893 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x
2006-07-21 14:56 problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x Arun Kumar
@ 2006-07-21 16:20 ` Ben Warren
2006-07-24 8:24 ` Arun Kumar
0 siblings, 1 reply; 6+ messages in thread
From: Ben Warren @ 2006-07-21 16:20 UTC (permalink / raw)
To: Arun Kumar; +Cc: linuxppc-embedded
Hi Arun,
On Fri, 2006-07-21 at 20:26 +0530, Arun Kumar wrote:
> Hi ,
> Can anyone help me in this naive problem ?
>
Then a naive answer is most fitting... Turns out that's my specialty.
> #
> # Memory Technology Devices (MTD)
> #
> CONFIG_MTD=y
> CONFIG_MTD_DEBUG=y
> CONFIG_MTD_DEBUG_VERBOSE=2
> CONFIG_MTD_PARTITIONS=y
> CONFIG_MTD_CONCAT=y
> CONFIG_MTD_REDBOOT_PARTS=y
> CONFIG_MTD_CMDLINE_PARTS=y
Probably get rid of REDBOOT if you're not using that bootloader
>
> #
> # User Modules And Translation Layers
> #
> # CONFIG_MTD_CHAR is not set
> # CONFIG_MTD_BLOCK is not set
> # CONFIG_MTD_BLOCK_RO is not set
> # CONFIG_FTL is not set
> # CONFIG_NFTL is not set
> # CONFIG_INFTL is not set
>
You need to enable MTD_CHAR to read/write and MTD_BLOCK to mount
> Can any happy soul let me know :--
>
> 1)How to mount jffs2 on this flash and also to test mtd->read/write
> routines ?
Start with the char drivers (/dev/mtd0 etc.). You'll need one for each
partition you want to experiment with.
How about creating the nodes manually?
mknod /dev/mtd0 c 90 0
mknod /dev/mtd1 c 90 2 etc. (minor # increments in 2s)
Add a block device for each partition:
mknod /dev/mtdblock0 b 31 0
mknod /dev/mtdblock1 b 31 1 etc.
Once you clean up #3 below, you should be able to read/write the char
devices using commands like 'cat', or write a simple user-space app
using "open, read, write", etc if you'd rather look at the actual binary
data.
You can then experiment with mounting the JFFS2. I recommend booting to
an NFS file system then mounting the JFFS2 with something like:
mount -t jffs2 /dev/mtdblock5 /mnt/temp (Use the correct partition)
>
> 2) Is it ok not to see mtd0.. partions in /dev directory .
Pretty sure you'll need these
>
> 3 ) Where do I register the mtd partitions to get them noticed
> here ??
Looks like your partitions are already being found, but are probably not
set up right. I don't know if this is a static definition in your board
init code or passed by command line from the bootloader, but it looks
like the values don't line up with your device:
*********
Using physmap partition definition
Creating 3 MTD partitions on "phys_mapped_flash":
0x00000000-0x00040000 : "foo-ets0"
mtd: Giving out device 0 to foo-ets0
0x00040000-0x001e0000 : "foo-ets1"
mtd: partition "agere-ets1" doesn't end on an erase block -- force
read-only
mtd: Giving out device 1 to foo-ets1
0x001e0000-0x00200000 : "foo-ets2"
mtd: partition "foo-ets2" doesn't start on an erase block boundary --
force read-only
*********
--------------------------------------------------------------------------
Hopefully this helps you proceed a little bit.
regards,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x
2006-07-21 16:20 ` Ben Warren
@ 2006-07-24 8:24 ` Arun Kumar
2006-07-24 9:24 ` Arun Kumar
2006-07-24 14:14 ` Ben Warren
0 siblings, 2 replies; 6+ messages in thread
From: Arun Kumar @ 2006-07-24 8:24 UTC (permalink / raw)
To: bwarren; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 9125 bytes --]
Hi Ben ,
Thanks for your reply .It was indeed very comrehensive .I am able to proceed
further But still there is a bit problem .
When I try to mknod physically viz mknod /dev/mtd0 .....
It says the node is readonly .
Can you please point out the problem . I am attaching a dump of the console
.
Linux/PPC load:
Uncompressing Linux...done.
Now booting the kernel ....
Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
Linux version 2.4.20_mvl31 (aks@IIB-A1040829) (gcc version 3.3.1 (MontaVista
3.3
.1-3.0.10.0300532 2003-12-24)) #368 Mon Jul 24 13:02:13 IST 2006
DBAT0U = 0x800001fe
DBAT0L = 0x8000002a
DBAT1U = 0xf0001ffe
DBAT1L = 0xf000002a
DBAT2U = 0xc00007fe
DBAT2L = 0x00000002
DBAT3U = 0xff8001fe
DBAT3L = 0xff80002a
ET4K Montavista Linux Test Platform
Port by Agere Systems
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line:
OpenPIC Version 1.2 (1 CPUs and 14 IRQ sources) at fcf40000
Calibrating delay loop... 884.73 BogoMIPS
Memory: 62084k available (1000k kernel code, 356k data, 76k 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: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Scanning bus 00
Found 00:00 [1057/0006] 000600 00
PCI:00:00.0 Resource 0 [00000000-ffffffff] is unassigned
PCI:00:00.0 Resource 1 [00000000-00000fff] is unassigned
PCI:00:00.0 Resource 2 [00000000-ffffffff] is unassigned
Found 00:78 [8086/1013] 000200 00
PCI:00:0f.0 Resource 6 [00000000-0000ffff] is unassigned
Found 00:f0 [0700/1107] 000600 00
Fixups for bus 00
Bus scan for 00 returning with max=00
PCI: bridge rsrc fc000000..fcc00000 (100), parent c011ddd4
PCI: bridge rsrc 80000000..fe000000 (200), parent c011ddf0
PCI:00:0f.0: Resource 0: fdfe0000-fdffffff (f=204)
PCI:00:0f.0: Resource 2: fdfd0000-fdfdffff (f=204)
PCI:00:0f.0: Resource 4: fcbfffc0-fcbfffff (f=101)
PCI:00:1e.0: Resource 0: fc000000-fcffffff (f=120c)
PCI:00:1e.0: Resource 2: fcbffe00-fcbffeff (f=101)
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
LSP Revision 1
Starting kswapd
Disabling the Out Of Memory Killer
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis
Communications
AB.
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
SERIAL_PCI en
abled
ttyS00 at 0xfcf04500 (irq = 13) is a ST16650
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
AMD_FLASH_INIT called *aks *
physmap flash device: 800000 at ff800000 virtual address Number of erase
regions
: 4
Primary Vendor Command Set: 0002 (AMD/Fujitsu Standard)
Primary Algorithm Table at 0040
Alternative Vendor Command Set: 0000 (None)
No Alternate Algorithm Table
Vcc Minimum: 2.7 V
Vcc Maximum: 3.6 V
No Vpp line
Typical byte/word write timeout: 128 µs
Maximum byte/word write timeout: 256 µs
Full buffer write not supported
Typical block erase timeout: 1024 ms
Maximum block erase timeout: 16384 ms
Chip erase not supported
Device size: 0x200000 bytes (2 MiB)
Flash Device Interface description: 0x0002
- supports x8 and x16 via BYTE# with asynchronous interface
Max. bytes in buffer write: 0x1
Number of Erase Block Regions: 4
Erase Region #0: BlockSize 0x4000 bytes, 1 blocks
Erase Region #1: BlockSize 0x2000 bytes, 2 blocks
Erase Region #2: BlockSize 0x8000 bytes, 1 blocks
Erase Region #3: BlockSize 0x10000 bytes, 31 blocks
Amd/Fujitsu Extended Query Table v1.3 at 0x0040
number of CFI chips: 4
in amdstd_setup 0: offset=0x0,size=0x10000,blocks=1
1: offset=0x10000,size=0x8000,blocks=2
2: offset=0x20000,size=0x20000,blocks=1
3: offset=0x40000,size=0x40000,blocks=31
4: offset=0x800000,size=0x10000,blocks=1
5: offset=0x810000,size=0x8000,blocks=2
6: offset=0x820000,size=0x20000,blocks=1
7: offset=0x840000,size=0x40000,blocks=31
8: offset=0x1000000,size=0x10000,blocks=1
9: offset=0x1010000,size=0x8000,blocks=2
10: offset=0x1020000,size=0x20000,blocks=1
11: offset=0x1040000,size=0x40000,blocks=31
12: offset=0x1800000,size=0x10000,blocks=1
13: offset=0x1810000,size=0x8000,blocks=2
14: offset=0x1820000,size=0x20000,blocks=1
15: offset=0x1840000,size=0x40000,blocks=31
cfi_cmdset_0002: Disabling fast programming due to code brokenness. aks
Enabling
*
in MTD Partitioning <5>No RedBoot partition table detected in
phys_mapped_flash
Using physmap partition definition
Creating 3 MTD partitions on "phys_mapped_flash":
0x00000000-0x00040000 : "agere-ets0"
mtd: Giving out device 0 to agere-ets0
0x00040000-0x00080000 : "agere-ets1"
mtd: Giving out device 1 to agere-ets1
0x00080000-0x0007fffe : "agere-ets2"
mtd: partition "agere-ets2" doesn't end on an erase block -- force read-only
mtd: Giving out device 2 to agere-ets2
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 8192)
IP-Config: No network devices available.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
/dev/console mapped to mkdev 5: minor: 1
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1247k freed
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 76k init
calling sbin/init
init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
Starting pid 8, console /dev/ttyS0: '/bin/ash'
BusyBox v1.2.0 (2006.07.12-05:25+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ $ mknod /dev/mtd0 c 90 0
mknod: /dev/mtd0: Read-only file system
/ $
also can you point out why it is trying to disable the fast programming ?
Thanks,
Arun
On 7/21/06, Ben Warren <bwarren@qstreams.com> wrote:
>
> Hi Arun,
>
> On Fri, 2006-07-21 at 20:26 +0530, Arun Kumar wrote:
> > Hi ,
> > Can anyone help me in this naive problem ?
> >
> Then a naive answer is most fitting... Turns out that's my specialty.
>
> > #
> > # Memory Technology Devices (MTD)
> > #
> > CONFIG_MTD=y
> > CONFIG_MTD_DEBUG=y
> > CONFIG_MTD_DEBUG_VERBOSE=2
> > CONFIG_MTD_PARTITIONS=y
> > CONFIG_MTD_CONCAT=y
> > CONFIG_MTD_REDBOOT_PARTS=y
> > CONFIG_MTD_CMDLINE_PARTS=y
> Probably get rid of REDBOOT if you're not using that bootloader
> >
> > #
> > # User Modules And Translation Layers
> > #
> > # CONFIG_MTD_CHAR is not set
> > # CONFIG_MTD_BLOCK is not set
> > # CONFIG_MTD_BLOCK_RO is not set
> > # CONFIG_FTL is not set
> > # CONFIG_NFTL is not set
> > # CONFIG_INFTL is not set
> >
> You need to enable MTD_CHAR to read/write and MTD_BLOCK to mount
>
> > Can any happy soul let me know :--
> >
> > 1)How to mount jffs2 on this flash and also to test mtd->read/write
> > routines ?
> Start with the char drivers (/dev/mtd0 etc.). You'll need one for each
> partition you want to experiment with.
> How about creating the nodes manually?
>
> mknod /dev/mtd0 c 90 0
> mknod /dev/mtd1 c 90 2 etc. (minor # increments in 2s)
>
> Add a block device for each partition:
>
> mknod /dev/mtdblock0 b 31 0
> mknod /dev/mtdblock1 b 31 1 etc.
>
> Once you clean up #3 below, you should be able to read/write the char
> devices using commands like 'cat', or write a simple user-space app
> using "open, read, write", etc if you'd rather look at the actual binary
> data.
>
> You can then experiment with mounting the JFFS2. I recommend booting to
> an NFS file system then mounting the JFFS2 with something like:
>
> mount -t jffs2 /dev/mtdblock5 /mnt/temp (Use the correct partition)
>
> >
> > 2) Is it ok not to see mtd0.. partions in /dev directory .
> Pretty sure you'll need these
> >
> > 3 ) Where do I register the mtd partitions to get them noticed
> > here ??
> Looks like your partitions are already being found, but are probably not
> set up right. I don't know if this is a static definition in your board
> init code or passed by command line from the bootloader, but it looks
> like the values don't line up with your device:
>
> *********
> Using physmap partition definition
> Creating 3 MTD partitions on "phys_mapped_flash":
> 0x00000000-0x00040000 : "foo-ets0"
> mtd: Giving out device 0 to foo-ets0
> 0x00040000-0x001e0000 : "foo-ets1"
> mtd: partition "agere-ets1" doesn't end on an erase block -- force
> read-only
> mtd: Giving out device 1 to foo-ets1
> 0x001e0000-0x00200000 : "foo-ets2"
> mtd: partition "foo-ets2" doesn't start on an erase block boundary --
> force read-only
> *********
> --------------------------------------------------------------------------
> Hopefully this helps you proceed a little bit.
>
> regards,
> Ben
>
>
--
Arun Kumar Singh
Tech Lead.
Agere India
Bangalore
[-- Attachment #2: Type: text/html, Size: 36612 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x
2006-07-24 8:24 ` Arun Kumar
@ 2006-07-24 9:24 ` Arun Kumar
2006-07-24 14:14 ` Ben Warren
1 sibling, 0 replies; 6+ messages in thread
From: Arun Kumar @ 2006-07-24 9:24 UTC (permalink / raw)
To: bwarren; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 10156 bytes --]
Ben ,
Further to my previous mail I have another problem with my busybox
initrd/RAMDISK system -my ext2 root file system is mounted as root && Read
only .as a result my mknod etc commands always returns ERROR -- root mounted
as read only ?
Any pointers for the same ? to make my RAMDISK read/writable ? so that i can
check by your method ?
Thanks ,
Arun
On 7/24/06, Arun Kumar <arunkat@gmail.com> wrote:
>
> Hi Ben ,
>
> Thanks for your reply .It was indeed very comrehensive .I am able to
> proceed further But still there is a bit problem .
>
> When I try to mknod physically viz mknod /dev/mtd0 .....
>
> It says the node is readonly .
>
> Can you please point out the problem . I am attaching a dump of the
> console .
>
>
> Linux/PPC load:
> Uncompressing Linux...done.
> Now booting the kernel ....
> Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
> Linux version 2.4.20_mvl31 ( aks@IIB-A1040829) (gcc version 3.3.1(MontaVista
> 3.3
> .1-3.0.10.0300532 2003-12-24)) #368 Mon Jul 24 13:02:13 IST 2006
> DBAT0U = 0x800001fe
> DBAT0L = 0x8000002a
> DBAT1U = 0xf0001ffe
> DBAT1L = 0xf000002a
> DBAT2U = 0xc00007fe
> DBAT2L = 0x00000002
> DBAT3U = 0xff8001fe
> DBAT3L = 0xff80002a
> ET4K Montavista Linux Test Platform
> Port by Agere Systems
> On node 0 totalpages: 16384
> zone(0): 16384 pages.
> zone(1): 0 pages.
> zone(2): 0 pages.
> Kernel command line:
> OpenPIC Version 1.2 (1 CPUs and 14 IRQ sources) at fcf40000
> Calibrating delay loop... 884.73 BogoMIPS
> Memory: 62084k available (1000k kernel code, 356k data, 76k 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: 4096 (order: 2, 16384 bytes)
> Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
> POSIX conformance testing by UNIFIX
> PCI: Probing PCI hardware
> Scanning bus 00
> Found 00:00 [1057/0006] 000600 00
> PCI:00:00.0 Resource 0 [00000000-ffffffff] is unassigned
> PCI:00:00.0 Resource 1 [00000000-00000fff] is unassigned
> PCI:00:00.0 Resource 2 [00000000-ffffffff] is unassigned
> Found 00:78 [8086/1013] 000200 00
> PCI:00:0f.0 Resource 6 [00000000-0000ffff] is unassigned
> Found 00:f0 [0700/1107] 000600 00
> Fixups for bus 00
> Bus scan for 00 returning with max=00
> PCI: bridge rsrc fc000000..fcc00000 (100), parent c011ddd4
> PCI: bridge rsrc 80000000..fe000000 (200), parent c011ddf0
> PCI:00:0f.0: Resource 0: fdfe0000-fdffffff (f=204)
> PCI:00:0f.0: Resource 2: fdfd0000-fdfdffff (f=204)
> PCI:00:0f.0: Resource 4: fcbfffc0-fcbfffff (f=101)
> PCI:00:1e.0: Resource 0: fc000000-fcffffff (f=120c)
> PCI:00:1e.0: Resource 2: fcbffe00-fcbffeff (f=101)
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
>
> LSP Revision 1
> Starting kswapd
> Disabling the Out Of Memory Killer
> JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis
> Communications
> AB.
> Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
> SERIAL_PCI en
> abled
> ttyS00 at 0xfcf04500 (irq = 13) is a ST16650
> RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
>
> AMD_FLASH_INIT called *aks *
> physmap flash device: 800000 at ff800000 virtual address Number of erase
> regions
> : 4
> Primary Vendor Command Set: 0002 (AMD/Fujitsu Standard)
> Primary Algorithm Table at 0040
> Alternative Vendor Command Set: 0000 (None)
> No Alternate Algorithm Table
> Vcc Minimum: 2.7 V
> Vcc Maximum: 3.6 V
> No Vpp line
> Typical byte/word write timeout: 128 µs
> Maximum byte/word write timeout: 256 µs
> Full buffer write not supported
> Typical block erase timeout: 1024 ms
> Maximum block erase timeout: 16384 ms
> Chip erase not supported
> Device size: 0x200000 bytes (2 MiB)
> Flash Device Interface description: 0x0002
> - supports x8 and x16 via BYTE# with asynchronous interface
> Max. bytes in buffer write: 0x1
> Number of Erase Block Regions: 4
> Erase Region #0: BlockSize 0x4000 bytes, 1 blocks
> Erase Region #1: BlockSize 0x2000 bytes, 2 blocks
> Erase Region #2: BlockSize 0x8000 bytes, 1 blocks
> Erase Region #3: BlockSize 0x10000 bytes, 31 blocks
> Amd/Fujitsu Extended Query Table v1.3 at 0x0040
> number of CFI chips: 4
>
> in amdstd_setup 0: offset=0x0,size=0x10000,blocks=1
> 1: offset=0x10000,size=0x8000,blocks=2
> 2: offset=0x20000,size=0x20000,blocks=1
> 3: offset=0x40000,size=0x40000,blocks=31
> 4: offset=0x800000,size=0x10000,blocks=1
> 5: offset=0x810000,size=0x8000,blocks=2
> 6: offset=0x820000,size=0x20000,blocks=1
> 7: offset=0x840000,size=0x40000,blocks=31
> 8: offset=0x1000000,size=0x10000,blocks=1
> 9: offset=0x1010000,size=0x8000,blocks=2
> 10: offset=0x1020000,size=0x20000,blocks=1
> 11: offset=0x1040000,size=0x40000,blocks=31
> 12: offset=0x1800000,size=0x10000,blocks=1
> 13: offset=0x1810000,size=0x8000,blocks=2
> 14: offset=0x1820000,size=0x20000,blocks=1
> 15: offset=0x1840000,size=0x40000,blocks=31
> cfi_cmdset_0002: Disabling fast programming due to code brokenness. aks
> Enabling
> *
>
>
> in MTD Partitioning <5>No RedBoot partition table detected in
> phys_mapped_flash
>
> Using physmap partition definition
> Creating 3 MTD partitions on "phys_mapped_flash":
> 0x00000000-0x00040000 : "agere-ets0"
> mtd: Giving out device 0 to agere-ets0
> 0x00040000-0x00080000 : "agere-ets1"
> mtd: Giving out device 1 to agere-ets1
> 0x00080000-0x0007fffe : "agere-ets2"
> mtd: partition "agere-ets2" doesn't end on an erase block -- force
> read-only
> mtd: Giving out device 2 to agere-ets2
>
> 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 8192)
> IP-Config: No network devices available.
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> /dev/console mapped to mkdev 5: minor: 1
> RAMDISK: Compressed image found at block 0
> Freeing initrd memory: 1247k freed
> VFS: Mounted root (ext2 filesystem) readonly.
> Freeing unused kernel memory: 76k init
> calling sbin/init
> init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
> init started: BusyBox v1.2.0 (2006.07.12-05:25+0000) multi-call binary
> Starting pid 8, console /dev/ttyS0: '/bin/ash'
>
>
> BusyBox v1.2.0 (2006.07.12-05:25+0000) Built-in shell (ash)
> Enter 'help' for a list of built-in commands.
>
> / $ mknod /dev/mtd0 c 90 0
> mknod: /dev/mtd0: Read-only file system
> / $
>
>
> also can you point out why it is trying to disable the fast programming ?
>
>
> Thanks,
> Arun
>
>
>
> On 7/21/06, Ben Warren < bwarren@qstreams.com> wrote:
> >
> > Hi Arun,
> >
> > On Fri, 2006-07-21 at 20:26 +0530, Arun Kumar wrote:
> > > Hi ,
> > > Can anyone help me in this naive problem ?
> > >
> > Then a naive answer is most fitting... Turns out that's my specialty.
> >
> > > #
> > > # Memory Technology Devices (MTD)
> > > #
> > > CONFIG_MTD=y
> > > CONFIG_MTD_DEBUG=y
> > > CONFIG_MTD_DEBUG_VERBOSE=2
> > > CONFIG_MTD_PARTITIONS=y
> > > CONFIG_MTD_CONCAT=y
> > > CONFIG_MTD_REDBOOT_PARTS=y
> > > CONFIG_MTD_CMDLINE_PARTS=y
> > Probably get rid of REDBOOT if you're not using that bootloader
> > >
> > > #
> > > # User Modules And Translation Layers
> > > #
> > > # CONFIG_MTD_CHAR is not set
> > > # CONFIG_MTD_BLOCK is not set
> > > # CONFIG_MTD_BLOCK_RO is not set
> > > # CONFIG_FTL is not set
> > > # CONFIG_NFTL is not set
> > > # CONFIG_INFTL is not set
> > >
> > You need to enable MTD_CHAR to read/write and MTD_BLOCK to mount
> >
> > > Can any happy soul let me know :--
> > >
> > > 1)How to mount jffs2 on this flash and also to test mtd->read/write
> > > routines ?
> > Start with the char drivers (/dev/mtd0 etc.). You'll need one for each
> > partition you want to experiment with.
> > How about creating the nodes manually?
> >
> > mknod /dev/mtd0 c 90 0
> > mknod /dev/mtd1 c 90 2 etc. (minor # increments in 2s)
> >
> > Add a block device for each partition:
> >
> > mknod /dev/mtdblock0 b 31 0
> > mknod /dev/mtdblock1 b 31 1 etc.
> >
> > Once you clean up #3 below, you should be able to read/write the char
> > devices using commands like 'cat', or write a simple user-space app
> > using "open, read, write", etc if you'd rather look at the actual binary
> > data.
> >
> > You can then experiment with mounting the JFFS2. I recommend booting to
> > an NFS file system then mounting the JFFS2 with something like:
> >
> > mount -t jffs2 /dev/mtdblock5 /mnt/temp (Use the correct partition)
> >
> > >
> > > 2) Is it ok not to see mtd0.. partions in /dev directory .
> > Pretty sure you'll need these
> > >
> > > 3 ) Where do I register the mtd partitions to get them noticed
> > > here ??
> > Looks like your partitions are already being found, but are probably not
> > set up right. I don't know if this is a static definition in your board
> > init code or passed by command line from the bootloader, but it looks
> > like the values don't line up with your device:
> >
> > *********
> > Using physmap partition definition
> > Creating 3 MTD partitions on "phys_mapped_flash":
> > 0x00000000-0x00040000 : "foo-ets0"
> > mtd: Giving out device 0 to foo-ets0
> > 0x00040000-0x001e0000 : "foo-ets1"
> > mtd: partition "agere-ets1" doesn't end on an erase block -- force
> > read-only
> > mtd: Giving out device 1 to foo-ets1
> > 0x001e0000-0x00200000 : "foo-ets2"
> > mtd: partition "foo-ets2" doesn't start on an erase block boundary --
> > force read-only
> > *********
> > --------------------------------------------------------------------------
> >
> > Hopefully this helps you proceed a little bit.
> >
> > regards,
> > Ben
> >
> >
>
>
> --
> Arun Kumar Singh
> Tech Lead.
> Agere India
> Bangalore
>
--
Arun Kumar Singh
Tech Lead.
Agere India
Bangalore
[-- Attachment #2: Type: text/html, Size: 38056 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x
2006-07-24 8:24 ` Arun Kumar
2006-07-24 9:24 ` Arun Kumar
@ 2006-07-24 14:14 ` Ben Warren
[not found] ` <edd12c050607260503y58808ecrdbee205fa4e617b3@mail.gmail.com>
1 sibling, 1 reply; 6+ messages in thread
From: Ben Warren @ 2006-07-24 14:14 UTC (permalink / raw)
To: Arun Kumar; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 3943 bytes --]
Arun,
Looks like there are still some things broken in your MTD partition
definition. I highly recommend that when debugging this, you boot from
an NFS mount. That way you can modify files off-line (ie. from your
development host). I'll point out a few things, but you're going to
have to surf the source code a bit:
On Mon, 2006-07-24 at 13:54 +0530, Arun Kumar wrote:
> Hi Ben ,
>
> Thanks for your reply .It was indeed very comrehensive .I am able to
> proceed further But still there is a bit problem .
>
> When I try to mknod physically viz mknod /dev/mtd0 .....
>
> It says the node is readonly .
>
> Can you please point out the problem . I am attaching a dump of the
> console .
Again, put your root FS on an NFS mount and this won't be an issue. You
can work out the ramdisk details later.
> AMD_FLASH_INIT called *aks *
> physmap flash device: 800000 at ff800000 virtual address Number of
> erase regions
> : 4
> Primary Vendor Command Set: 0002 (AMD/Fujitsu Standard)
> Primary Algorithm Table at 0040
> Alternative Vendor Command Set: 0000 (None)
> No Alternate Algorithm Table
> Vcc Minimum: 2.7 V
> Vcc Maximum: 3.6 V
> No Vpp line
> Typical byte/word write timeout: 128 µs
> Maximum byte/word write timeout: 256 µs
> Full buffer write not supported
> Typical block erase timeout: 1024 ms
> Maximum block erase timeout: 16384 ms
> Chip erase not supported
> Device size: 0x200000 bytes (2 MiB)
> Flash Device Interface description: 0x0002
> - supports x8 and x16 via BYTE# with asynchronous interface
> Max. bytes in buffer write: 0x1
> Number of Erase Block Regions: 4
> Erase Region #0: BlockSize 0x4000 bytes, 1 blocks
> Erase Region #1: BlockSize 0x2000 bytes, 2 blocks
> Erase Region #2: BlockSize 0x8000 bytes, 1 blocks
> Erase Region #3: BlockSize 0x10000 bytes, 31 blocks
> Amd/Fujitsu Extended Query Table v1.3 at 0x0040
> number of CFI chips: 4
>
> in amdstd_setup 0: offset=0x0,size=0x10000,blocks=1
> 1: offset=0x10000,size=0x8000,blocks=2
> 2: offset=0x20000,size=0x20000,blocks=1
> 3: offset=0x40000,size=0x40000,blocks=31
> 4: offset=0x800000,size=0x10000,blocks=1
> 5: offset=0x810000,size=0x8000,blocks=2
> 6: offset=0x820000,size=0x20000,blocks=1
> 7: offset=0x840000,size=0x40000,blocks=31
> 8: offset=0x1000000,size=0x10000,blocks=1
> 9: offset=0x1010000,size=0x8000,blocks=2
> 10: offset=0x1020000,size=0x20000,blocks=1
> 11: offset=0x1040000,size=0x40000,blocks=31
> 12: offset=0x1800000,size=0x10000,blocks=1
> 13: offset=0x1810000,size=0x8000,blocks=2
> 14: offset=0x1820000,size=0x20000,blocks=1
> 15: offset=0x1840000,size=0x40000,blocks=31
> cfi_cmdset_0002: Disabling fast programming due to code brokenness.
> aks Enabling
> *
Are you sure you have the correct chip family chosen in your CONFIG?
The block sizes found by CFI are different than those mentioned in
amdstd_setup... CFI shows your devices being 2MB in size, while the
other shows (1*10000 + 2*8000 + 1*20000 + 31*40000 = 0x800000) 8MB per
chip. Something is amiss here. I don't have a clue about the fast
programming. 'grep -R' is your friend.
>
> in MTD Partitioning <5>No RedBoot partition table detected in
> phys_mapped_flash
>
> Using physmap partition definition
> Creating 3 MTD partitions on "phys_mapped_flash":
> 0x00000000-0x00040000 : "agere-ets0"
> mtd: Giving out device 0 to agere-ets0
> 0x00040000-0x00080000 : "agere-ets1"
> mtd: Giving out device 1 to agere-ets1
> 0x00080000-0x0007fffe : "agere-ets2"
> mtd: partition "agere-ets2" doesn't end on an erase block -- force
> read-only
There's definitely a problem here. First of all, 0x7fffe is < 0x80000.
Note that the start and end addresses you specify for this must be on
erase block boundaries. Clean up your partition table to reflect what
you want. You didn't mention whether you're passing partition info by
command line or in init code. Also, if you're not using Redboot, get
rid of that CONFIG option.
regards,
Ben
[-- Attachment #2: Type: text/html, Size: 6615 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x
[not found] ` <edd12c050607260503y58808ecrdbee205fa4e617b3@mail.gmail.com>
@ 2006-08-03 14:18 ` Ben Warren
0 siblings, 0 replies; 6+ messages in thread
From: Ben Warren @ 2006-08-03 14:18 UTC (permalink / raw)
To: Arun Kumar; +Cc: linuxppc-embedded
Arun,
Please keep the mailing list CC'd on all correspondence. As you can
see, I've been busy for the past week and am sure there are others
listening that are more qualified to answer. Anyway...
On Wed, 2006-07-26 at 17:33 +0530, Arun Kumar wrote:
> Hi Ben ,
> I guess this is the last stage before bringing the flash up .
>
> I am able to partition and open the particular partition agere-ets1 in
> Vi editor .(without NFS)
> after enabling the MTD_CHAR and MTD_BLOCK support .
> When I ttry to save the file /text file I get an internal flash
> timeout error .I have programmed my uWriteTiemout to be 500 .
>
> I am sending a dump of the out put and the cfi_cmdset002.c as well as
> the .config file snapshots .
>
> Please take a look :-)
> It seems the code on bringup disables fast programming .
Looks like you now have char-based reads working, so I expect your
kernel is now properly configured. The AMD chip you're using has been
around for a while, so it's unlikely a source-code problem.
Have you tried mtd-utils? If not, I recommend installing them on the
board. The source as well as RPMs are available on-line at a number of
places. Google will help you here.
regards,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-08-03 14:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-21 14:56 problems with mounting JFFS2 using CFI for AM29LV160MT on ppc8245 k2.4.x Arun Kumar
2006-07-21 16:20 ` Ben Warren
2006-07-24 8:24 ` Arun Kumar
2006-07-24 9:24 ` Arun Kumar
2006-07-24 14:14 ` Ben Warren
[not found] ` <edd12c050607260503y58808ecrdbee205fa4e617b3@mail.gmail.com>
2006-08-03 14:18 ` Ben Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).