[PATCH] [MTD] NAND: add ts7xxx driver
Alexander Clouter
alex at digriz.org.uk
Mon Feb 9 12:05:25 EST 2009
Hi,
* hartleys <hartleys at visionengravers.com> [2009-02-09 11:56:25-0500]:
>
> Sunday, February 08, 2009 1:59 AM, Alexander Clouter wrote:
> >
> > This patch adds support for the NAND found in Technologic
> > Systems ARM boards[1]. The platform specific parts (IO
> > address and parititoning schemes) have been moved into
> > platform specific files whilst the driver it's self can
> > be used as a complete replacement for the ts7250 NAND driver.
> >
> > [1] http://www.embeddedarm.com/products/arm-sbc.php
>
> With a little work the generic plat_nand driver could probably be used
> instead of this new driver or the original ts7250 driver.
>
I was always curious if that was the way to go, but as there were more
than one platform (TS-7800 and TS-72X0) I thought it would spare the
duplication of code in the kernel; as the code between the two platforms
is really just in the HW ECC and soon-one-day-maybe DMA support in the
TS-7800.
> The only thing special about the original ts7250 driver appears to be
> the fall-back partitioning scheme that uses the size of the device to
> figure out what static mtd_partition table to use.
>
I would have not really put too much effort in that if I was going for a
TS-7800 only (plat_nand based driver) as it would have not been worth
it. It was only useless in the case of the TS-72X0 as it comes with
several different NAND sizes, unlike currently the TS-7800 which only
has the one.
> This driver uses a similar approach but passes a callback to the
> platform driver to use instead. It also adds some conditional ecc
> support.
>
> It might be more useful to create a generic patch for plat_nand that
> adds this functionality and then obsolete the old ts7250 driver.
>
Well, from a practical level it would make mainlining the code much
easier as it would lurk in the TS-7800 platform code and no one would
care other than me. The downside is the duplication of code surely,
well I guess the duplicate code is really already in the plat_nand
driver anyway?
> I have been using the plat_nand driver on a custom ep93xx based board
> for quite a while with no problems.
>
If you think it's better to go with the plat_nand driver than I'll go
for it, I would be interested in seeing your one if you can send me a
copy?
I guess there would be no code duplication really, shame, I was quite
proud of the parititoning code :)
Cheers
--
Alexander Clouter
.sigmonster says: Money cannot buy love, nor even friendship.
More information about the linux-mtd
mailing list