All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/24] sunxi: Allwinner A64: SPL support
@ 2016-11-20 14:56 Andre Przywara
  2016-11-20 14:56 ` [U-Boot] [PATCH 01/24] drivers: SPI: sunxi SPL: fix warning Andre Przywara
                   ` (23 more replies)
  0 siblings, 24 replies; 61+ messages in thread
From: Andre Przywara @ 2016-11-20 14:56 UTC (permalink / raw)
  To: u-boot

Hi,

this series introduces SPL support for the Allwinner A64 SoC.
In contrast to the previous RFC this one includes support for both
AArch64 and AArch32 SPL builds.
Still the FIT support is missing, which means the functionality is
limited. Due to the missing ARM Trusted Firmware (ATF) in this firmware
chain one loses Ethernet and SMP, among other minor things.
I will send the FIT support later on top of this.

The first two patches are fixes that I sent out before, not sure if they
landed somewhere already.
Patch 2-8 prepare the SPL code to be compiled for 64-bit in general and
AArch64 in particular.
Patch 9-11 refactor the existing boot0 header functionality to be used
by patch 12, which introduces the 64-bit switch in the first SPL
instructions.
Patches 13-18 then introduce the actual core of the SPL support: the DRAM
initialization, courtesy of Jens. This piggy backs on the existing
H3 DRAM code, deviating where needed.
Patch 19 finally enables the 64-bit SPL support. So now building the
existing pine64_plus_defconfig will generate a sunxi-spl.bin, which
can be prepended to the U-Boot proper image (not .bin) to boot from
an SD card. Due to the missing ATF support this is of limited usability
at the moment, though. Also FEL support requires more love - to switch
back to AArch32 before returning to FEL (without crashing, that is ;-),
so this is disabled.
On my setup this results in a 26KB SPL binary, which is close to the
28K limit mksunxiboot imposes at the moment. Adding anything (like
FIT support or DEBUG) will exceed this, and although I have patches
to let mksunxiboot get close to 32KB, this is the ulimate frontier.

So patches 20-23 then teach the SPL how to detect an U-Boot image file
of a different bitness and do the RMR switch from AArch32 to AArch64,
if needed.
This is used by the final patch 24, which creates another _defconfig
to let the SPL compile for AArch32 using the Thumb2 encoding. This
results in a binary of less than 17KB in my case, so has plenty of
room for extensions.

I know this is nasty stuff, so I appreciate any comments.

Cheers,
Andre.

Andre Przywara (21):
  drivers: SPI: sunxi SPL: fix warning
  sun6i: Restrict some register initialization to Allwinner A31 SoC
  armv8: prevent using THUMB
  armv8: add lowlevel_init.S
  SPL: tiny-printf: add "l" modifier
  move UL() macro from armv8/mmu.h into common.h
  SPL: make struct spl_image 64-bit safe
  armv8: add simple sdelay implementation
  armv8: move reset branch into boot hook
  ARM: boot0 hook: remove macro, include whole header file
  sunxi: introduce extra config option for boot0 header
  sunxi: A64: do an RMR switch if started in AArch32 mode
  sunxi: provide default DRAM config for sun50i in Kconfig
  sunxi: H3/A64: fix non-ODT setting
  sunxi: DRAM: fix H3 DRAM size display on aarch64
  sunxi: A64: enable SPL
  SPL: read and store arch property from U-Boot image
  Makefile: use "arm64" architecture for U-Boot image files
  ARM: SPL/FIT: differentiate between arm and arm64 arch properties
  sunxi: introduce RMR switch to enter payloads in 64-bit mode
  sunxi: A64: add 32-bit SPL support

Jens Kuske (3):
  sunxi: H3: add and rename some DRAM contoller registers
  sunxi: H3: add DRAM controller single bit delay support
  sunxi: A64: use H3 DRAM initialization code for A64

 Makefile                                        |   9 +-
 arch/arm/cpu/armv7/omap-common/boot-common.c    |   2 +-
 arch/arm/cpu/armv8/Makefile                     |   1 +
 arch/arm/cpu/armv8/cpu.c                        |  13 ++
 arch/arm/cpu/armv8/lowlevel_init.S              |  44 +++++
 arch/arm/cpu/armv8/start.S                      |   5 +-
 arch/arm/include/asm/arch-bcm235xx/boot0.h      |   8 +-
 arch/arm/include/asm/arch-bcm281xx/boot0.h      |   8 +-
 arch/arm/include/asm/arch-sunxi/boot0.h         |  34 +++-
 arch/arm/include/asm/arch-sunxi/clock_sun6i.h   |   1 +
 arch/arm/include/asm/arch-sunxi/dram.h          |   2 +-
 arch/arm/include/asm/arch-sunxi/dram_sun8i_h3.h |  51 +++---
 arch/arm/include/asm/armv8/mmu.h                |   8 -
 arch/arm/lib/Makefile                           |   2 +
 arch/arm/lib/spl.c                              |  15 ++
 arch/arm/lib/vectors.S                          |   1 -
 arch/arm/mach-sunxi/Makefile                    |   2 +
 arch/arm/mach-sunxi/board.c                     |   2 +-
 arch/arm/mach-sunxi/clock_sun6i.c               |   7 +-
 arch/arm/mach-sunxi/dram_sun8i_h3.c             | 215 +++++++++++++++++-------
 arch/arm/mach-sunxi/spl_switch.c                |  60 +++++++
 arch/arm/mach-tegra/spl.c                       |   2 +-
 board/sunxi/Kconfig                             |  32 +++-
 common/spl/spl.c                                |   9 +-
 common/spl/spl_fit.c                            |   8 +
 common/spl/spl_mmc.c                            |   2 +-
 configs/pine64_plus_defconfig                   |   6 +-
 configs/sun50i_spl32_defconfig                  |  11 ++
 drivers/mtd/spi/sunxi_spi_spl.c                 |   3 +-
 include/common.h                                |  10 +-
 include/configs/sunxi-common.h                  |   4 +-
 include/spl.h                                   |  19 ++-
 lib/tiny-printf.c                               |  43 +++--
 33 files changed, 488 insertions(+), 151 deletions(-)
 create mode 100644 arch/arm/cpu/armv8/lowlevel_init.S
 create mode 100644 arch/arm/mach-sunxi/spl_switch.c
 create mode 100644 configs/sun50i_spl32_defconfig

-- 
2.8.2

^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2016-12-03  1:43 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-20 14:56 [U-Boot] [PATCH 00/24] sunxi: Allwinner A64: SPL support Andre Przywara
2016-11-20 14:56 ` [U-Boot] [PATCH 01/24] drivers: SPI: sunxi SPL: fix warning Andre Przywara
2016-11-21  9:37   ` Jagan Teki
2016-11-21 15:28   ` Alexander Graf
2016-11-20 14:56 ` [U-Boot] [PATCH 02/24] sun6i: Restrict some register initialization to Allwinner A31 SoC Andre Przywara
2016-11-21 18:07   ` Jagan Teki
2016-11-24  3:01   ` Siarhei Siamashka
2016-11-24 10:18     ` Andre Przywara
2016-12-03  1:43       ` André Przywara
2016-11-20 14:56 ` [U-Boot] [PATCH 03/24] armv8: prevent using THUMB Andre Przywara
2016-11-21 15:29   ` Alexander Graf
2016-11-20 14:56 ` [U-Boot] [PATCH 04/24] armv8: add lowlevel_init.S Andre Przywara
2016-11-21 15:34   ` Alexander Graf
2016-11-21 15:49     ` Andre Przywara
2016-11-21 15:54       ` Alexander Graf
2016-11-20 14:56 ` [U-Boot] [PATCH 05/24] SPL: tiny-printf: add "l" modifier Andre Przywara
2016-11-21 15:42   ` Alexander Graf
2016-11-21 15:56     ` Andre Przywara
2016-11-21 16:05       ` Alexander Graf
2016-11-24  3:19   ` Siarhei Siamashka
2016-11-27 17:02     ` Simon Glass
2016-11-28  0:22       ` André Przywara
2016-11-29  1:13         ` André Przywara
2016-11-30  0:32           ` Simon Glass
2016-11-28  0:12     ` André Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 06/24] move UL() macro from armv8/mmu.h into common.h Andre Przywara
2016-11-21 15:45   ` Alexander Graf
2016-11-20 14:57 ` [U-Boot] [PATCH 07/24] SPL: make struct spl_image 64-bit safe Andre Przywara
2016-11-21 15:48   ` Alexander Graf
2016-11-21 16:20     ` york sun
2016-11-20 14:57 ` [U-Boot] [PATCH 08/24] armv8: add simple sdelay implementation Andre Przywara
2016-11-21 15:52   ` Alexander Graf
2016-11-24  1:33     ` Siarhei Siamashka
2016-11-24  1:25   ` Siarhei Siamashka
2016-11-24  1:29     ` André Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 09/24] armv8: move reset branch into boot hook Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 10/24] ARM: boot0 hook: remove macro, include whole header file Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 11/24] sunxi: introduce extra config option for boot0 header Andre Przywara
2016-11-21  7:27   ` Maxime Ripard
2016-11-21  9:29     ` Andre Przywara
2016-11-21 14:42       ` Maxime Ripard
2016-11-20 14:57 ` [U-Boot] [PATCH 12/24] sunxi: A64: do an RMR switch if started in AArch32 mode Andre Przywara
2016-11-21 16:34   ` Alexander Graf
2016-11-21 16:37     ` Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 13/24] sunxi: provide default DRAM config for sun50i in Kconfig Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 14/24] sunxi: H3: add and rename some DRAM contoller registers Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 15/24] sunxi: H3: add DRAM controller single bit delay support Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 16/24] sunxi: A64: use H3 DRAM initialization code for A64 Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 17/24] sunxi: H3/A64: fix non-ODT setting Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 18/24] sunxi: DRAM: fix H3 DRAM size display on aarch64 Andre Przywara
2016-11-21 16:36   ` Alexander Graf
2016-11-20 14:57 ` [U-Boot] [PATCH 19/24] sunxi: A64: enable SPL Andre Przywara
2016-11-21 16:37   ` Alexander Graf
2016-11-21 16:42     ` Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 20/24] SPL: read and store arch property from U-Boot image Andre Przywara
2016-11-24  2:20   ` Simon Glass
2016-11-20 14:57 ` [U-Boot] [PATCH 21/24] Makefile: use "arm64" architecture for U-Boot image files Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 22/24] ARM: SPL/FIT: differentiate between arm and arm64 arch properties Andre Przywara
2016-11-24  2:20   ` Simon Glass
2016-11-20 14:57 ` [U-Boot] [PATCH 23/24] sunxi: introduce RMR switch to enter payloads in 64-bit mode Andre Przywara
2016-11-20 14:57 ` [U-Boot] [PATCH 24/24] sunxi: A64: add 32-bit SPL support Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.