Simon, On Tue, Jan 22, 2013 at 1:54 PM, Simon Glass <s...@chromium.org> wrote: > Hi Tom, > > On Fri, Jan 18, 2013 at 1:12 PM, Tom Warren <twarren.nvi...@gmail.com> wrote: >> These files are used by both SPL and main U-Boot. >> >> Signed-off-by: Tom Warren <twar...@nvidia.com> >> --- >> Changes in v2: >> - update all new copyright header dates to 2013 >> - use ODMDATA correctly in query_dram_size >> >> arch/arm/cpu/tegra-common/ap.c | 9 +- >> arch/arm/cpu/tegra-common/board.c | 21 +- >> arch/arm/cpu/tegra114-common/Makefile | 41 ++ >> arch/arm/cpu/tegra114-common/clock.c | 1150 >> ++++++++++++++++++++++++++++++++ >> arch/arm/cpu/tegra114-common/funcmux.c | 63 ++ >> arch/arm/cpu/tegra114-common/pinmux.c | 506 ++++++++++++++ >> 6 files changed, 1786 insertions(+), 4 deletions(-) >> create mode 100644 arch/arm/cpu/tegra114-common/Makefile >> create mode 100644 arch/arm/cpu/tegra114-common/clock.c >> create mode 100644 arch/arm/cpu/tegra114-common/funcmux.c >> create mode 100644 arch/arm/cpu/tegra114-common/pinmux.c >> > > I'm a bit concerned about the code duplication here. Isn't much of > this code common? > > Regards, > Simon
funcmux.c differs almost entirely (different muxes for different UARTs used on the boards). Pinmux.c differs quite a bit, mostly in tables. And clock.c has a few minor name diffs (DVC vs I2C5), but there are extra enums for the additional RST/ENA bits on T114, plus the differences in clock_early_init WRT the PLL rates. And that's just for the T30 vs. T114 differences - T20 is vastly different in it's pinmux HW regs, and device RST/ENA bits. I view it as a worthy exercise that could be applied after T114 baseline code is in, to see just how much more common code could be factored out and put into arm/cpu/tegra-common, but I don't see it as being a huge amount. T30 and T114 would share the most code, but where would it go? since it can't be shared w/T20? Tom _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot