Re: [PATCH] Make nand block functions use provided byte/word helpers.

Ben Dooks
2006-02-28T22:38:11Z

On Tue, Feb 28, 2006 at 08:59:03PM +0000, Jonathan McDowell wrote:
> Hi.
>
> I've been writing a NAND driver for the flash on the Amstrad E3. One of
> the peculiarities of this device is that the write & read enable lines
> are on a latch, rather than strobed by the act of reading/writing from
> the data latch. As such I've got custom read_byte/write_byte functions
> defined. However the nand_*_buf functions in drivers/mtd/nand/nand_base.c
> are all appropriate, except for the fact they call readb/writeb
> themselves, instead of using this->read_byte or this->write_byte. The
> patch below changes them to use these functions, meaning a driver just
> needs to define read_byte and write_byte functions and gains all the
> nand_*_buf functions free.

Why not make life easier on everyone else by over-riding the
functions for read/write buffer (etc) in the nand driver... less
intrusive into the core code!

--
Ben (ben@fluff.org, http://www.fluff.org/)

'a smiley only costs 4 bytes'