All of lore.kernel.org
 help / color / mirror / Atom feed
* Trouble getting MTD to run -- permission denied messages
@ 2009-07-31 21:29 Subodh Nijsure
  2009-08-01 15:49 ` Subodh Nijsure
  2009-08-09 15:32 ` Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Subodh Nijsure @ 2009-07-31 21:29 UTC (permalink / raw)
  To: linux-mtd

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-09 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31 21:29 Trouble getting MTD to run -- permission denied messages Subodh Nijsure
2009-08-01 15:49 ` Subodh Nijsure
2009-08-09 15:32 ` Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.