2008-04-25 06:34:10 How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
Aaron Zhong (CHINA)
Message: 54950
HI, could someone tell me how to probe the 4M paralle flash on BF527-EZKIT?
The flash type is ST Micro M29W320EB. I have used both of CFI and Non-CFI probe, but the kernel always could not
detect the flash. My uClinux version and toolchain version are 2008R1-RC8 and 08r1-8 respectively.
My kernel configuration for MTD is:
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_CONCAT=y
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# CONFIG_SSFDC 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_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
#
# Mapping drivers for chip access
#
CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_UCLINUX is not set
# CONFIG_MTD_PLATRAM is not set
#
# Self-contained MTD device drivers
#
# CONFIG_MTD_DATAFLASH is not set
# CONFIG_MTD_M25P80 is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
CONFIG_MTD_BLOCK2MTD=y
#
# 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_NAND is not set
# CONFIG_MTD_ONENAND is not set
QuoteReplyEditDelete
2008-04-25 07:23:57 Re: How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
blue hash (UNITED STATES)
Message: 54954 In Mapping drivers for chip access, enable
MTD_PHYSMAP
Make sure all the three fields are 0s. These fields aer all deprecated and not used by the kernel.
The rest look fine.
I dont how different is the 527, but I'n using the 537.
QuoteReplyEditDelete
2008-04-25 17:34:50 Re: How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
Mike Frysinger (UNITED STATES)
Message: 54965 we need to add a default partition layout to the bf527 ezkit.c, otherwise people will need to use the mtdparts command line option ... i think vivi/grace opened a bug about it
QuoteReplyEditDelete
2008-04-25 21:43:49 Re: How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
Aaron Zhong (CHINA)
Message: 54969
Thanks all of you very much. I have The kernel has reported that it detect the flash:
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Another question is how to create some partitions on it? Modify the physmap.c directly?
You said vivi/grace open a bug about it. Is there any patchs I can use?
QuoteReplyEditDelete
2008-04-25 22:07:42 Re: How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
Mike Frysinger (UNITED STATES)
Message: 54971 refer to the documentation:
http://docs.blackfin.uclinux.org/doku.php?id=enabling_jffs2#setting_jffs2_flash_partitions
QuoteReplyEditDelete
2008-04-26 00:03:57 Re: How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
Aaron Zhong (CHINA)
Message: 54973
I read the guide and get both parallel and serial flash partition work. But the kernel seems could not mount the jffs2 rootfs.
Could you give me some help? The ls command could display the file system correctly.
bfin> ls
Scanning JFFS2 FS: | / - \ . | . / - \ | / - \ | / - done.
drwxrwxrwt 0 Wed Apr 23 01:56:05 2008 tmp
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 root
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 usr
drwxr-xr-x 0 Sat Apr 26 02:54:37 2008 etc
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 var
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 home
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 mnt
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 sys
drwxr-xr-x 0 Sat Apr 26 02:54:37 2008 bin
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 proc
drwxr-xr-x 0 Wed Apr 23 01:56:05 2008 lib
drwxr-xr-x 0 Sat Apr 26 02:54:38 2008 dev
lrwxrwxrwx 3 Sat Apr 26 02:54:33 2008 sbin -> bin
The kernel message is:
physmap platform flash device: 00400000 at 20000000
3 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "uboot"
0x00040000-0x00100000 : "kernel"
0x00100000-0x00400000 : "rootfs"
block2mtd: version $Revision: 3544 $
m25p80 spi0.1: m25p64 (8192 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x00000000-0x00040000 : "bootloader on serial flash"
0x00040000-0x00100000 : "kernel on serial flash"
0x00100000-0x00800000 : "rootfs on serial flash"
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller Driver, Version 1.8, regs_base@ffc01400
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting the system clock to 1982-10-08 22:59:50 (402965990)
jffs2: Flash size not aligned to erasesize, reducing to 0KiB
jffs2: Too few erase blocks (0)
List of all partitions:
1f00 256 mtdblock0 (driver?)
1f01 768 mtdblock1 (driver?)
1f02 3072 mtdblock2 (driver?)
1f03 256 mtdblock3 (driver?)
1f04 768 mtdblock4 (driver?)
1f05 7168 mtdblock5 (driver?)
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
QuoteReplyEditDelete
2008-04-26 08:17:00 Re: How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
blue hash (UNITED STATES)
Message: 55022 If I can be of help,
You probably did not pass the right bootargs argument in U-boot to uClinux.
In u-boot, what does
"print bootargs" say?
For your setup, it should be /dev/mtdblock2
QuoteReplyEditDelete
2008-04-28 05:16:00 Re: How to configure the kernel to probe the 4M parallel flash on BF527-EZKIT?
Aaron Zhong (CHINA)
Message: 55106
Yes, I did specified the boot argument to /dev/mtdblock2.
bfin> print bootargs
bootargs=root=/dev/mtdblock2 rw rootfstype=jffs2 earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF0,57600 mtdparts=physmap-flash.0:192k(uboot)ro,832k(kernel),-(rootfs)