* writing to flash from linux
@ 2007-09-11 15:13 Yoni Levin
2007-09-12 4:08 ` Ratheesh
2007-09-12 14:15 ` David H. Lynch Jr.
0 siblings, 2 replies; 3+ messages in thread
From: Yoni Levin @ 2007-09-11 15:13 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
Hi , I have EN29LV640H flash (http://www.eonsdi.com/pdf/EN29LV640.pdf)
On my mpc83xx board.
How can I write data to flash from linux.?
I guess it done with mtd , there is an example somewhere?
Thanks.
[-- Attachment #2: Type: text/html, Size: 2445 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: writing to flash from linux
2007-09-11 15:13 writing to flash from linux Yoni Levin
@ 2007-09-12 4:08 ` Ratheesh
2007-09-12 14:15 ` David H. Lynch Jr.
1 sibling, 0 replies; 3+ messages in thread
From: Ratheesh @ 2007-09-12 4:08 UTC (permalink / raw)
To: Yoni Levin; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 804 bytes --]
Hi,
You can write into flash from linux if you have mapped the flash in mtd
partition. you can open /dev/mtdx(partition that covers your flash
area) file and use normal read/write function calls to read/write from the
flash. Remember to erase the flash before attempting to write data. You can
refer sourcecode of mtd-utils.
Regards
Ratheesh
On 9/11/07, Yoni Levin <yoni.l@slyde-tech.com> wrote:
>
> Hi , I have EN29LV640H flash (http://www.eonsdi.com/pdf/EN29LV640.pdf)
>
> On my mpc83xx board.
>
> How can I write data to flash from linux.?
>
> I guess it done with mtd , there is an example somewhere?
>
> Thanks.
>
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: Type: text/html, Size: 2502 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: writing to flash from linux
2007-09-11 15:13 writing to flash from linux Yoni Levin
2007-09-12 4:08 ` Ratheesh
@ 2007-09-12 14:15 ` David H. Lynch Jr.
1 sibling, 0 replies; 3+ messages in thread
From: David H. Lynch Jr. @ 2007-09-12 14:15 UTC (permalink / raw)
To: Yoni Levin; +Cc: linuxppc-embedded
Yoni Levin wrote:
> Hi , I have EN29LV640H flash (http://www.eonsdi.com/pdf/EN29LV640.pdf)
>
> On my mpc83xx board.
>
> How can I write data to flash from linux.?
>
> I guess it done with mtd , there is an example somewhere?
>
> Thanks.
>
>
I know nothing specific about your board or flash, but MTD is the
proper system for handling flash.
You need an mtd driver for your board - it is possible something
already exists, but if not you need to write it.
That driver may be extremely simple - if your boards flash system if
not very complex.
Some of the issues are ?
Is your flash partitioned - are there multiple regaions of flash
that each serve different purposes - such as a boot loader, a kernel, an
initrd and separately a file system - or even more than one file system.
Is your flash chip recognized by Linux (likely)
Are there special conditions for reading/writing flash on your board
- i.e. do you have to enable special voltages or protection bits - board
specific protection not chips specific,
Does your board "window" the flash such that only part of it is in
the CPU's memory space at one time.
Does your board have some odd quicks for accessing flash - like
requiring a 32 bit read to get a 16bit value ?
All of these are handled by the mtd driver
If as an example you have a very standard CFI flash chip, that has
no windowing, no special read/write enables, is always fully in the CPU
memory space at the same place,
and all the flash is going to be used for a single filesystem with
no reserved blocks, bootloaders etc.
The mtd driver could be trivial, there might even be something that
can just be used as is.
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-12 14:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-11 15:13 writing to flash from linux Yoni Levin
2007-09-12 4:08 ` Ratheesh
2007-09-12 14:15 ` David H. Lynch Jr.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).