RE: flash drivers

2 messages, 2 authors, 2000-05-11 · open the first message on its own page

RE: flash drivers

From: Brown, David (dbrown03) <hidden>
Date: 2000-05-10 13:41:50

I'm planning to use drivers/char/amd_flash.c myself, as a flat stream
"file".

The ftp://ftp.denx.de/pub/LinuxPPC/usr/src/CDK.tar.gz sources also include a
flash translation layer (ftl.c) so flash can be used as a read/write
filesystem.  I won't be using that though, since I noticed a patent
reference in drivers/block/ftl.c, which an exemption for PCMCIA drivers.  In
linuxppc we're usually talking about on-board flash, so be careful.  I'd
guess that such encumbered code won't make the standard kernel.

It would be nice if we could have something like drivers/block/ftl.c without
using patented methods.  If that's not possible, the next best thing would
be a specific exemption for use on the linuxppc kernels, even if flash is
on-board instead of PCMCIA.



-----Original Message-----
From: duncanp@research.canon.com.au
[mailto:duncanp@research.canon.com.au]
Sent: Tuesday, May 09, 2000 11:04 PM
To: Wolfgang Denk
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: flash drivers



Hi Wolfgang,

Thanks for this driver - its exactly what I was looking for.

The code did not work as-is for my configuration - i'm using
a 1x16 bit
flash device (AM29LV160B). So, i've made some small changes, and
attached patches to amd_flash.c and flash.h. Pretty much all of the
changes i've made relate to addressing on a 16 bit wide interface
rather than the 32 bit wide interface you had already tested with, but
there are some others:

I don't think cfi_read_short() and cfi_read_char() were dealing with
endianess properly - they just happened to work correctly
with your 4x8
bit configuration, but would be broken for anything else - i think the
changes i've put in fix that.

I've removed cfi_read_int() because it was only used to read the Erase
Block Region Information, which is broken into 2 16 bit fields anyway.

I also have an Embedded Planet board with 4x8 bit flash devices
(AM29LV160B) which I haven't tested this stuff with yet - I
hope to get
around to that in the next few days, but I'm leaving work next week to
go travelling (6 months worth of holidaying in asia, then i'm
heading to
ireland to work), so I might run out of time, which is why
I've sent you
these patches now.

Please let me know what you think.

Dunk.



On 26 Apr, Wolfgang Denk wrote:
quoted
In message
[off-list ref] you wrote:
quoted
quoted
I'm about to go and write some software to allow us to
program on-board
quoted
quoted
flash devices. I'm planing on putting all of the code in a kernel
driver - i've seen some flash drivers which put some code in the
kernel, and other code (to write the flash - I gather the
algorithms
quoted
quoted
vary a fair bit between deivices) in user space.
For CFI conformant FLASH devices you can use (or  easily
adapt)  the
quoted
FLASH  driver  that is included with my port of Linux for
the TQM8xxL
quoted
board; get
ftp://ftp.denx.de/pub/LinuxPPC/usr/src/CDK.tar.gz and have
a look at the files  CDK/patches/linux-2.2.13/FLASH.patch  and  maybe
CDK/patches/linux-2.2.13/FTL.patch
quoted
So, before I go and do this, has anyone already done something similar
they would be happy to share with me?
While I was trying to make this as portable as possible, I only could
test it in a configuration with two banks of 16 bit FLASH memory. You
may have to make minor adjustemnts for other configurations.

Feedback appreciated.
quoted
I'd like to write this so it can be dropped into the standard kernels
and adapted to new 8xx based boards without much effort, so if anybody
has any comments they'd like to make, please lemme know.
If my version of the drivers proves helpful, I'd  like  to  integrate
whatever changes needed to make it work on other hardware as well.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Roses are red
Violets are blue
Some poems rhyme

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: flash drivers

From: Scott Anderson <hidden>
Date: 2000-05-11 21:05:31

"Brown, David (dbrown03)" wrote:
It would be nice if we could have something like drivers/block/ftl.c without
using patented methods.  If that's not possible, the next best thing would
be a specific exemption for use on the linuxppc kernels, even if flash is
on-board instead of PCMCIA.
Right now, it looks like the best course is the Journaling Flash File System
(JFFS) developed by Axis Communications.  There is an effort underway to
incorporate this with the Memory Technology Device (MTD) subsystem.  AFAIK, the
JFFS works with 2.0 kernels and there is a porting effort to get it up on 2.3
as well.  For more info on JFFS:
	http://www.developer.axis.com/software/jffs/
and of course, the MTD site already mentioned:
	http://www.linux-mtd.infradead.org/
There are also mailing lists for both of these activities.

    Scott Anderson
    scott_anderson@mvista.com	MontaVista Software Inc.
    (408)328-9214		490 Potrero Ave.
    http://www.mvista.com	Sunnyvale, CA  94086

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help