From fe57c7d477d1fd4fb4a4b5b1dfb2c3873f58a664 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Sat, 8 Sep 2018 19:18:37 +0100 Subject: [PATCH] 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 --- plat/allwinner/common/sunxi_bl31_setup.c | 2 +- plat/allwinner/common/sunxi_private.h | 2 +- plat/allwinner/sun50i_a64/sunxi_power.c | 2 +- plat/allwinner/sun50i_h6/sunxi_power.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plat/allwinner/common/sunxi_bl31_setup.c b/plat/allwinner/common/sunxi_bl31_setup.c index b56b9ee2..220f2633 100644 --- a/plat/allwinner/common/sunxi_bl31_setup.c +++ b/plat/allwinner/common/sunxi_bl31_setup.c @@ -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"); } diff --git a/plat/allwinner/common/sunxi_private.h b/plat/allwinner/common/sunxi_private.h index 20fa23e6..d4c60f9f 100644 --- a/plat/allwinner/common/sunxi_private.h +++ b/plat/allwinner/common/sunxi_private.h @@ -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); diff --git a/plat/allwinner/sun50i_a64/sunxi_power.c b/plat/allwinner/sun50i_a64/sunxi_power.c index c1907d6d..a2110e95 100644 --- a/plat/allwinner/sun50i_a64/sunxi_power.c +++ b/plat/allwinner/sun50i_a64/sunxi_power.c @@ -8,7 +8,7 @@ #include #include -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 12438b33..f1ad72b9 100644 --- a/plat/allwinner/sun50i_h6/sunxi_power.c +++ b/plat/allwinner/sun50i_h6/sunxi_power.c @@ -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; -- 2.30.2