| 1bc464be | 02-Jan-2017 |
Jens Kuske <jenskuske@gmail.com> |
sunxi: A64: use H3 DRAM initialization code for A64 as well
The A64 DRAM controller is very similar to the H3 one, so the code can be reused with some small changes. This refactoring does not change
sunxi: A64: use H3 DRAM initialization code for A64 as well
The A64 DRAM controller is very similar to the H3 one, so the code can be reused with some small changes. This refactoring does not change the code size for the existing H3 part.
[Andre: rework from #ifdefs to using socid parameters in static functions, minor fixes, merging in fixes from Jens]
Signed-off-by: Jens Kuske <jenskuske@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
show more ...
|
| 83843c9b | 02-Jan-2017 |
Andre Przywara <andre.przywara@arm.com> |
sunxi: A64: do an RMR switch if started in AArch32 mode
The Allwinner A64 SoC starts execution in AArch32 mode, and both the boot ROM and Allwinner's boot0 keep running in this mode. So U-Boot gets
sunxi: A64: do an RMR switch if started in AArch32 mode
The Allwinner A64 SoC starts execution in AArch32 mode, and both the boot ROM and Allwinner's boot0 keep running in this mode. So U-Boot gets entered in 32-bit, although we want it to run in AArch64.
By using a "magic" instruction, which happens to be an almost-NOP in AArch64 and a branch in AArch32, we differentiate between being entered in 64-bit or 32-bit mode. If in 64-bit mode, we proceed with the branch to reset, but in 32-bit mode we trigger an RMR write to bring the core into AArch64/EL3 and re-enter U-Boot at CONFIG_SYS_TEXT_BASE. This allows a 64-bit U-Boot to be both entered in 32 and 64-bit mode, so we can use the same start code for the SPL and the U-Boot proper.
We use the existing custom header (boot0.h) functionality, but restrict the existing boot0 header reservation to the non-SPL build now. A SPL wouldn't need such header anyway. This allows to have both options defined and lets us use one for the SPL and the other for U-Boot proper.
Also add arch/arm/mach-sunxi/rmr_switch.S, which contains the original ARM assembly code and instructions how to re-generate the encoded version.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
show more ...
|
| ce62e57f | 02-Jan-2017 |
Andre Przywara <andre.przywara@arm.com> |
ARM: boot0 hook: remove macro, include whole header file
For prepending some board specific header area to U-Boot images we were so far including a header file with a macro definition containing the
ARM: boot0 hook: remove macro, include whole header file
For prepending some board specific header area to U-Boot images we were so far including a header file with a macro definition containing the actual header specification. This works fine if there are just a few statements and if there is only one alternative. However adding more complex code quickly gets messy with this approach, so let's just drop that intermediate macro and let the #include actually insert the code directly. This converts the callers and the callees, but doesn't change anything at this point.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Steve Rae <steve.rae@raedomain.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
show more ...
|
| a5168a59 | 02-Jan-2017 |
Andre Przywara <andre.przywara@arm.com> |
armv8: move reset branch into boot hook
The boot0 hook we have so far is applied _after_ the initial branch to the "reset" entry point. An upcoming change requires even this branch to be changed, so
armv8: move reset branch into boot hook
The boot0 hook we have so far is applied _after_ the initial branch to the "reset" entry point. An upcoming change requires even this branch to be changed, so we apply the hook macro at the earliest point, and have the branch in the hook file as well. This is no functional change at this point, just refactoring to simplify upcoming patches.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@openedev.com>
show more ...
|
| 085be482 | 19-Dec-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
ARM: revive CONFIG_USE_ARCH_MEMCPY/MEMSET for UniPhier and Tegra
Commit be72591bcd64 ("Kconfig: Move USE_ARCH_MEMCPY/MEMSET to Kconfig") is misconversion.
The original logic in include/configs/unip
ARM: revive CONFIG_USE_ARCH_MEMCPY/MEMSET for UniPhier and Tegra
Commit be72591bcd64 ("Kconfig: Move USE_ARCH_MEMCPY/MEMSET to Kconfig") is misconversion.
The original logic in include/configs/uniphier.h was as follows:
#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64) #define CONFIG_USE_ARCH_MEMSET #define CONFIG_USE_ARCH_MEMCPY #endif
This means those configs were enabled when building U-Boot proper, but disabled when building SPL. Likewise for Tegra.
Now "depends on !SPL" prevents any boards with SPL support from reaching these options. This changed the behavior for UniPhier and Tegra SoC family.
Please notice these two options only control the U-Boot proper build. As you see arch/arm/Makefile, ARM-specific memset/memcpy are never compiled for SPL. So, __HAVE_ARCH_MEMCPY/MEMSET should not set for SPL.
Fixes: be72591bcd64 ("Kconfig: Move USE_ARCH_MEMCPY/MEMSET to Kconfig") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
show more ...
|
| 65d2d4f2 | 19-Dec-2016 |
Icenowy Zheng <icenowy@aosc.xyz> |
sunxi: fix SID read on H3
H3 SID controller has some bug, which makes the initial SID value at SUNXI_SID_BASE wrong when boot.
Change the SID retrieve code to call the SID Controller directly on H3
sunxi: fix SID read on H3
H3 SID controller has some bug, which makes the initial SID value at SUNXI_SID_BASE wrong when boot.
Change the SID retrieve code to call the SID Controller directly on H3, which can get the correct value, and also fix the SID value at SUNXI_SID_BASE, so that it can be used by further operations.
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
show more ...
|
| 708f6927 | 11-Dec-2016 |
Peng Fan <peng.fan@nxp.com> |
imx: clock: gate clk before changing pix clk mux
The LCDIF Pixel clock mux is not glitchless, so need to gate before changing mux.
Also change enable_lcdif_clock prototype with a new input paramete
imx: clock: gate clk before changing pix clk mux
The LCDIF Pixel clock mux is not glitchless, so need to gate before changing mux.
Also change enable_lcdif_clock prototype with a new input parameter to indicate disable or enable.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
show more ...
|