[U-Boot] [WIP/PATCH 0/4] unify SPI flash drivers
Mike Frysinger
vapier at gentoo.org
Mon Jan 10 08:20:10 CET 2011
The amount of duplication across SPI flash driver has always annoyed me,
and we've seen bugs that affect multiple drivers fixed in only some, and
I figure if the Linux kernel driver can unify these things, then there is
really no reason we can't too.
So this here are a few incremental patches to get us closer to a unified
driver. I think the diffstat speaks for itself, and there are even more
pieces here which could possibly be merged. But I got bored for now.
I've only lightly tested them so far with one SPI flash driver, so for
now they're not for merging. Once I can get more testing on our side,
I'll send out a pull request.
For you adventurous/bored types, you can grab these from my sf branch:
git://git.denx.de/u-boot-blackfin.git
Any feedback as to success/failure would be great.
Mike Frysinger (4):
sf: unify read/write helpers
sf: unify status polling for ready bit
sf: unify erase functions
sf: unify read functions
drivers/mtd/spi/atmel.c | 49 +---------
drivers/mtd/spi/eon.c | 121 ++-----------------------
drivers/mtd/spi/macronix.c | 126 ++------------------------
drivers/mtd/spi/spansion.c | 120 +-----------------------
drivers/mtd/spi/spi_flash.c | 170 +++++++++++++++++++++++++---------
drivers/mtd/spi/spi_flash_internal.h | 23 +++++
drivers/mtd/spi/sst.c | 116 +----------------------
drivers/mtd/spi/stmicro.c | 125 +------------------------
drivers/mtd/spi/winbond.c | 148 +----------------------------
9 files changed, 190 insertions(+), 808 deletions(-)
--
1.7.4.rc1
More information about the U-Boot
mailing list