u-boot-brain/arch
Masahiro Yamada 34ded87506 ARM: uniphier: detect register base addresses run-time
Until the last SoC, the register addresses have been hard-coded because
they are always constant. For a planned new SoC, the register bases
will be completely changed. I insist on supporting multiple SoCs/boards
by a single defconfig (uniphier_v8_defconfig) since duplicating similar
defconfig files is a maintenance burden. The base addresses must be
fixed-up at run-time somehow.

Previously, the board init code identified the SoC by reading out the
SG_REVISION register. This is much easier than parsing DT.

You cannot do it any more because the base address of SG will be
changed. The SG_REVISION register exists to read out the SoC ID, but
you never know its address before identifying the SoC. Oh well.

So, the possible solution is to parse the DT, and find out the node
with "*-soc-glue" compatible string. Then, sg_base is set to the value
of the "reg" property. The sc_base is set up likewise.

It is worth noting a pit-fall. Having sc_base and sg_base in the global
scope will make the life easier, but the global variables are poorly
supported before the relocation. In fact, the .bss section overwraps
with DT. Allocating them in the .bss section would break DT. So, I gave
dummy initializers to assign them in the .data section.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-10 22:42:03 +09:00
..
arc CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
arm ARM: uniphier: detect register base addresses run-time 2019-07-10 22:42:03 +09:00
m68k Convert to use fsl_esdhc_imx for i.MX platforms 2019-06-23 14:18:34 +08:00
microblaze spl: fix linker size check off-by-one errors 2019-05-05 08:48:50 -04:00
mips mips: mt76xx: Implement new d-cache fix in last_stage_init() 2019-07-05 17:12:27 +02:00
nds32 CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
nios2 .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore 2018-06-18 14:43:12 -04:00
powerpc t2080: dts: Added PCIe DT nodes 2019-06-20 10:44:25 +05:30
riscv riscv: Add Microchip MPFS Icicle board support 2019-06-05 13:19:24 +08:00
sandbox dm: Add a No-op uclass 2019-07-05 14:19:41 +02:00
sh sh: r0p7734: Remove the board 2019-06-14 12:42:06 +02:00
x86 watchdog: tangier: Convert to use WDT class 2019-06-22 22:27:13 +08:00
xtensa CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
.gitignore
Kconfig Kconfig: Add SPI / SPI_FLASH as dependencies 2019-06-13 12:51:06 +05:30