[#4049] nand flash fails to be initalized on bf527 ezkit board for 08r1 branch kernel
Submitted By: Mingquan Pan
Open Date
2008-04-22 05:57:49 Close Date
2008-04-24 09:00:42
Priority:
Medium Assignee:
Michael Hennerich
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
BF527 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
08r1-8
App binary format:
N/A
Summary: nand flash fails to be initalized on bf527 ezkit board for 08r1 branch kernel
Details:
nand flash fails to be initalized on bf527 ezkit board for 08r1 branch kernel.
Modulize bfin_mac, the boot up log would be :
bfin> boote
Loading .text @ 0x00001000 (1017456 bytes)
Loading .rodata @ 0x000fa000 (227168 bytes)
Loading __ksymtab @ 0x00131760 (14560 bytes)
Loading __ksymtab_gpl @ 0x00135040 (4040 bytes)
Loading __ksymtab_strings @ 0x00136008 (44584 bytes)
Loading __param @ 0x00140e30 (300 bytes)
Loading .data @ 0x00141000 (77824 bytes)
Loading .init.text @ 0x00154000 (89408 bytes)
Loading .init.data @ 0x00169d40 (3240 bytes)
Loading .init.setup @ 0x0016a9e8 (584 bytes)
Loading .initcall.init @ 0x0016ac30 (420 bytes)
Loading .con_initcall.init @ 0x0016add4 (4 bytes)
Loading .init.ramfs @ 0x0016add8 (2573188 bytes)
Loading .text_l1 @ 0xffa00000 (5732 bytes)
sh_addr: FFA00000, p_paddr: 003DF15C
Loading from: 023E0000 to 003DF15C, size: 5732
Loading .data_l1 @ 0xff800000 (192 bytes)
sh_addr: FF800000, p_paddr: 003E07C0
Loading from: 023E2000 to 003E07C0, size: 192
Clearing .bss @ 0x003e1000 (61072 bytes)
## Starting application at 0x00154000 ...
Linux version 2.6.22.19-ADI-2008R1-svn4616 (test@linux-bf527-std) (gcc version 4.1.2 (ADI svn)) #38 Wed Apr 23 01:50:01 CST 2008
early printk enabled on early_BFuart0
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF527 Rev 0.0
Warning: Unsupported Chip Revision ADSP-BF527 Rev 0.0 detected
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 525 MHz core clock and 131 MHz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00001000-0x000f9670
rodata = 0x000fa000-0x00140f5c
data = 0x00141000-0x00154000
stack = 0x00142000-0x00144000
init = 0x00154000-0x003e1000
bss = 0x003e1000-0x003efe90
available = 0x003efe90-0x03eff000
DMA Zone = 0x03f00000-0x04000000
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists. Total pages: 16002
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 59900k/65536k RAM, (2612k init code, 993k kernel code, 422k data, 1024k dma, 584k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (42 KB free)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
Generic PHY: Registered new driver
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
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bfin-otp: initialized
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.
bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3
NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)
No oob scheme defined for oobsize 256
BUG: failure at drivers/mtd/nand/nand_base.c:2438/nand_scan_tail()!
Kernel panic - not syncing: BUG!
The config file is attached(Need to modulize bfin_mac in addition).
Follow-ups
--- Robin Getz 2008-04-22 11:30:28
Grace:
I think there are two different bugs here. Can you post them separately?
The first:
>
>peripheral_request: Peripheral 32 function 0 is already reserved by
bfin_mac
but it looks like we are not handling the error condition properly...
>bf5xx-nand: Requesting Peripherals failed
>bf5xx-nand: probe of bf5xx-nand.0 failed with error -14
>Data access misaligned address violation
failing the probe should not cause the kernel to crash.
The 2nd:
>BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog
Devices, Inc.
>bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3
>NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB
3,3V 8-bit)
>No oob scheme defined for oobsize 256
>BUG: failure at drivers/mtd/nand/nand_base.c:2438/nand_scan_tail()!
>Kernel panic - not syncing: BUG!
is just large page flash issue (I think)?
-Robin
--- Mingquan Pan 2008-04-23 04:25:36
Separated.The first one is going to bug 4053.This one tracking the secong issue.
--- Mingquan Pan 2008-04-24 01:59:16
Yeah,after invert SW1 to off off on off, the kernel with nand driver can boot up
normally.
Loading .text @ 0x00001000 (1059776 bytes)
Loading .exit.text.refok @ 0x00103bc0 (296 bytes)
Loading .rodata @ 0x00103d00 (249232 bytes)
Loading __ksymtab @ 0x00140a90 (15120 bytes)
Loading __ksymtab_gpl @ 0x001445a0 (4176 bytes)
Loading __ksymtab_strings @ 0x001455f0 (46500 bytes)
Loading __param @ 0x00150b94 (300 bytes)
Clearing .bss @ 0x00150cc0 (59012 bytes)
Loading .data @ 0x0015f344 (85180 bytes)
Loading .init.text @ 0x00174000 (92416 bytes)
Loading .init.data @ 0x0018a900 (13080 bytes)
Loading .init.setup @ 0x0018dc18 (596 bytes)
Loading .initcall.init @ 0x0018de6c (440 bytes)
Loading .con_initcall.init @ 0x0018e024 (4 bytes)
Loading .init.ramfs @ 0x0018e028 (2636798 bytes)
Loading .text_l1 @ 0xffa00000 (5548 bytes)
sh_addr: FFA00000, p_paddr: 00411C26
Loading from: 02404000 to 00411C26, size: 5548
Loading .data_l1 @ 0xff800000 (192 bytes)
sh_addr: FF800000, p_paddr: 004131D2
Loading from: 02406000 to 004131D2, size: 192
## Starting application at 0x00174000 ...
Linux version 2.6.24.4-ADI-2008R2-pre-svn4636 (test@linux) (gcc version 4.1.2
(ADI svn)) #16 Thu Apr 24 12:44:09 CST 2008
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00103bc0
rodata = 0x00103d00-0x00150cc0
bss = 0x00150cc0-0x0015f344
data = 0x0015f344-0x00174000
stack = 0x00172000-0x00174000
init = 0x00174000-0x00414000
available = 0x00414000-0x03eff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF527 Rev 0.0
Warning: Unsupported Chip Revision ADSP-BF527 Rev 0.0 detected
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 525 MHz core clock and 131 MHz System Clock
NOMPU: setting up cplb tables for global access
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16002
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 59752k/65536k RAM, (2688k init code, 1034k kernel code, 450k
data, 1024k dma, 584k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (42 KB free)
Security Framework initialized
Mount-cache hash table entries: 512
net_namespace: 64 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
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
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bfin-otp: initialized
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog
Devices, Inc.
bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3
NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V
8-bit)
Creating 2 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00400000 : "Linux Kernel"
0x00400000-0x20000000 : "File System"
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0,
regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 01:04:10 UTC (3850)
Freeing unused kernel memory: 2688k freed
dma_alloc_init: dma_page @ 0x00411000 - 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| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.10.1 (2008-04-24 12:20:27 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00020000 "Linux Kernel"
mtd1: 1fc00000 00020000 "File System"
root:/> cat /proc/partitions
major minor #blocks name
31 0 4096 mtdblock0
31 1 520192 mtdblock1
But then another problem is it looks this design makes it impossible to run the
case automatically and everytime I need to download the image I enable the
ethernet card,and when booting this kernel,I have to invert back...
--- Mike Frysinger 2008-04-24 02:32:49
well, there's literally nothing we can do about it. it's a hardware issue, not
a software one. i'm not even sure it can be solved automatically in hardware
(presumably if it were possible, i'd be fixed already). the BF52x processors
themselves mux the MAC and the NAND controller so they cannot be used
simultaneously.
so yes, testing NAND on the BF527-EZKIT will have to be manually done. or you
load it over the serial port ;).
about the only thing here for Michael to do is make sure there is proper error
checking when resource allocation fails.
--- Michael Hennerich 2008-04-24 04:52:47
>Yeah,after invert SW1 to off off on off, the kernel with nand driver can
boot up
normally.
Please close.
-Michael
--- Robin Getz 2008-04-24 09:00:42
Grace:
Mike is correct - you can load the compressed uImage (please start using this
in all your tests?) over serial port.
Closing this bug.
-Robin
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
nand.config application/octet-stream 25987 Mingquan Pan