linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "David H. Lynch Jr." <dhlii@dlasys.net>
To: Yoni Levin <yoni.l@slyde-tech.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: writing to flash from linux
Date: Wed, 12 Sep 2007 10:15:46 -0400	[thread overview]
Message-ID: <46E7F492.9040509@dlasys.net> (raw)
In-Reply-To: <1E2D24B6DA8A4EE68CFFD33998B2BC26.MAI@mail.livedns.co.il>

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

      parent reply	other threads:[~2007-09-12 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46E7F492.9040509@dlasys.net \
    --to=dhlii@dlasys.net \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=yoni.l@slyde-tech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).