[U-Boot] [PATCH 13/14] tegra114: add SPI driver
Allen Martin
amartin at nvidia.com
Thu Feb 14 22:49:50 CET 2013
On Thu, Feb 14, 2013 at 06:32:06AM -0800, Simon Glass wrote:
> Hi Allen,
>
> On Wed, Feb 13, 2013 at 2:59 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> > On 02/12/2013 08:23 PM, Allen Martin wrote:
> >> Subject: tegra114: add SPI driver
> >
> > This really touches the SPI sub-system more than Tegra, and the Tegra
> > subsystem is just (and all of) Tegra not Tegra114-specific, so I'd
> > re-title this:
> >
> > spi: tegra: add Tegra114 SPI driver
> >
> > similar s/tegra114:/tegra:/ in other patch subjects, many of which
> > probably should be "ARM: tegra: ...".
>
> This driver seems to add a lot of duplication. What prevents using
> common code? Is it the register layout, differences in algorithm or
> something else?
Yes, unfortunately there really are three different SPI controller
hardware blocks. There's "sflash" which is a tegra20 only block,
"slink" which is present in tegra20 and tegra30, and tegra114 has a
new SPI controller which is functionally equivalent to slink, but the
register interface is different.
The programming model is quite similar, but not exactly the same
between each. For example, the same function may be one register
write on one chip and two or more register writes on another. It
could be possible to hide some of those differences in macros or
inline functions, but I'm not sure if that's more or less messy.
-Allen
--
nvpublic
More information about the U-Boot
mailing list