AnsweredAssumed Answered

SPI Flash mount problems after kernelupdate (2.6.x --> 3.2.0)

Question asked by Henning on May 4, 2012
Latest reply on May 8, 2012 by Henning

Hello,

 

as long as I was working with the kernel 2.6.x everything works fine with my custom board. Especially the spi flash was mounted.

 

U-Boot 2010.06-svn288 (ADI-2010R1-RC2) (Mar 09 2012 - 10:59:18)

 

CPU:   ADSP bf526-0.2 (Detected Rev: 0.2) (spi flash boot)

Board: FHF Indutel-IP

       Support: http://blackfin.uclinux.org/

Clock: VCO: 300 MHz, Core: 300 MHz, System: 100 MHz

RAM:   64 MiB

SF: Detected M25P128 with page size 256, total 16 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Turn Relay Off

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin> run flashboot

SF: Detected M25P128 with page size 256, total 16 MiB

16384 KiB M25P128 at 0:1 is now current device

## Booting kernel from Legacy Image at 03000000 ...

   Image Name:   Linux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    7700367 Bytes = 7.3 MiB

   Load Address: 00001000

   Entry Point:  00228570

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 00228570

Linux version 2.6.35.7-ADI-2011R1-pre-svn343 (hh@FHF-Linix-HH) (gcc version 4.3.5 (ADI) ) #11 Wed Apr 25 10:06:36 CEST 2012

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Found mtd parition at 0x00240000, (len=0x1000000), moving to 0x02f00000

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00169e08

  rodata    = 0x00169e08-0x001f1ff4

  bss       = 0x001f2000-0x002058e0

  data      = 0x002058e0-0x0021e000

    stack   = 0x0021c000-0x0021e000

  init      = 0x0021e000-0x00240000

  available = 0x00240000-0x02f00000

  rootfs    = 0x02f00000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 3

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF526 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 300 MHz core clock and 100 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-back) in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 11938

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 debug earlyprintk=serial,uart0,57600 console=ttyBF0,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)

Kernel managed physical pages: 12032

Memory available: 45256k/65536k RAM, (136k init code, 1443k kernel code, 721k data, 1024k dma, 572k reserved)

Hierarchical RCU implementation.

        RCU-based detection of stalled CPUs is disabled.

        Verbose stalled-CPUs detection is disabled.

NR_IRQS:159

Configuring Blackfin Priority Driven Interrupts

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 595.96 BogoMIPS (lpj=1191936)

pid_max: default: 32768 minimum: 301

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: 48 KB (35 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

fhf_1404_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

input: attiny-keypad as /devices/platform/i2c-bfin-twi.0/i2c-0/0-0034/input/input0

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

Advanced Linux Sound Architecture Driver Version 1.0.23.

Switching to clocksource bfin_cs_cycles

musb_hdrc: version 6.0, musb-dma, host, debug=0

musb_hdrc: ConfigData=0x00 (UTMI-8)

musb_hdrc: kernel must blacklist external hubs

musb_hdrc: HDRC RTL version 1.900

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

musb_hdrc musb_hdrc.0: supports USB remote wakeup

usb usb1: default language 0x0409

usb usb1: udev 1, busnum 1, minor = 0

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: MUSB HDRC host driver

usb usb1: Manufacturer: Linux 2.6.35.7-ADI-2011R1-pre-svn343 musb-hcd

usb usb1: SerialNumber: musb_hdrc.0

usb usb1: usb_probe_device

usb usb1: configuration #1 chosen from 1 choice

usb usb1: adding 1-0:1.0 (config #1, interface 0)

hub 1-0:1.0: usb_probe_interface

hub 1-0:1.0: usb_probe_interface - got id

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

hub 1-0:1.0: standalone hub

hub 1-0:1.0: individual port power switching

hub 1-0:1.0: no over-current protection

hub 1-0:1.0: power on to power good time: 10ms

hub 1-0:1.0: local power source is good

hub 1-0:1.0: enabling power on all ports

musb_hdrc musb_hdrc.0: USB Host mode controller at ffc03800 using DMA, IRQ 59

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

Setting up Blackfin MMR debugfs

hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000

JFFS2 version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.

msgmni has been set to 88

io scheduler noop registered

io scheduler cfq registered (default)

bfin-jtag-comm: initialized

bfin-dma: initialized

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

brd: module loaded

uclinux[mtd]: RAM probe address=0x2f00000 size=0x1000000

Creating 1 MTD partitions on "RAM":

0x000000000000-0x000001000000 : "ROMfs"

m25p80 spi0.1: m25p128 (16384 Kbytes)

Creating 3 MTD partitions on "m25p128":

0x000000000000-0x000000080000 : "bootloader(spi 512 kB)"

0x000000080000-0x000000600000 : "persistent files(spi 5.5 MB)"

0x000000600000-0x000001000000 : "uImage.ext2(spi 10 MB)"

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

mice: PS/2 mouse device common for all mice

i2c /dev entries driver

bfin-wdt: initialized: timeout=2 sec (nowayout=1)

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

No device for DAI MAX9851

dma rx:5 tx:6, err irq:16, regs:ffc00900

bf5xx_max9851_init 140 enter

bf5xx_max9851_init platform_device_alloc OK

max9851 Audio Codec 0.5

dma_alloc_init: dma_page @ 0x011a3000 - 256 pages at 0x03f00000

asoc: MAX9851 <-> bf5xx-i2s mapping ok

bf5xx_max9851_init add: 0

ALSA device list:

  #0: bf5xx_max9851 (MAX9851)

nf_conntrack version 0.5.0 (707 buckets, 2828 max)

ip_tables: (C) 2000-2006 Netfilter Core Team

TCP cubic registered

NET: Registered protocol family 17

VFS: Mounted root (ext2 filesystem) on device 31:0.

Freeing unused kernel memory: 136k freed

set relay off

probing persistent memory

mounted persistent memory

Network setup

eth0 is 192.168.40.111 netmask 255.255.255.0, default route is 192.168.40.1

enviroment setup

Staring Asterisk

Waiting for Asterisk

[Jan  1 00:00:03] NOTICE[282]: cdr.c:1449 do_reload: CDR simple logging enabled.

[Jan  1 00:00:03] NOTICE[282]: loader.c:1006 load_modules: 20 modules will be loaded.

PHY: 0:00 - Link is Up - 100/Full

Starting telefon

                           _____________________________________

        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...

 

 

BusyBox v1.16.2 (2012-04-25 09:53:08 CEST) hush - the humble shell

 

root:/> version

kernel:    Linux release 2.6.35.7-ADI-2011R1-pre-svn343, build #11 Wed Apr 25 10:06:36 CEST 2012

toolchain: bfin-linux-uclibc-gcc release gcc version 4.3.5 (ADI)

user-dist: release svn-356, build #260 Wed Apr 25 10:07:05 CEST 2012

 

But I had to update the kernel. Basically I copied the 3.2.0 Kernel into trunk and implemented a switch, so that I can change between the old and the new kernel via make menuconfig. The new kernel complies without errors and everything seems to be all right, but the spi flash is not mounted anymore.

U-Boot 2010.06-svn288 (ADI-2010R1-RC2) (Mar 09 2012 - 10:59:18)

 

CPU:   ADSP bf526-0.2 (Detected Rev: 0.2) (spi flash boot)

Board: FHF Indutel-IP

       Support: http://blackfin.uclinux.org/

Clock: VCO: 300 MHz, Core: 300 MHz, System: 100 MHz

RAM:   64 MiB

SF: Detected M25P128 with page size 256, total 16 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Turn Relay Off

Net:   bfin_mac

Hit any key to stop autoboot:  0

Using bfin_mac device

TFTP from server 192.168.40.34; our IP address is 192.168.40.111

Filename 'uImage.ext2'.

Load address: 0x3000000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #####################################

done

Bytes transferred = 5302650 (50e97a hex)

## Booting kernel from Legacy Image at 03000000 ...

   Image Name:   Linux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    5302586 Bytes = 5.1 MiB

   Load Address: 00001000

   Entry Point:  001f598c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001f598c

Linux version 3.0.8-ADI-2011R1 (hh@FHF-Linix-HH) (gcc version 4.3.5 (ADI) ) #3 Fri May 4 10:03:38 CEST 2012

register early platform devices

Found mtd parition at 0x0020c000, (len=0x1000000), moving to 0x02f00000

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00156cb8

  rodata    = 0x00156cb8-0x001cbbe4

  bss       = 0x001cc000-0x001de0ec

  data      = 0x001de0ec-0x001f2000

    stack   = 0x001f0000-0x001f2000

  init      = 0x001f2000-0x0020c000

  available = 0x0020c000-0x02f00000

  rootfs    = 0x02f00000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace active and enabled

Boot Mode: 3

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF526 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 300 MHz core clock and 75 MHz System Clock

boot memmap: 000000000020c000 - 0000000002f00000 (usable)

On node 0 totalpages: 12032

free_area_init_node: node 0, pgdat 001ef384, node_mem_map 0020e000

  DMA zone: 94 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 11938 pages, LIFO batch:0

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-back) in data cache

pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768

pcpu-alloc: [0] 0

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 11938

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 debug earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=192.168.40.111:192.168.40.34:192.f

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)

Kernel managed physical pages: 12032

Memory available: 45424k/65536k RAM, (104k init code, 1367k kernel code, 621k data, 1024k dma, 612k reserved)

NR_IRQS:159

Configuring Blackfin Priority Driven Interrupts

console [ttyBF0] enabled

Calibrating delay loop... 594.88 BogoMIPS (lpj=990208)

pid_max: default: 32768 minimum: 301

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: 48 KB (36 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

Advanced Linux Sound Architecture Driver Version 1.0.24.

Switching to clocksource bfin_cs_cycles

Switched to NOHz mode on CPU #0

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) (SUMMARY)  �© 2001-2006 Red Hat, Inc.

msgmni has been set to 88

io scheduler noop registered

io scheduler cfq registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

bfin-jtag-comm: initialized

bfin-dma: initialized

brd: module loaded

uclinux[mtd]: RAM probe address=0x2f00000 size=0x1000000

Creating 1 MTD partitions on "RAM":

0x000000000000-0x000001000000 : "ROMfs"

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Micrel KS8051] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=2500000Hz(mdc_div=14)@sclk=75MHz)

bfin_mac bfin_mac.0: eth0: Blackfin on-chip Ethernet MAC driver, Version 1.1

mousedev: PS/2 mouse device common for all mice

i2c /dev entries driver

bfin-wdt: initialized: timeout=20 sec (nowayout=1)

ALSA device list:

  No soundcards found.

nf_conntrack version 0.5.0 (709 buckets, 2836 max)

ip_tables: (C) 2000-2006 Netfilter Core Team

TCP cubic registered

NET: Registered protocol family 17

dma_alloc_init: dma_page @ 0x002fb000 - 256 pages at 0x03f00000

IP-Config: Complete:

     device=eth0, addr=192.168.40.111, mask=255.255.255.0, gw=192.168.40.2,

     host=FHF, domain=, nis-domain=(none),

     bootserver=192.168.40.34, rootserver=192.168.40.34, rootpath=

VFS: Mounted root (ext2 filesystem) on device 31:0.

Freeing unused kernel memory: 104k freed

Waiting for Asterisk

PHY: 0:00 - Link is Up - 100/Full

                           _____________________________________

        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...

 

 

BusyBox v1.16.2 (2012-05-04 09:11:39 CEST) hush - the humble shell

 

root:/> version

kernel:    Linux release 3.0.8-ADI-2011R1, build #3 Fri May 4 10:03:38 CEST 2012

toolchain: bfin-linux-uclibc-gcc release gcc version 4.3.5 (ADI)

user-dist: release svn-356, build #321 Fri May 4 10:03:22 CEST 2012

 

 

Attached are the boardfile and the kernel-config.

 

What am I doing wrong? Why is the spi-flash not mounted anymore. I also went through the boardfile of the ezkit, in order to check, that the symbols are the same, but that did not help me either. Does anyone has an idea or tip??

 

Thanks for your time and your help

Outcomes