how to format the MTD of SPI flash

Dear All,

i use a SPI flash memory connected to SPI0 CS2, i enabled MTD and related setting while configure the linux kernel.

while start up, i could get the info:

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               
m25p80 spi0.2: found s25fl256s1, expected m25p16                               
m25p80 spi0.2: s25fl256s1 (32768 Kbytes)                                       
Creating 3 MTD partitions on "m25p80":                                         
0x000000000000-0x000000200000 : "bootloader(spi)"                              
0x000000200000-0x000000500000 : "linux kernel(spi)"                            
0x000000500000-0x000002000000 : "file system(spi)"                             
bfin_wdt: initialized: timeout=20 sec (nowayout=0)                             
                                                                               
                                                                               
BusyBox v1.20.2 (2013-06-30 15:27:52 HKT) hush - the humble shell              
                                                                               
root:/>

but i can't find any mtdblock on the folder /dev.

and i want to know how to format the mtd3 as FAT format or other format supported by blackfin.

I want to access them via mount command as filesystem.

by the way, on the docs web, it said a tool named bonnie++, but with buildroot 2012, i didn't see this selection. any suggestion?

Parents
  • the complete log:

    U-Boot 2012.07-rc2 (ADI-2012R2) (May 31 2013 - 08:39:59)                                                     
                                                                                                                 
    CPU:   ADSP bf512-0.2 (Detected Rev: 0.2) (spi flash boot)                                                   
    Board: ADI BF512F display board with 480x320 TFT                                                             
       Support: http://blackfin.uclinux.org/                                                                 
    Clock: VCO: 400 MHz, Core: 400 MHz, System: 100 MHz                                                          
    RAM:   32 MiB                                                                                                
    SF: Detected S25FL256S_64K with page size 64 KiB, total 32 MiB                                               
    In: serial                                                                                                
    Out:   serial                                                                                                
    Err:   serial                                                                                                
    KGDB:  [on serial]

    U-Boot 2012.07-rc2 (ADI-2012R2) (May 31 2013 - 08:39:59)

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

    Board: ADI BF512F display board with 480x320 TFT

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

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

    RAM:   32 MiB

    SF: Detected S25FL256S_64K with page size 64 KiB, total 32 MiB

    In:    serial

    Out:   serial

    Err:   serial

    KGDB:  [on serial] ready

    Hit any key to stop autoboot:  0

    SF: Detected S25FL256S_64K with page size 64 KiB, total 32 MiB

                                                                                         
    Hit any key to stop autoboot:  0                                                                             

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

       Image Name:   bf512-0.2-3.5.7-ADI-2012R2

       Created:  2013-06-30   7:33:12 UTC

       Image Type:   Blackfin Linux Kernel Image (gzip compressed)

       Data Size: 1051840 Bytes = 1 MiB

       Load Address: 00001000

       Entry Point:  00130724

       Verifying Checksum ... OK

       Uncompressing Kernel Image ... OK

    Starting Kernel at = 00130724

    Linux version 3.5.7-ADI-2012R2 (astankvai@HOTLOTUS) (gcc version 4.3.5 (ADI-2012R2-RC2) ) #96 Sun Jun 30 15:33:08 HKT 2013

    register early platform devices

    bootconsole [early_shadow0] enabled

    bootconsole [early_BFuart0] enabled

    early printk enabled on early_BFuart0

    Board Memory: 32MB

    Kernel Managed Memory: 32MB

    Memory map:

      fixedcode = 0x00000400-0x00000490

      text  = 0x00001000-0x000c56b8
      rodata = 0x000c56b8-0x00101c78
      bss   = 0x00102000-0x0011250c
      data  = 0x00112520-0x0012a000
    stack   = 0x00128000-0x0012a000
      init  = 0x0012a000-0x0019b000

      available = 0x0019b000-0x01f00000

      DMA Zone  = 0x01f00000-0x02000000

    Hardware Trace active and enabled

    Boot Mode: 3

    Reset caused by Software reset

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

    Compiled for ADSP-BF512 Rev 0.2

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

    Processor Speed: 400 MHz core clock and 100 MHz System Clock

    MPU: setting up cplb tables with memory protection

    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: 7874

    Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,115200 console=ttyBF0,115200

    PID hash table entries: 128 (order: -3, 512 bytes)

    Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

    Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

    Memory available: 27320k/32768k RAM, (452k init code, 785k kernel code, 403k data, 1024k dma, 2784k reserved)

    NR_IRQS:159

    Configuring Blackfin Priority Driven Interrupts

    Console: colour dummy device 80x25

    console [ttyBF0] enabled, bootconsole disabled

    console [ttyBF0] enabled, bootconsole disabled

    Calibrating delay loop... 792.57 BogoMIPS (lpj=1585152)

    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: 32 KB (25 KB free)

    Blackfin DMA Controller

    ezbrd_init(): registering device resources

    bfin-spi bfin-spi.0: master is unqueued, this is deprecated

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

    bfin-spi bfin-spi.1: master is unqueued, this is deprecated

    bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc03400, dma channel@5

    debug-mmrs: setting up Blackfin MMR debugfs

    msgmni has been set to 53

    dma_alloc_init: dma_page @ 0x01231000 - 256 pages at 0x01f00000

    open fb device

    Console: switching to colour frame buffer device 60x40

    bfin-lq035q1 bfin-lq035q1: 480x320 16-bit RGB FrameBuffer 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

    m25p80 spi0.2: found s25fl256s1, expected m25p16

    m25p80 spi0.2: s25fl256s1 (32768 Kbytes)

    Creating 3 MTD partitions on "m25p80":

    0x000000000000-0x000000200000 : "bootloader(spi)"

    0x000000200000-0x000000500000 : "linux kernel(spi)"

    0x000000500000-0x000002000000 : "file system(spi)"

    bfin_wdt: initialized: timeout=20 sec (nowayout=0)

    BusyBox v1.20.2 (2013-06-30 15:27:52 HKT) hush - the humble shell

    root:/>

    and i found this web:

    http://xshan8333.blog.163.com/blog/static/31517532201182091954869/

    http://blog.sina.com.cn/s/blog_4e1b28dd0100f9gd.html

    but they are not the same.

Reply
  • the complete log:

    U-Boot 2012.07-rc2 (ADI-2012R2) (May 31 2013 - 08:39:59)                                                     
                                                                                                                 
    CPU:   ADSP bf512-0.2 (Detected Rev: 0.2) (spi flash boot)                                                   
    Board: ADI BF512F display board with 480x320 TFT                                                             
       Support: http://blackfin.uclinux.org/                                                                 
    Clock: VCO: 400 MHz, Core: 400 MHz, System: 100 MHz                                                          
    RAM:   32 MiB                                                                                                
    SF: Detected S25FL256S_64K with page size 64 KiB, total 32 MiB                                               
    In: serial                                                                                                
    Out:   serial                                                                                                
    Err:   serial                                                                                                
    KGDB:  [on serial]

    U-Boot 2012.07-rc2 (ADI-2012R2) (May 31 2013 - 08:39:59)

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

    Board: ADI BF512F display board with 480x320 TFT

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

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

    RAM:   32 MiB

    SF: Detected S25FL256S_64K with page size 64 KiB, total 32 MiB

    In:    serial

    Out:   serial

    Err:   serial

    KGDB:  [on serial] ready

    Hit any key to stop autoboot:  0

    SF: Detected S25FL256S_64K with page size 64 KiB, total 32 MiB

                                                                                         
    Hit any key to stop autoboot:  0                                                                             

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

       Image Name:   bf512-0.2-3.5.7-ADI-2012R2

       Created:  2013-06-30   7:33:12 UTC

       Image Type:   Blackfin Linux Kernel Image (gzip compressed)

       Data Size: 1051840 Bytes = 1 MiB

       Load Address: 00001000

       Entry Point:  00130724

       Verifying Checksum ... OK

       Uncompressing Kernel Image ... OK

    Starting Kernel at = 00130724

    Linux version 3.5.7-ADI-2012R2 (astankvai@HOTLOTUS) (gcc version 4.3.5 (ADI-2012R2-RC2) ) #96 Sun Jun 30 15:33:08 HKT 2013

    register early platform devices

    bootconsole [early_shadow0] enabled

    bootconsole [early_BFuart0] enabled

    early printk enabled on early_BFuart0

    Board Memory: 32MB

    Kernel Managed Memory: 32MB

    Memory map:

      fixedcode = 0x00000400-0x00000490

      text  = 0x00001000-0x000c56b8
      rodata = 0x000c56b8-0x00101c78
      bss   = 0x00102000-0x0011250c
      data  = 0x00112520-0x0012a000
    stack   = 0x00128000-0x0012a000
      init  = 0x0012a000-0x0019b000

      available = 0x0019b000-0x01f00000

      DMA Zone  = 0x01f00000-0x02000000

    Hardware Trace active and enabled

    Boot Mode: 3

    Reset caused by Software reset

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

    Compiled for ADSP-BF512 Rev 0.2

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

    Processor Speed: 400 MHz core clock and 100 MHz System Clock

    MPU: setting up cplb tables with memory protection

    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: 7874

    Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,115200 console=ttyBF0,115200

    PID hash table entries: 128 (order: -3, 512 bytes)

    Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

    Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

    Memory available: 27320k/32768k RAM, (452k init code, 785k kernel code, 403k data, 1024k dma, 2784k reserved)

    NR_IRQS:159

    Configuring Blackfin Priority Driven Interrupts

    Console: colour dummy device 80x25

    console [ttyBF0] enabled, bootconsole disabled

    console [ttyBF0] enabled, bootconsole disabled

    Calibrating delay loop... 792.57 BogoMIPS (lpj=1585152)

    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: 32 KB (25 KB free)

    Blackfin DMA Controller

    ezbrd_init(): registering device resources

    bfin-spi bfin-spi.0: master is unqueued, this is deprecated

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

    bfin-spi bfin-spi.1: master is unqueued, this is deprecated

    bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc03400, dma channel@5

    debug-mmrs: setting up Blackfin MMR debugfs

    msgmni has been set to 53

    dma_alloc_init: dma_page @ 0x01231000 - 256 pages at 0x01f00000

    open fb device

    Console: switching to colour frame buffer device 60x40

    bfin-lq035q1 bfin-lq035q1: 480x320 16-bit RGB FrameBuffer 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

    m25p80 spi0.2: found s25fl256s1, expected m25p16

    m25p80 spi0.2: s25fl256s1 (32768 Kbytes)

    Creating 3 MTD partitions on "m25p80":

    0x000000000000-0x000000200000 : "bootloader(spi)"

    0x000000200000-0x000000500000 : "linux kernel(spi)"

    0x000000500000-0x000002000000 : "file system(spi)"

    bfin_wdt: initialized: timeout=20 sec (nowayout=0)

    BusyBox v1.20.2 (2013-06-30 15:27:52 HKT) hush - the humble shell

    root:/>

    and i found this web:

    http://xshan8333.blog.163.com/blog/static/31517532201182091954869/

    http://blog.sina.com.cn/s/blog_4e1b28dd0100f9gd.html

    but they are not the same.

Children
No Data