Access to NOR from Linux - what is required?
Hi,
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?
For those who wonders; I need to replace the Linux kernel in the NOR from the running Linux - not from U-Boot...
BR,
Martin Egholm
Quoted 12 lines · Martin Egholm Nielsen
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...
Quoted 5 lines
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=yCONFIG_MTD_CMDLINE_PARTS=y CONFIG_CMDLINE="mtdparts=phys_mapped_flash:256k(boot)ro,0x1C0000(kernel),-(root)" CONFIG_MTD_PHYSMAP=yCONFIG_MTD_PHYSMAP_START=0x0000000CONFIG_MTD_PHYSMAP_LEN=0x4000000CONFIG_MTD_PHYSMAP_BANKWIDTH=4
There is documentation on mtdparts in:drivers/mtd/cmdlinepart.c
Cliff
Signature · 3 lines
======================= Cliff Brake http://bec-systems.com
Quoted 2 lines · Cliff Brake
Quoted 2 lines
I know this is a rather vague question, but how do I gain access to the NOR flash on my board?
=== 8< 8< 8< ===
Quoted 11 lines
You can often just map in your NOR device using the kernel command line without any kernel changes. Something like:
CONFIG_MTD_PARTITIONS=yCONFIG_MTD_CMDLINE_PARTS=yCONFIG_CMDLINE="mtdparts=phys_mapped_flash:256k(boot)ro,0x1C0000(kernel),-(root)"CONFIG_MTD_PHYSMAP=yCONFIG_MTD_PHYSMAP_START=0x0000000CONFIG_MTD_PHYSMAP_LEN=0x4000000CONFIG_MTD_PHYSMAP_BANKWIDTH=4
Quoted 2 lines
There is documentation on mtdparts in:
drivers/mtd/cmdlinepart.c
Super, I'll try this in the morning and let you know! Thanks for now...
// Martin