[#5975] kernel boots up on bf533 stamp shows spi flash partition info without externel spi flash on
Submitted By: Mingquan Pan
Open Date
2010-03-18 00:54:30 Close Date
2010-08-17 22:33:31
Priority:
Medium Assignee:
Barry Song
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
BF533 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
4.3.4 (ADI-trunk/svn-3815)
App binary format:
N/A
Summary: kernel boots up on bf533 stamp shows spi flash partition info without externel spi flash on
Details:
kernel boots up on bf533 stamp shows spi flash partition info without externel spi flash on.
bfin> bootm
## Booting kernel from Legacy Image at 02000000 ...
Image Name: bf533-2.6.33.1-ADI-2010R1-pre-sv
Created: 2010-03-18 3:36:48 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 2035713 Bytes = 1.9 MB
Load Address: 00001000
Entry Point: 001a2550
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 001a2550
Linux version 2.6.33.1-ADI-2010R1-pre-svn8471 (test@uclinux75-bf533-stamp-wt) (gcc version 4.3.4 (ADI-trunk/svn-3815) ) #4 Thu Mar 18 11:36:37 CST 2010
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Limiting kernel memory to 56MB due to anomaly 05000263
Board Memory: 128MB
Kernel Managed Memory: 128MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0011e740
rodata = 0x0011e740-0x00178b1c
bss = 0x00179000-0x00189c4c
data = 0x00189c4c-0x0019a000
stack = 0x00198000-0x0019a000
init = 0x0019a000-0x003b8000
available = 0x003b8000-0x03800000
DMA Zone = 0x07f00000-0x08000000
Hardware Trace Active and Enabled
Boot Mode: 0
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF533 Rev 0.3
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 497 MHz core clock and 82 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-through) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 52968k/131072k RAM, (2168k init code, 1141k kernel code, 495k data, 1024k dma, 73276k reserved)
Hierarchical RCU implementation.
NR_IRQS:81
Configuring Blackfin Priority Driven Interrupts
console [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 987.13 BogoMIPS (lpj=1974272)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 64 KB (52 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
stamp_init(): registering device resources
bio: create slab <bio-0> at 0
Switching to clocksource bfin_cs_cycles
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) � 2001-2006 Red Hat, Inc.
msgmni has been set to 103
io scheduler noop registered
io scheduler cfq registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART
brd: module loaded
m25p80 spi0.2: non-JEDEC variant of m25p64
m25p80 spi0.2: m25p64 (8192 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
0x000000040000-0x0000001c0000 : "linux kernel(spi)"
0x0000001c0000-0x000000800000 : "file system(spi)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@5
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
eth0: SMC91C11xFD (rev 1) at 20300300 IRQ 40 [nowait]
eth0: Ethernet addr: 00:e0:22:fe:07:5c
TCP cubic registered
NET: Registered protocol family 17
Freeing unused kernel memory: 2168k freed
dma_alloc_init: dma_page @ 0x02427000 - 256 pages at 0x07f00000
_____________________________________
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 - http://www.analog.com/blackfin
Have a lot of fun...oot:/> 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:/> mount -t jffs2 /dev/mtdblock2 /mnt
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000c38: 0x1000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000f78: 0x1000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001018: 0x1000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000011d8: 0x1000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005268: 0x0040 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005f10: 0x0020 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00007258: 0x4000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000743c: 0x8000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000074bc: 0x8000 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000763c: 0x8000 instead
Further such events for this erase block will not be printed
Follow-ups
--- Barry Song 2010-06-12 02:18:09
the following mainline patch causes the problem:
http://lkml.org/lkml/2009/8/18/364
"reviosly the driver always tried JEDEC probing, assuming that non-JEDEC
chips will return '0'. But truly non-JEDEC chips (like CAT25) won't do
that, their behaviour on RDID command is undefined, so the driver should
not call jedec_probe() for these chips.
Also, be less strict on error conditions, don't fail to probe if JEDEC
found a chip that is different from what platform code told, instead
just print some warnings and use an information obtained via JEDEC. In
that case we should not trust partitions any longer, but they might be
still useful (i.e. they could protect some parts of the chip)."
I'd like to check with the author for a fix.
-barry
--- Barry Song 2010-06-24 06:50:49
Applied David Woodhouse <dwmw2@infradead.org>'s patch:
@@ -680,6 +680,16 @@
{ "m25p64", INFO(0x202017, 0, 64 * 1024, 128, 0) },
{ "m25p128", INFO(0x202018, 0, 256 * 1024, 64, 0) },
+ { "m25p05-nonjedec", INFO(0, 0, 32 * 1024, 2, 0) },
+ { "m25p10-nonjedec", INFO(0, 0, 32 * 1024, 4, 0) },
+ { "m25p20-nonjedec", INFO(0, 0, 64 * 1024, 4, 0) },
+ { "m25p40-nonjedec", INFO(0, 0, 64 * 1024, 8, 0) },
+ { "m25p80-nonjedec", INFO(0, 0, 64 * 1024, 16, 0) },
+ { "m25p16-nonjedec", INFO(0, 0, 64 * 1024, 32, 0) },
+ { "m25p32-nonjedec", INFO(0, 0, 64 * 1024, 64, 0) },
+ { "m25p64-nonjedec", INFO(0, 0, 64 * 1024, 128, 0) },
+ { "m25p128-nonjedec", INFO(0, 0, 256 * 1024, 64, 0) },
+
{ "m45pe10", INFO(0x204011, 0, 64 * 1024, 2, 0) },
{ "m45pe80", INFO(0x204014, 0, 64 * 1024, 16, 0) },
{ "m45pe16", INFO(0x204015, 0, 64 * 1024, 32, 0) },
@@ -795,8 +805,7 @@
jid = jedec_probe(spi);
if (!jid) {
- dev_info(&spi->dev, "non-JEDEC variant of %s\n",
- id->name);
+ return -ENODEV;
} else if (jid != id) {
/*
* JEDEC knows better, so overwrite platform ID. We
-barry
--- Vivi Li 2010-08-17 22:33:31
OK now. Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found