[U-Boot] [PATCH v10 00/16] split tegra20 arm7 code into separate SPL
Tom Warren
TWarren at nvidia.com
Wed Aug 29 18:55:17 CEST 2012
Allen/Albert,
> -----Original Message-----
> From: Allen Martin [mailto:amartin at nvidia.com]
> Sent: Tuesday, August 28, 2012 5:08 PM
> To: Tom Warren; swarren at wwwdotorg.org; sjg at chromium.org;
> thierry.reding at avionic-design.de; dev at lynxeye.de
> Cc: u-boot at lists.denx.de; Allen Martin
> Subject: [PATCH v10 00/16] split tegra20 arm7 code into separate SPL
>
> This patch series fixes a long standing problem with the tegra20 u-boot
> build. Tegra20 contains an ARM7TDMI boot processor and a Cortex A9 main
> processor. Prior to this patch series this was accomplished by #ifdefing
> out any armv7 code from the early boot sequence and creating a single binary
> that runs on both both the ARM7TDMI and A9. This was very fragile as
> changes to compiler options or any additions or rearranging of the early
> boot code could add additional armv7 specific code causing it to fail on the
> ARM7TDMI.
>
> This patch series pulls all the armv4t code out into a separate SPL that
> does nothing more than initialize the A9 and transfer control to it. The
> resultint SPL and armv7 u-boot are concatenated together into a single
> image.
>
> This patch series is also available from:
> git://github.com/arm000/u-boot.git
> branch: tegra-spl-v10
>
> Changes:
> v10:
> - added fix to MAKEALL script so that it correctly parses new boards.cfg
I applied this to u-boot-tegra/master and pushed the new code upstream. The pull request remains the same (except for the inclusion of the MAKEALL patch, of course). I can send a new one if required - please let me know.
Currently running a ./MAKEALL arm - I assume it'll complete w/o errors (except for the ohci-hcd.c warnings I mentioned previously that are not due to this patch series).
Thanks,
Tom
> syntax
> v9:
> - rebased mkconfig patch on top of version that went upstream to u-
> boot/master
> - fixed a whitespace checkpatch warning in arch/arm/cpu/arm720t/cpu.c
> v8:
> - rebased to u-boot-tegra/master
> - added changes to work with "arm: Provide lowlevel_init C function
> wrapper for v7"
> - Moved JTAG init in SPL to earlier
> - fixed TEXT_BASE in SPL to use SPL TEXT_BASE not main u-boot TEXT_BASE
> - pad exception handlers in arm720t to 64 bytes with 0x12345678 to match
> armv7
> - added another tegra2->tegra20 rename for some new code that was added to
> arch/arm/cpu/armv7/start.S
> - rolled in the mkconfig fix that was breaking ARM platforms that don't
> define SoC
> v7:
> - rebased to u-boot-tegra/next
> - added Acks and Tested-Bys
> v6:
> - changed combined SPL/u-boot target names to u-boot-dtb-tegra.bin and u-
> boot-nodtb-tegra.bin
> - fixed regression introduced in v5 that caused git bisect to fail to
> build at one of the patches
> - fix USE_PRIVATE_LIBGCC for SPL build and enable it
> - fix libtegra20-common.so link so it works if building with out of tree
> OBJDIR
> v5:
> - added missing mkdir rules in all tegra20 board Makefiles that include
> common code and changed them to be unconditional
> - make new u-boot-dtb-t2.bin rule default for tegra20 and copy resulting
> binary over u-boot.bin
> v4:
> - rebased to u-boot-tegra/next
> - reordered entire patch series to preserve git bisect, verified build and
> boot at each patch
> - merged patches that add SPL config defines and removes duplicate code
> from u-boot init, these have to go in atomically to preserve building at
> each patch
> - fixed compiler warnings introduced
> - fixed blank line at end of file on cpu.c
> - renamed u-boot.t2 to u-boot-t2.bin
> - cleaned up config.mk generation in mkconfig to make it more readable
> - added some text to clarify using arm720t code for arm7tdmi
> - rearranged SPL memory map to make resulting SPL + u-boot image much
> smaller
> - removed separate PAD_TO define in favor of just using
> CONFIG_SYS_TEXT_BASE
> - moved warmboot_save_sdram_params() from dram_init() to board_init()
> v3:
> - git bisect still does not work across this series, I'm saving that for
> the next revision, but I had enough changes that I wanted to get this out
> for review
> - expanded the tegra2 -> tegra20 rename to include functions/variables/
> defines
> - rebased to u-boot-tegra/next
> - removed some extra -march=armv4t flags, kept armv4t flags on
> warmboot_avp since it's special
> - removed bashisms from mkconfig
> - renamed CONFIG_MACH_TEGRA_GENERIC to CONFIG_TEGRA
> - moved SPL overrides to tegra2-common-post.h
> - changed SPL base address to 0x108000, u-boot goes to 0x208000
> - moved warboot_save_sdram_params fix to separate patch
> - remove USE_PRIVATE_LIBGCC from non SPL build
> - expanded SPL support to all tegra20 boards, not just seaboard
> v2:
> - renamed tegra2 to tegra20 to match kernel and devicetree naming policy
> - pulled all SPL related config overrides to a separate file to clean up
> ifdefs from seabard.h
> - rebased to TOT u-boot/master and fixed a bug related to init sequence
> changes between this patch series and new EMC code
> - made u-boot.t2 target work even if CONFIG_OF is disabled
> - added back USE_PRIVATE_LIBGCC
>
>
> Allen Martin (16):
> tegra20: rename tegra2 -> tegra20
> tegra20: move tegra20 SoC code to arch/arm/cpu/tegra20-common
> tegra20: rename CONFIG_MACH_TEGRA_GENERIC
> tegra20: tec: add tegra20-common-post.h
> tegra20: make board mkdir commands unconditional
> mkconfig: remove bashisms and cleanup config.mk generation
> MAKEALL: update to work with new boards.cfg syntax
> ARM: Fix arm720t SPL build
> tegra20: remove timer_init from SPL build
> ARM: add tegra20 support to arm720t
> tegra20: add u-boot-*-tegra.bin targets
> tegra20: move SDRAM param save to later in boot
> tegra20: enable SPL for tegra20 boards
> arm: enable libgcc build for SPL
> spl: fix SPL build of private libgcc
> tegra20: Remove armv4t build flags
>
> MAINTAINERS | 18 +--
> MAKEALL | 9 +-
> Makefile | 26 ++++
> arch/arm/cpu/arm720t/cpu.c | 2 +
> arch/arm/cpu/arm720t/interrupts.c | 5 +
> arch/arm/cpu/arm720t/start.S | 25 +++-
> arch/arm/cpu/{armv7 => arm720t/tegra20}/Makefile | 27 ++--
> .../arch-tegra2 => cpu/arm720t/tegra20}/board.h | 11 +-
> .../{armv7/tegra2 => arm720t/tegra20}/config.mk | 12 --
> .../{armv7/tegra2/ap20.c => arm720t/tegra20/cpu.c} | 148 ++---------------
> ---
> .../ap20.h => cpu/arm720t/tegra20/cpu.h} | 15 +-
> arch/arm/cpu/arm720t/tegra20/spl.c | 133
> ++++++++++++++++++
> arch/arm/cpu/armv7/Makefile | 2 +-
> arch/arm/cpu/armv7/start.S | 6 +-
> arch/arm/cpu/armv7/{tegra2 => tegra20}/Makefile | 15 +-
> .../cpu/armv7/{tegra2 => tegra20}/cmd_enterrcm.c | 4 +-
> arch/arm/cpu/armv7/{tegra2 => tegra20}/config.mk | 12 --
> arch/arm/cpu/armv7/{tegra2 => tegra20}/usb.c | 2 +-
> .../cpu/{armv7/tegra2 => tegra20-common}/Makefile | 29 ++--
> arch/arm/cpu/tegra20-common/ap20.c | 131 +++++++++++++++++
> .../cpu/{armv7/tegra2 => tegra20-common}/board.c | 39 ++----
> .../cpu/{armv7/tegra2 => tegra20-common}/clock.c | 10 +-
> .../cpu/{armv7/tegra2 => tegra20-common}/crypto.c | 0
> .../cpu/{armv7/tegra2 => tegra20-common}/crypto.h | 0
> .../arm/cpu/{armv7/tegra2 => tegra20-common}/emc.c | 2 +-
> .../cpu/{armv7/tegra2 => tegra20-common}/funcmux.c | 2 +-
> .../tegra2 => tegra20-common}/lowlevel_init.S | 0
> .../cpu/{armv7/tegra2 => tegra20-common}/pinmux.c | 4 +-
> .../arm/cpu/{armv7/tegra2 => tegra20-common}/pmu.c | 2 +-
> .../{armv7/tegra2 => tegra20-common}/sys_info.c | 2 +-
> .../cpu/{armv7/tegra2 => tegra20-common}/timer.c | 2 +-
> .../{armv7/tegra2 => tegra20-common}/warmboot.c | 18 +--
> .../tegra2 => tegra20-common}/warmboot_avp.c | 4 +-
> .../tegra2 => tegra20-common}/warmboot_avp.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/ap20.h | 4 +-
> .../asm/{arch-tegra2 => arch-tegra20}/apb_misc.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/board.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/clk_rst.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/clock.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/emc.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/flow.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/funcmux.h | 2 +-
> .../asm/{arch-tegra2 => arch-tegra20}/fuse.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/gp_padctrl.h | 2 +-
> .../asm/{arch-tegra2 => arch-tegra20}/gpio.h | 2 +-
> arch/arm/include/asm/arch-tegra20/hardware.h | 29 ++++
> .../asm/{arch-tegra2 => arch-tegra20}/mmc.h | 8 +-
> .../asm/{arch-tegra2 => arch-tegra20}/pinmux.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/pmc.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/pmu.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/scu.h | 0
> .../{arch-tegra2 => arch-tegra20}/sdram_param.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/sys_proto.h | 4 +-
> .../tegra2.h => arch-tegra20/tegra20.h} | 18 +--
> .../asm/{arch-tegra2 => arch-tegra20}/tegra_i2c.h | 2 +-
> .../asm/{arch-tegra2 => arch-tegra20}/tegra_spi.h | 4 +-
> .../asm/{arch-tegra2 => arch-tegra20}/timer.h | 6 +-
> .../uart-spi-switch.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/uart.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/usb.h | 0
> .../asm/{arch-tegra2 => arch-tegra20}/warmboot.h | 0
> arch/arm/lib/Makefile | 2 +-
> board/avionic-design/common/tamonten.c | 4 +-
> .../dts/{tegra2-medcom.dts => tegra20-medcom.dts} | 0
> .../dts/{tegra2-plutux.dts => tegra20-plutux.dts} | 0
> .../dts/{tegra2-tec.dts => tegra20-tec.dts} | 0
> board/avionic-design/medcom/Makefile | 2 -
> board/avionic-design/plutux/Makefile | 2 -
> board/avionic-design/tec/Makefile | 2 -
> .../dts/{tegra2-paz00.dts => tegra20-paz00.dts} | 0
> board/compal/paz00/Makefile | 2 -
> board/compal/paz00/paz00.c | 6 +-
> ...{tegra2-trimslice.dts => tegra20-trimslice.dts} | 0
> board/compulab/trimslice/Makefile | 2 -
> board/compulab/trimslice/trimslice.c | 6 +-
> board/nvidia/common/board.c | 17 ++-
> board/nvidia/common/emc.c | 2 +-
> board/nvidia/common/uart-spi-switch.c | 2 +-
> .../{tegra2-harmony.dts => tegra20-harmony.dts} | 2 +-
> .../{tegra2-seaboard.dts => tegra20-seaboard.dts} | 0
> .../{tegra2-ventana.dts => tegra20-ventana.dts} | 2 +-
> .../{tegra2-whistler.dts => tegra20-whistler.dts} | 2 +-
> board/nvidia/harmony/harmony.c | 6 +-
> board/nvidia/seaboard/seaboard.c | 6 +-
> board/nvidia/whistler/whistler.c | 6 +-
> boards.cfg | 18 +--
> drivers/gpio/tegra_gpio.c | 12 +-
> drivers/i2c/tegra_i2c.c | 12 +-
> drivers/input/Makefile | 2 +-
> drivers/mmc/tegra_mmc.c | 32 ++---
> drivers/mmc/tegra_mmc.h | 12 +-
> drivers/spi/tegra_spi.c | 10 +-
> include/configs/harmony.h | 14 +-
> include/configs/medcom.h | 12 +-
> include/configs/paz00.h | 12 +-
> include/configs/plutux.h | 12 +-
> include/configs/seaboard.h | 20 +--
> include/configs/tec.h | 12 +-
> ...{tegra2-common-post.h => tegra20-common-post.h} | 73 +++++++++-
> .../configs/{tegra2-common.h => tegra20-common.h} | 44 +++---
> include/configs/trimslice.h | 14 +-
> include/configs/ventana.h | 12 +-
> include/configs/whistler.h | 14 +-
> include/fdtdec.h | 12 +-
> include/serial.h | 2 +-
> mkconfig | 38 +++--
> spl/Makefile | 10 ++
> 107 files changed, 744 insertions(+), 526 deletions(-) copy
> arch/arm/cpu/{armv7 => arm720t/tegra20}/Makefile (71%) copy
> arch/arm/{include/asm/arch-tegra2 => cpu/arm720t/tegra20}/board.h (81%)
> copy arch/arm/cpu/{armv7/tegra2 => arm720t/tegra20}/config.mk (73%) rename
> arch/arm/cpu/{armv7/tegra2/ap20.c => arm720t/tegra20/cpu.c} (63%) copy
> arch/arm/{include/asm/arch-tegra2/ap20.h => cpu/arm720t/tegra20/cpu.h} (93%)
> create mode 100644 arch/arm/cpu/arm720t/tegra20/spl.c
> copy arch/arm/cpu/armv7/{tegra2 => tegra20}/Makefile (69%) rename
> arch/arm/cpu/armv7/{tegra2 => tegra20}/cmd_enterrcm.c (94%) rename
> arch/arm/cpu/armv7/{tegra2 => tegra20}/config.mk (74%) rename
> arch/arm/cpu/armv7/{tegra2 => tegra20}/usb.c (99%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/Makefile (66%) create mode
> 100644 arch/arm/cpu/tegra20-common/ap20.c
> rename arch/arm/cpu/{armv7/tegra2 => tegra20-common}/board.c (79%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/clock.c (99%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/crypto.c (100%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/crypto.h (100%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/emc.c (99%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/funcmux.c (99%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/lowlevel_init.S (100%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/pinmux.c (99%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/pmu.c (98%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/sys_info.c (98%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/timer.c (98%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/warmboot.c (95%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/warmboot_avp.c (98%) rename
> arch/arm/cpu/{armv7/tegra2 => tegra20-common}/warmboot_avp.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/ap20.h (98%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/apb_misc.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/board.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/clk_rst.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/clock.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/emc.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/flow.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/funcmux.h (97%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/fuse.h (100%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/gp_padctrl.h (98%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/gpio.h (99%)
> create mode 100644 arch/arm/include/asm/arch-tegra20/hardware.h
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/mmc.h (84%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/pinmux.h (100%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/pmc.h (100%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/pmu.h (100%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/scu.h (100%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/sdram_param.h
> (100%) rename arch/arm/include/asm/{arch-tegra2 => arch-
> tegra20}/sys_proto.h (93%) rename arch/arm/include/asm/{arch-
> tegra2/tegra2.h => arch-tegra20/tegra20.h} (87%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/tegra_i2c.h (99%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/tegra_spi.h (96%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/timer.h (92%) rename
> arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/uart-spi-switch.h (100%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/uart.h (100%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/usb.h (100%)
> rename arch/arm/include/asm/{arch-tegra2 => arch-tegra20}/warmboot.h (100%)
> rename board/avionic-design/dts/{tegra2-medcom.dts => tegra20-medcom.dts}
> (100%) rename board/avionic-design/dts/{tegra2-plutux.dts => tegra20-
> plutux.dts} (100%) rename board/avionic-design/dts/{tegra2-tec.dts =>
> tegra20-tec.dts} (100%) rename board/compal/dts/{tegra2-paz00.dts =>
> tegra20-paz00.dts} (100%) rename board/compulab/dts/{tegra2-trimslice.dts
> => tegra20-trimslice.dts} (100%) rename board/nvidia/dts/{tegra2-
> harmony.dts => tegra20-harmony.dts} (92%) rename board/nvidia/dts/{tegra2-
> seaboard.dts => tegra20-seaboard.dts} (100%) rename
> board/nvidia/dts/{tegra2-ventana.dts => tegra20-ventana.dts} (92%) rename
> board/nvidia/dts/{tegra2-whistler.dts => tegra20-whistler.dts} (94%) rename
> include/configs/{tegra2-common-post.h => tegra20-common-post.h} (74%)
> rename include/configs/{tegra2-common.h => tegra20-common.h} (84%)
>
> --
> 1.7.9.5
--
nvpublic
More information about the U-Boot
mailing list