allwinner: Pass SoC ID to sunxi_pmic_setup()
authorAndre Przywara <andre.przywara@arm.com>
Sat, 8 Sep 2018 18:18:37 +0000 (19:18 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Sat, 20 Oct 2018 15:23:59 +0000 (16:23 +0100)
In the BL31 platform setup we read the Allwinner SoC ID to identify the
chip and print its name.
In addition to that we will need to differentiate the power setup
between the SoCs, to pass on the SoC ID to the PMIC setup routine.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
plat/allwinner/common/sunxi_bl31_setup.c
plat/allwinner/common/sunxi_private.h
plat/allwinner/sun50i_a64/sunxi_power.c
plat/allwinner/sun50i_h6/sunxi_power.c

index b56b9ee288cb026dd150f16182a058a21561866c..220f263345bf10d50bf541dcf611ac5722fad65d 100644 (file)
@@ -93,7 +93,7 @@ void bl31_platform_setup(void)
 
        sunxi_security_setup();
 
-       sunxi_pmic_setup();
+       sunxi_pmic_setup(soc_id);
 
        INFO("BL31: Platform setup done\n");
 }
index 20fa23e6234b038cc815eb64cc162c2d27c376d4..d4c60f9fc76b87865cb1821d1c0de4d88c4c8ead 100644 (file)
@@ -14,7 +14,7 @@ void sunxi_disable_secondary_cpus(unsigned int primary_cpu);
 
 uint16_t sunxi_read_soc_id(void);
 
-void sunxi_pmic_setup(void);
+void sunxi_pmic_setup(uint16_t socid);
 void sunxi_security_setup(void);
 
 void __dead2 sunxi_power_down(void);
index c1907d6d23d36f0b07b56e33594e13398a2d8365..a2110e95003a8728342efc6cd2380dd08e12b4a1 100644 (file)
@@ -8,7 +8,7 @@
 #include <arch_helpers.h>
 #include <debug.h>
 
-int sunxi_pmic_setup(void)
+int sunxi_pmic_setup(uint16_t socid)
 {
        /* STUB */
        NOTICE("BL31: STUB PMIC setup code called\n");
index 12438b33975c74f0ea92914f2db515ffa4a6b920..f1ad72b971fe3430b307cff21df8f8df3a0aa8af 100644 (file)
@@ -96,7 +96,7 @@ static int axp805_probe(void)
        return 0;
 }
 
-int sunxi_pmic_setup(void)
+int sunxi_pmic_setup(uint16_t socid)
 {
        int ret;