[U-Boot] [PATCH 59/60] ARM: tegra: unify+move tegra.h to mach-tegra/

Simon Glass sjg at chromium.org
Sun May 8 00:32:47 CEST 2016


On 19 April 2016 at 14:59, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> Most of arch/arm/include/asm/arch-tegra*/tegra.h is only used by code in
> arch/arm/mach-tegra, so move the header files there to avoid polluting the
> global include path. While moving, unify the per-SoC files into one using
> a couple of simple ifdefs; this avoids having so many headers.
>
> Many source files relied on <common.h> including the board config.h file,
> which in turned used to include tegra.h. Now that we've removed this, we
> need to include tegra.h from those files, hence this patch adds a few new
> include statements.
>
> A few defines from tegra.h are used by code outside mach-tegra. These are
> dealt with as follows:
>
> - A few drivers program clock registers directly and hence use
> NV_PA_CLK_RST_BASE to locate the registers. Move this into clk_rst.h; that
> makes sense since it defines the register layout and may as well define
> the address too. Later patches will hopefully clean up the Tegra clock
> driver and hide this information too.
>
> - Various other definitions are used by the board config headers and/or
> core U-Boot code (e.g. ARMv8 boot assembly). These can't include
> SoC-specific headers from <mach/>. Hence, move those definitions into
> tegra-common.h so they're generally available.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
>  arch/arm/include/asm/arch-tegra/clk_rst.h          |  2 ++
>  arch/arm/include/asm/arch-tegra114/tegra.h         | 25 --------------
>  arch/arm/include/asm/arch-tegra124/tegra.h         | 27 ---------------
>  arch/arm/include/asm/arch-tegra20/tegra.h          | 20 -----------
>  arch/arm/include/asm/arch-tegra210/tegra.h         | 29 ----------------
>  arch/arm/include/asm/arch-tegra30/tegra.h          | 19 -----------
>  arch/arm/mach-tegra/ap.c                           |  2 +-
>  arch/arm/mach-tegra/board.c                        |  2 +-
>  arch/arm/mach-tegra/board2.c                       |  2 +-
>  arch/arm/mach-tegra/clock.c                        |  2 +-
>  arch/arm/mach-tegra/cmd_enterrcm.c                 |  2 +-
>  arch/arm/mach-tegra/cpu.c                          |  2 +-
>  arch/arm/mach-tegra/gpu.c                          |  2 +-
>  arch/arm/mach-tegra/i2c_early.c                    |  1 +
>  arch/arm/mach-tegra/lowlevel_init.S                |  3 +-
>  arch/arm/mach-tegra/pinmux-common.c                |  1 +
>  arch/arm/mach-tegra/powergate.c                    |  2 +-
>  arch/arm/mach-tegra/spl.c                          |  2 +-
>  arch/arm/mach-tegra/spl_uart.c                     |  1 +
>  .../{include/asm/arch-tegra => mach-tegra}/tegra.h | 39 ++++++++++++++++++----
>  arch/arm/mach-tegra/tegra114/clock.c               |  2 +-
>  arch/arm/mach-tegra/tegra114/cpu.c                 |  2 +-
>  arch/arm/mach-tegra/tegra124/clock.c               |  2 +-
>  arch/arm/mach-tegra/tegra124/cpu.c                 |  2 +-
>  arch/arm/mach-tegra/tegra124/psci.c                |  1 +
>  arch/arm/mach-tegra/tegra20/clock.c                |  2 +-
>  arch/arm/mach-tegra/tegra20/cpu.c                  |  2 +-
>  arch/arm/mach-tegra/tegra20/emc.c                  |  2 +-
>  arch/arm/mach-tegra/tegra20/pmu.c                  |  2 +-
>  arch/arm/mach-tegra/tegra20/sku.c                  |  1 +
>  arch/arm/mach-tegra/tegra20/warmboot.c             |  2 +-
>  arch/arm/mach-tegra/tegra20/warmboot_avp.c         |  2 +-
>  arch/arm/mach-tegra/tegra210/clock.c               |  2 +-
>  arch/arm/mach-tegra/tegra210/xusb-padctl.c         |  3 +-
>  arch/arm/mach-tegra/tegra30/clock.c                |  2 +-
>  arch/arm/mach-tegra/tegra30/cpu.c                  |  2 +-
>  drivers/gpio/tegra_gpio.c                          |  2 ++
>  drivers/pci/pci_tegra.c                            |  1 +
>  include/configs/tegra-common.h                     | 14 ++++++--
>  39 files changed, 81 insertions(+), 152 deletions(-)
>  delete mode 100644 arch/arm/include/asm/arch-tegra114/tegra.h
>  delete mode 100644 arch/arm/include/asm/arch-tegra124/tegra.h
>  delete mode 100644 arch/arm/include/asm/arch-tegra20/tegra.h
>  delete mode 100644 arch/arm/include/asm/arch-tegra210/tegra.h
>  delete mode 100644 arch/arm/include/asm/arch-tegra30/tegra.h
>  rename arch/arm/{include/asm/arch-tegra => mach-tegra}/tegra.h (59%)


Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list