allwinner: Pass SoC ID to sunxi_pmic_setup()
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>
diff --git a/plat/allwinner/common/sunxi_bl31_setup.c b/plat/allwinner/common/sunxi_bl31_setup.c
index b56b9ee..220f263 100644
--- a/plat/allwinner/common/sunxi_bl31_setup.c
+++ b/plat/allwinner/common/sunxi_bl31_setup.c
@@ -93,7 +93,7 @@
sunxi_security_setup();
- sunxi_pmic_setup();
+ sunxi_pmic_setup(soc_id);
INFO("BL31: Platform setup done\n");
}
diff --git a/plat/allwinner/common/sunxi_private.h b/plat/allwinner/common/sunxi_private.h
index 20fa23e..d4c60f9 100644
--- a/plat/allwinner/common/sunxi_private.h
+++ b/plat/allwinner/common/sunxi_private.h
@@ -14,7 +14,7 @@
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);
diff --git a/plat/allwinner/sun50i_a64/sunxi_power.c b/plat/allwinner/sun50i_a64/sunxi_power.c
index c1907d6..a2110e9 100644
--- a/plat/allwinner/sun50i_a64/sunxi_power.c
+++ b/plat/allwinner/sun50i_a64/sunxi_power.c
@@ -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");
diff --git a/plat/allwinner/sun50i_h6/sunxi_power.c b/plat/allwinner/sun50i_h6/sunxi_power.c
index 12438b3..f1ad72b 100644
--- a/plat/allwinner/sun50i_h6/sunxi_power.c
+++ b/plat/allwinner/sun50i_h6/sunxi_power.c
@@ -96,7 +96,7 @@
return 0;
}
-int sunxi_pmic_setup(void)
+int sunxi_pmic_setup(uint16_t socid)
{
int ret;