2009-06-24 11:45:23     Not able to create MTD partition in trunk-svn

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-06-24 11:45:23     Not able to create MTD partition in trunk-svn

Santhosh Kumar (INDIA)

Message: 76265   

 

I am using uclinux-dist-trunk-svn for my BF527. I have enabled jffs2 and MTD partition. Also created my own MTD partition in the file arch/blackfin/mach-bf527/boards/ezkit.c

 

static struct mtd_partition ezkit_partitions[] = {

        {

                .name       = "bootloader(nor)",// 256k for boot loader

                .size       = 0x40000,

                .offset     = 0,

        }, {

                .name       = "linux kernel(nor)",//256 k for kernel

                .size       = 0x40000,

                .offset     = MTDPART_OFS_APPEND,

        }, {

                .name       = "file system(nor)",//3.5 MB for flash

                .size       = MTDPART_SIZ_FULL,

                .offset     = MTDPART_OFS_APPEND,

        }

};

 

But MTD partition not created successfully, and i am getting this error message while boot up,

 

physmap platform flash device: 00400000 at 20000000

physmap-flash physmap-flash.0: Could not reserve memory region

physmap-flash: probe of physmap-flash.0 failed with error -12

 

But with same configuration in uClinux-dist-2008R1.5 for BF527, MTD partions are successfully created.

 

I am posting entire kernel boot up here,

 

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.28.7-ADI-2009R1-pre

   Created:      2009-06-24   6:26:16 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    5916337 Bytes =  5.6 MB

   Load Address: 00001000

   Entry Point:  00203014

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 203014

Linux version 2.6.28.7-ADI-2009R1-pre (santhosh@host_120) (gcc version 4.1.2 (ADI svn)) #467 Wed Jun 24 11:56:04 IST 2009

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00163320

  rodata    = 0x00163320-0x001cf680

  bss       = 0x001cf680-0x001e17d0

  data      = 0x001e17d0-0x001f8000

    stack   = 0x001f6000-0x001f8000

  init      = 0x001f8000-0x00b02000

  available = 0x00b02000-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 1

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

Compiled for ADSP-BF527 Rev 0.2

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 600 MHz core clock and 120 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: 16001

Kernel command line: console=ttyBF1,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Console: colour dummy device 80x25

console [ttyBF1] enabled

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

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

Memory available: 52652k/65536k RAM, (9256k init code, 1416k kernel code, 596k data, 1024k dma, 588k reserved)

Calibrating delay loop... 1196.03 BogoMIPS (lpj=2392064)

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 (42 KB free)

PDA for CPU0 reserved at 001d0178

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

ezkit_init(): registering device resources

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

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 102

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

IR Module enabled

bfin-t350mcqb: 320x240 24-bit RGB FrameBuffer initializing...

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

bfin-otp: initialized

Serial: Blackfin serial driver

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

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

bfin_mii_bus: probed

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

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

Driver 'sd' needs updating - please use bus_type methods

physmap platform flash device: 00400000 at 20000000

physmap-flash physmap-flash.0: Could not reserve memory region

physmap-flash: probe of physmap-flash.0 failed with error -12

r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008

r8a66597_hcd r8a66597_hcd: USB Host Controller

r8a66597_hcd r8a66597_hcd: new USB bus registered, assigned bus number 1

r8a66597_hcd r8a66597_hcd: irq 88, io base 0x20200000

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

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: USB Host Controller

usb usb1: Manufacturer: Linux 2.6.28.7-ADI-2009R1-pre r8a66597_hcd

usb usb1: SerialNumber: r8a66597_hcd

usbcore: registered new interface driver libusual

i2c /dev entries driver

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

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 17

Freeing unused kernel memory: 9256k freed

ifconfig eth0 10.142.14.146                           _____________________________________

        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.13.2 (2009-06-24 11:48:53 IST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> ifconfig eth0 10.142.14.146

root:/> PHY: 0:01 - Link is Up - 100/Full

mkdir /mnt/ROOTFS_JFFS2

root:/> mount -t jffs2 /dev/mtdblock2 /mnt/ROOTFS_JFFS2

mount: mounting /dev/mtdblock2 on /mnt/ROOTFS_JFFS2 failed: No such file or directory

QuoteReplyEditDelete

 

 

2009-06-24 11:50:42     Re: Not able to create MTD partition in trunk-svn

Mike Frysinger (UNITED STATES)

Message: 76267   

 

so figure out what you enabled that claimed the memory region.  read /proc/iomem.

QuoteReplyEditDelete

 

 

2009-06-24 12:02:18     Re: Not able to create MTD partition in trunk-svn

Santhosh Kumar (INDIA)

Message: 76268   

 

Mike,

 

I am not able to get it after reading /proc/iomem.

 

root:/> cat /proc/iomem

20000000-203fffff : physmap-flash.0

20200000-20200100 : r8a66597_hcd

ffc00400-ffc004ff : bfin-uart.1

ffc01400-ffc01400 : i2c-bfin-twi.0

ffc02000-ffc020ff : bfin-uart.1

 

Is this means 4MB of flash is not partitioned and flat. It seems no one has claimed it.

QuoteReplyEditDelete

 

 

2009-06-24 12:06:24     Re: Not able to create MTD partition in trunk-svn

Mike Frysinger (UNITED STATES)

Message: 76269   

 

are we reading the same output ?  that clearly shows the r8a66597_hcd is using bank 2 already.  you cant use bank 2 with flash if you have a usb device hooked up to it.

QuoteReplyEditDelete

 

 

2009-06-24 12:18:18     Re: Not able to create MTD partition in trunk-svn

Santhosh Kumar (INDIA)

Message: 76270   

 

Yes its the same output.

 

Is it possible to remove the usb device hook?

 

how can i do that?

QuoteReplyEditDelete

 

 

2009-06-24 12:31:34     Re: Not able to create MTD partition in trunk-svn

Mike Frysinger (UNITED STATES)

Message: 76271   

 

if you dont want to use the USB device, then dont build the driver.  that doesnt magically change the hardware async bank connections -- you need to verify the async banks are routed to the right devices.

 

QuoteReplyEditDelete

 

 

2009-06-29 03:22:34     Re: Not able to create MTD partition in trunk-svn

Santhosh Kumar (INDIA)

Message: 76447   

 

I have disabled usb in make menuconfig, still proc/iomem shows

 

20200000-20200100 : r8a66597_hcd

 

Does this means async bank connections are hardwired and cannot be changed through config options?

 

If so, How to verify the hardwire connection?

QuoteReplyEditDelete

 

 

2009-06-29 03:24:55     Re: Not able to create MTD partition in trunk-svn

Mike Frysinger (UNITED STATES)

Message: 76448   

 

it means you've hardwired things in your board resources file

Attachments

    Outcomes