[#5397] spi flash through sport0 fails to be mounted
Submitted By: Mingquan Pan
Open Date
2009-07-27 05:00:26 Close Date
2009-08-09 23:08:48
Priority:
Medium Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
BF537 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
09r1-rc9
App binary format:
N/A
Summary: spi flash through sport0 fails to be mounted
Details:
spi flash through sport0 fails to be mounted.
the spi flash can be detected in booting up, but it would print error info when mounted and would make kernel panic if copy file to the mount directly.
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1-svn70
Created: 2009-07-27 9:06:55 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 4467486 Bytes = 4.3 MB
Load Address: 00001000
Entry Point: 00196874
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 00196874
Linux version 2.6.28.10-ADI-2009R1-svn7080 (test@linux) (gcc version 4.1.2 (ADI svn)) #15 Mon Jul 27 17:06:45 GMT-8 2009
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00110d30
rodata = 0x00110d30-0x00165940
bss = 0x00166000-0x00177020
data = 0x00177020-0x00188000
stack = 0x00186000-0x00188000
init = 0x00188000-0x0083e000
available = 0x0083e000-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 0
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 125 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14223
Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174f
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover:boot [early_BFuart0] boot [early_shadow0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 48332k/65536k RAM, (6872k init code, 1087k kernel code, 477k data, 1024k dma, 7744k reserved)
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (37 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
stamp_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) .. 2001-2006 Red Hat, Inc.
msgmni has been set to 94
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
brd: module loaded
bfin_mii_bus: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
m25p80 spi1.0: m25p64 (8192 Kbytes)
Creating 3 MTD partitions on \"m25p80\":
0x00000000-0x00040000 : \"bootloader(spi)\"
0x00040000-0x001c0000 : \"linux kernel(spi)\"
0x001c0000-0x00800000 : \"file system(spi)\"
bfin-sport-spi bfin-sport-spi.1: Blackfin SPORT emulated SPI Driver, Version 1.0, regs_base@ffc00800
bfin-sport-spi bfin-sport-spi.2: Blackfin SPORT emulated SPI Driver, Version 1.0, regs_base@ffc00900
TCP cubic registered
NET: Registered protocol family 17
IP-Config: Complete:
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf537-stamp, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 6872k freed
dma_alloc_init: dma_page @ 0x0083a000 - 256 pages at 0x03f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \\
d888888b. / _ _ \\
8P\"YP\"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \\ \\/ / |
8\' .88 \\ | | | | _ \\| | | | \\ / |
8`._.\' Y8. \\ | |__ | | | | | |_| | / \\ |
d/ `8b. \\ \\____||_|_| |_|\\____|/_/\\_\\ |
dP . Y8b. \\ For embedded processors including |
d8:\' \" `::88b \\ the Analog Devices Blackfin /
d8\" \'Y88b \\___________________________________/
:8P \' :888
8a. : _a88P For further information, check out:
._/\"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\\ YP\" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \\.___.d| .\' - http://www.uclinux.org/
`--..__)8888P`._.\' jgs/a:f - https://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.13.4 (2009-07-27 13:11:25 GMT-8) built-in shell (msh)
Enter \'help\' for a list of built-in commands.
root:/> PHY: 0:01 - Link is Up - 100/Full
root:/>
root:/> cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 \"bootloader(spi)\"
mtd1: 00180000 00010000 \"linux kernel(spi)\"
mtd2: 00640000 00010000 \"file system(spi)\"
root:/> flash_eraseall /dev/mtd2
Erasing 64 Kibyte @ 640000 -- 100 % complete.
root:/> mount -t jffs2 /dev/mtdblock2 /mnt/
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000da4: 0x7f46 instead
Empty flash at 0x00000da8 ends at 0x00000e24
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e24: 0x676d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e28: 0x490a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e2c: 0xda43 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e30: 0x2643 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e34: 0xb226 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e38: 0x60a1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e3c: 0x8cca instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e40: 0xe475 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000e44: 0xb562 instead
Further such events for this erase block will not be printed
Empty flash at 0x00002598 ends at 0x00002614
Empty flash at 0x00003624 ends at 0x000086a4
Empty flash at 0x0000969c ends at 0x0000d300
Empty flash at 0x0000d400 ends at 0x0000d404
Empty flash at 0x0000d410 ends at 0x0000d484
JFFS2 notice: (164) jffs2_get_inode_nodes: Node header CRC failed at 0x0000d0. {ff67,ffff,ffffffff,ffffffff}
Node totlen on flash (0xffffffff) != totlen from node ref (0x00000030)
root:/>JFFS2 notice: (165) read_dnode: node CRC failed on dnode at 0x00305c: read 0xffffffff, calculated 0x8dfeeb83
root:/>
root:/> ls /mnt/
test
root:/> cp /bin/version /mnt/
Node totlen on flash (0xffffffff) != totlen from node ref (0x00000044)
Node CRC ffffffff != calculated CRC f09e7845 for node at 0000d504
Hardware Trace:
0 Target : <0x000047fc> { _dump_bfin_trace_buffer + 0x0 }
Source : <0x000755c4> { _jffs2_write_end + 0x24 } CALL pcrel
1 Target : <0x000755a0> { _jffs2_write_end + 0x0 }
Source : <0x0002dd64> { _generic_file_buffered_write + 0x140 } CALL (P2)
2 Target : <0x0002dd46> { _generic_file_buffered_write + 0x122 }
Source : <0x00008414> { _blackfin_dcache_flush_range + 0x18 } RTS
3 Target : <0x0000840c> { _blackfin_dcache_flush_range + 0x10 }
Source : <0x0000841c> { _blackfin_dflush_page + 0x4 } JUMP.S
4 Target : <0x00008418> { _blackfin_dflush_page + 0x0 }
Source : <0x0002dd42> { _generic_file_buffered_write + 0x11e } CALL pcrel
5 Target : <0x0002dd24> { _generic_file_buffered_write + 0x100 }
Source : <0x0002d09a> { _iov_iter_copy_from_user_atomic + 0x76 } RTS
6 Target : <0x0002d082> { _iov_iter_copy_from_user_atomic + 0x5e }
Source : <0x0002d0a8> { _iov_iter_copy_from_user_atomic + 0x84 } JUMP.S
7 Target : <0x0002d0a6> { _iov_iter_copy_from_user_atomic + 0x82 }
Source : <0xffa0141e> { _memcpy + 0x4e } RTS
8 Target : <0xffa01400> { _memcpy + 0x30 }
Source : <0xffa013f2> { _memcpy + 0x22 } IF !CC JUMP
9 Target : <0xffa013e4> { _memcpy + 0x14 }
Source : <0xffa013dc> { _memcpy + 0xc } IF !CC JUMP
10 Target : <0xffa013d0> { _memcpy + 0x0 }
Source : <0x0002d0a2> { _iov_iter_copy_from_user_atomic + 0x7e } CALL pcrel
11 Target : <0x0002d09c> { _iov_iter_copy_from_user_atomic + 0x78 }
Source : <0x0002d07e> { _iov_iter_copy_from_user_atomic + 0x5a } IF !CC JUMP
12 Target : <0x0002d07c> { _iov_iter_copy_from_user_atomic + 0x58 }
Source : <0xffa0021a> { __access_ok + 0xba } RTS
13 Target : <0xffa00218> { __access_ok + 0xb8 }
Source : <0xffa0022a> { __access_ok + 0xca } IF !CC JUMP
14 Target : <0xffa00220> { __access_ok + 0xc0 }
Source : <0xffa00194> { __access_ok + 0x34 } IF CC JUMP
15 Target : <0xffa00160> { __access_ok + 0x0 }
Source : <0x0002d078> { _iov_iter_copy_from_user_atomic + 0x54 } CALL pcrel
BUG: failure at fs/jffs2/file.c:251/jffs2_write_end()!
Kernel panic - not syncing: BUG!
Follow-ups
--- Cliff Cai 2009-07-30 05:17:05
We need add pull-up to DRxPRI and DTxPRI of the sport-spi card respectively.
I've tried the spi flash card(with AT25df641),it works just fine.Only need to
set IC2 instead of IC3 on the spi-flash card.The M25P64 flash card fails on the
test,I believe it's the problem of the card itself.
Cliff
--- Mingquan Pan 2009-08-10 04:08:58
Yes, reading and writing on AT25df641 are ok. So close this.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.sport_spi application/octet-stream 27688 Mingquan Pan