public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Access to NOR from Linux - what is required?
@ 2006-11-14 14:36 Martin Egholm Nielsen
  2006-11-14 17:47 ` Cliff Brake
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Egholm Nielsen @ 2006-11-14 14:36 UTC (permalink / raw)
  To: linux-mtd

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

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

* Re: Access to NOR from Linux - what is required?
  2006-11-14 14:36 Access to NOR from Linux - what is required? Martin Egholm Nielsen
@ 2006-11-14 17:47 ` Cliff Brake
  2006-11-14 20:02   ` Martin Egholm Nielsen
  0 siblings, 1 reply; 3+ messages in thread
From: Cliff Brake @ 2006-11-14 17:47 UTC (permalink / raw)
  To: Martin Egholm Nielsen; +Cc: linux-mtd

On 11/14/06, Martin Egholm Nielsen <martin@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

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

* Re: Access to NOR from Linux - what is required?
  2006-11-14 17:47 ` Cliff Brake
@ 2006-11-14 20:02   ` Martin Egholm Nielsen
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Egholm Nielsen @ 2006-11-14 20:02 UTC (permalink / raw)
  To: linux-mtd

Cliff Brake wrote:
>>I know this is a rather vague question, but how do I gain access to the
>>NOR flash on my board?

=== 8< 8< 8< ===

> 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

Super, I'll try this in the morning and let you know! Thanks for now...

// Martin

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

end of thread, other threads:[~2006-11-14 20:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14 14:36 Access to NOR from Linux - what is required? Martin Egholm Nielsen
2006-11-14 17:47 ` Cliff Brake
2006-11-14 20:02   ` Martin Egholm Nielsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox