allwinner: Pass FDT address 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)
For Allwinner boards we now use some heuritistics to find a preloaded
.dtb file.

Pass this address on to the PMIC setup routine, so that it can use the
information contained therein to setup some initial power rails.

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

index 6c9c509c4437c010e385623bd04ebe1feaa768a0..a2d7c38c6f993701b1d2cda3540d752ed05d2031 100644 (file)
@@ -14,7 +14,7 @@ void sunxi_cpu_off(unsigned int cluster, unsigned int core);
 void sunxi_disable_secondary_cpus(unsigned int primary_cpu);
 void __dead2 sunxi_power_down(void);
 
-int sunxi_pmic_setup(uint16_t socid);
+int sunxi_pmic_setup(uint16_t socid, const void *fdt);
 void sunxi_security_setup(void);
 
 uint16_t sunxi_read_soc_id(void);
index 94b123a6413a16dad7847cc6dc10a785ce816ece..8f597c39ef4ef75f3158786b442278e112aa7f4a 100644 (file)
@@ -148,7 +148,7 @@ void bl31_platform_setup(void)
 
        sunxi_security_setup();
 
-       sunxi_pmic_setup(soc_id);
+       sunxi_pmic_setup(soc_id, fdt);
 
        INFO("BL31: Platform setup done\n");
 }
index eaca0af5d5f364a567641edcf6938064b35b3815..48d01d0c2982c70e6cc882c701503eab9fb04474 100644 (file)
@@ -126,7 +126,7 @@ static int axp_setbits(uint8_t reg, uint8_t set_mask)
        return rsb_write(AXP803_RT_ADDR, reg, regval);
 }
 
-int sunxi_pmic_setup(uint16_t socid)
+int sunxi_pmic_setup(uint16_t socid, const void *fdt)
 {
        int ret;
 
index 0a62eaa94b344098a4bc429ea6baca0e6926a574..7bdac8ab0b6acd49029933dd51b9f5963811721a 100644 (file)
@@ -68,7 +68,7 @@ static int axp805_probe(void)
        return 0;
 }
 
-int sunxi_pmic_setup(uint16_t socid)
+int sunxi_pmic_setup(uint16_t socid, const void *fdt)
 {
        int ret;