Access to NOR from Linux - what is required?

Cliff Brake cliff.brake at gmail.com
Tue Nov 14 12:47:37 EST 2006


On 11/14/06, Martin Egholm Nielsen <martin at egholm-nielsen.dk> wrote:

> I know this is a rather vague question, but how do I gain access to the
> NOR flash on my board?
>
> Ok, a little more clarification follows: I have a PPChameleon board from
> which I can access the NOR from U-Boot. However, launching Linux will
> only grant me access to the NAND. For the NAND I see there is a
> "drivers/mtd/nand/ppchameleonevb.c" file responsible for setting up a
> lot of stuff.
> However, with my knowledge I looked for a "drivers/mtd/nor" directory,
> as well, to see what others have done for their boards. But this does
> not exist. Hence my question...
>
> Moreover, and again due to my lack of knowledge, another question: I use
> my NAND device with a filesystem (JFFS2/YAFFS), but I guess the NOR does
> not have one (and should not have one since I use it from U-Boot). So if
> I succeed to gain access from Linux to the NOR, I/O operations should be
> performed using "dd" or what?

You can often just map in your NOR device using the kernel command
line without any kernel changes.  Something like:

CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_CMDLINE="mtdparts=phys_mapped_flash:256k(boot)ro,0x1C0000(kernel),-(root)"
CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_PHYSMAP_START=0x0000000
CONFIG_MTD_PHYSMAP_LEN=0x4000000
CONFIG_MTD_PHYSMAP_BANKWIDTH=4

There is documentation on mtdparts in:
drivers/mtd/cmdlinepart.c

Cliff

-- 
=======================
Cliff Brake
http://bec-systems.com




More information about the linux-mtd mailing list