[PATCH v2] mtd/nand: don't use {read,write}_buf for 8-bit transfers
Brian Norris
computersforpeace at gmail.com
Wed Nov 27 01:59:36 EST 2013
+ Pekon, Ezequiel
On Tue, Nov 26, 2013 at 10:03:41PM +0100, Uwe Kleine-König wrote:
> On Wed, Mar 13, 2013 at 11:33:04AM +0200, Artem Bityutskiy wrote:
Resurrecting a really old thread, eh? :) I like it!
> > On Mon, 2013-03-04 at 17:47 +0100, Uwe Kleine-König wrote:
> > > diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> > > index 7ccb3c5..8ee4ed1 100644
> > > --- a/include/linux/mtd/nand.h
> > > +++ b/include/linux/mtd/nand.h
> > > @@ -419,6 +419,8 @@ struct nand_buffers {
> > > * flash device.
> > > * @read_byte: [REPLACEABLE] read one byte from the chip
> > > * @read_word: [REPLACEABLE] read one word from the chip
> > > + * @write_byte [REPLACEABLE] write a single byte to the chip on the
> > > + * low 8 I/O lines
> > > * @write_buf: [REPLACEABLE] write data from the buffer to the chip
> > > * @read_buf: [REPLACEABLE] read data from the chip into the buffer
> > > * @select_chip: [REPLACEABLE] select chip nr
> > > @@ -503,6 +505,7 @@ struct nand_chip {
> > >
> > > uint8_t (*read_byte)(struct mtd_info *mtd);
> > > u16 (*read_word)(struct mtd_info *mtd);
> > > + void (*write_byte)(struct mtd_info *mtd, uint8_t byte);
> > > void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
> > > void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
> > > void (*select_chip)(struct mtd_info *mtd, int chip);
> >
> > I would like to make the interface symmetric for read and write. I do
> > not have any 16 bit flashes, so need to somehow encouredge someone who
> > has one to do this. Namely, I'd like to kill 'read_word()', if possible.
> > What's your take on this?
> I don't have a 16 bit flash, so I have the same excuse as you do :-)
Ezequiel and Pekon have 16-bit devices and can do testing, I think. They
also may be interested in your v3 patch.
Brian
More information about the linux-mtd
mailing list