On 19 April 2016 at 14:58, Stephen Warren <[email protected]> wrote: > From: Stephen Warren <[email protected]> > > tegra_i2c.h contains primarily private definitions for use inside the I2C > driver. Move those out of the global include directory since nothing > should need to access them. > > The Tegra I2C driver exports a Tegra-specific API. Move its prototype into > a <mach/*> header. Hopefully one day this will go away. > > Tegra's SPL doesn't (yet?) support the full I2C driver stack. However, SPL > must make some I2C accesses to program the PMIC to boot the main CPU > complex (note that Tegra's SPL runs on a different CPU). Share the > implementation of those functions in a new file. This isolates the hacky > use of private register definitions to a single file. > > Signed-off-by: Stephen Warren <[email protected]> > --- > arch/arm/mach-tegra/Makefile | 3 ++- > arch/arm/mach-tegra/i2c_early.c | 28 > ++++++++++++++++++++++ > arch/arm/mach-tegra/include/mach/tegra_i2c.h | 25 +++++++++++++++++++ > arch/arm/mach-tegra/tegra20/pmu.c | 2 +- > arch/arm/mach-tegra/tegra30/cpu.c | 19 ++------------- > board/nvidia/venice2/as3722_init.c | 20 ++-------------- > drivers/i2c/tegra_i2c.c | 3 ++- > .../tegra_i2c.h => drivers/i2c/tegra_i2c_priv.h | 13 +++------- > 8 files changed, 65 insertions(+), 48 deletions(-) > create mode 100644 arch/arm/mach-tegra/i2c_early.c > create mode 100644 arch/arm/mach-tegra/include/mach/tegra_i2c.h > rename arch/arm/include/asm/arch-tegra/tegra_i2c.h => > drivers/i2c/tegra_i2c_priv.h (95%)
Reviewed-by: Simon Glass <[email protected]> _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

