]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: change RMR64's RVBAR address for H6
authorIcenowy Zheng <icenowy@aosc.io>
Sat, 21 Jul 2018 08:20:22 +0000 (16:20 +0800)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 31 Jul 2018 06:08:13 +0000 (11:38 +0530)
Allwinner H6 has a different RVBAR address with A64/H5.

Add conditional RVBAR configuration into the code which does RMR switch.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/include/asm/arch-sunxi/boot0.h
arch/arm/mach-sunxi/rmr_switch.S

index c826fec415239c69b2e972ad041b26e1d33bc7da..54c144afd8cb60af035fb8998859b151db3ade84 100644 (file)
        .word   0xf57ff06f      // isb     sy
        .word   0xe320f003      // wfi
        .word   0xeafffffd      // b       @wfi
+#ifndef CONFIG_MACH_SUN50I_H6
        .word   0x017000a0      // writeable RVBAR mapping address
+#else
+       .word   0x09010040      // writeable RVBAR mapping address
+#endif
 #ifdef CONFIG_SPL_BUILD
        .word   CONFIG_SPL_TEXT_BASE
 #else
index cefa93001ba18c1fa3ac92a6bc9c933a13384a96..fafd306f95b11e242ea156c33636039c2fad761a 100644 (file)
 @ reference and to be able to regenerate a (probably fixed) version of this
 @ code found in encoded form in boot0.h.
 
+#include <config.h>
+
 .text
 
+#ifndef CONFIG_MACH_SUN50I_H6
        ldr     r1, =0x017000a0         @ MMIO mapped RVBAR[0] register
+#else
+       ldr     r1, =0x09010040         @ MMIO mapped RVBAR[0] register
+#endif
        ldr     r0, =0x57aA7add         @ start address, to be replaced
        str     r0, [r1]
        dsb     sy