Trouble getting MTD to run -- permission denied messages

Subodh Nijsure nijsure.subodh at gmail.com
Sat Aug 1 11:49:36 EDT 2009


I enabled some of the debug macros and attached output below,
concerned about "Chip erase not supported" debug output. Is that
reason I am not able to write to NOR flash? But I also see " Program
after Erase Suspend: supported"


Primary Vendor Command Set: 0001 (Intel/Sharp Extended)
Primary Algorithm Table at 010A
Alternative Vendor Command Set: 0000 (None)
No Alternate Algorithm Table
Vcc Minimum:  1.7 V
Vcc Maximum:  2.0 V
Vpp Minimum:  8.5 V
Vpp Maximum:  9.5 V
Typical byte/word write timeout: 256 .s
Maximum byte/word write timeout: 512 .s
Typical full buffer write timeout: 512 .s
Maximum full buffer write timeout: 1024 .s
Typical block erase timeout: 1024 ms
Maximum block erase timeout: 4096 ms
Chip erase not supported
Device size: 0x2000000 bytes (32 MiB)
Flash Device Interface description: 0x0001
  - x16-only asynchronous interface
Max. bytes in buffer write: 0x40
Number of Erase Block Regions: 2
  Erase Region #0: BlockSize 0x8000 bytes, 4 blocks
  Erase Region #1: BlockSize 0x20000 bytes, 255 blocks

 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
  Extended Query version 1.4
  Feature/Command Support:      00E6
     - Chip Erase:              unsupported
     - Suspend Erase:           supported
     - Suspend Program:         supported
     - Legacy Lock/Unlock:      unsupported
     - Queued Erase:            unsupported
     - Instant block lock:      supported
     - Protection Bits:         supported
     - Page-mode read:          supported
     - Synchronous read:        unsupported
     - Simultaneous operations: unsupported
     - Extended Flash Array:    unsupported
  Supported functions after Suspend: 01
     - Program after Erase Suspend: supported
  Block Status Register Mask: 0003
     - Lock Bit Active:      yes
     - Lock-Down Bit Active: yes
     - EFA Lock Bit:         no
     - EFA Lock-Down Bit:    no
  Vcc Logic Supply Optimum Program/Erase Voltage: 1.8 V
  Vpp Programming Supply Optimum Program/Erase Voltage: 9.0 V
cfi_cmdset_0001: Erase suspend on write enabled


On Fri, Jul 31, 2009 at 2:29 PM, Subodh Nijsure<nijsure.subodh at gmail.com> wrote:
> I have defined my NOR flash layout as follows I am able to see the
> contents of the flash when I do
>
> dd=/dev/mtdblock1 of=/tmp/myflash
>
> However I created a jffs2 image on my workstation and tried to "burn"
> it to flash by executing following command  and I see messages "This
> doesn't seem to be valid MTD flash device.
>
> # ./flashcp /initrd.jffs2 /dev/mtdblock1
> mtdblock_open
> ok
> This doesn't seem to be a valid MTD flash device!
> mtdblock_release
> ok
>
> Also mtdinfo -a display following message
>
> # /mtd/mtdinfo -a
> Count of MTD devices:           3
> MTD_open
> libmtd: error!: cannot open "/dev/mtd0"
>        error 13 (Permission denied)
> mtdinfo: error!: libmtd failed get MTD device 0 information
>         error 13 (Permission denied)
>
> I must have missed some basic step in getting things setup for NOR
> flash, would appreciate a nudge in right direction...
>
>
>
> static struct mtd_partition my_flash_partitions[] = {
>        {
>                .name = "Linux",
>                .offset = RW_PART2_OF,
>                .size = RW_PART2_SZ,
>                .mask_flags = MTD_WRITEABLE
>        },
>        {
>                .name = "ramdisk",
>                .offset = RW_PART3_OF,
>                .size = RW_PART3_SZ,
>                .mask_flags = MTD_WRITEABLE
>        },
> };
>
>
> struct map_info my_flash_map = {
>        .name = "My device",
>        .size = WINDOW_SIZE,
>        .bankwidth = 2,
>        .phys = WINDOW_ADDR,
> };
>
>
> When I boot my board I see following messages :
>
> flash mapping: size 0600000 at 0xc1400000
> Found 1 x16 devices at 0x0 in 16-bit bank
> NOR chip too large to fit in mapping. Attempting to cope...
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
> Using buffer write method
> Using auto-unlock on power-up/resume
> cfi_cmdset_0001: Erase suspend on write enabled
> erase region 0: offset=0x0,size=0x8000,blocks=4
> erase region 1: offset=0x20000,size=0x20000,blocks=255
> Reducing visibility of 32768KiB chip to 6144KiB
> Creating 2 MTD partitions on "My Device":
> 0x00000000-0x00300000 : "Linux"
> mtd: Giving out device 0 to Linux
> 0x00300000-0x00600000 : "ramdisk"
> mtd: Giving out device 1 to ramdisk
>
>
> /Subodh
>



More information about the linux-mtd mailing list