mach-imx: Adding new argument for SIP call interface
authorYe Li <ye.li@nxp.com>
Sat, 26 Oct 2019 14:24:03 +0000 (16:24 +0200)
committerStefano Babic <sbabic@denx.de>
Sun, 3 Nov 2019 16:04:16 +0000 (17:04 +0100)
Need to pass total 5 arguments for SIP HAB call on i.MX8MQ,
so update the interface to add new argument.

Signed-off-by: Ye Li <ye.li@nxp.com>
[agust: fixed imx8m-power-domain build]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/include/asm/mach-imx/sys_proto.h
arch/arm/mach-imx/imx_bootaux.c
arch/arm/mach-imx/sip.c
drivers/misc/imx8/fuse.c
drivers/power/domain/imx8m-power-domain.c

index 58134c0c3f0ec7e6f6d8f562c9aee5d720d081d3..1e627c8fc323929107006bd397cf186d78c0b12b 100644 (file)
@@ -138,7 +138,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg, u32 mask, u32 timeout);
 int mxs_wait_mask_clr(struct mxs_register_32 *reg, u32 mask, u32 timeout);
 
 unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
-                          unsigned long reg1, unsigned long reg2);
+                          unsigned long reg1, unsigned long reg2,
+                          unsigned long reg3);
 unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0,
                                unsigned long *reg1, unsigned long reg2,
                                unsigned long reg3);
index 18d7e6819cb13f8603e4af78493958c9c13bfb28..3d9422d5a219e9e6592210dcb54af078f8903759 100644 (file)
@@ -26,7 +26,7 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
 
        /* Enable M4 */
 #ifdef CONFIG_IMX8M
-       call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, 0, 0);
+       call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, 0, 0, 0);
 #else
        clrsetbits_le32(SRC_BASE_ADDR + SRC_M4_REG_OFFSET,
                        SRC_M4C_NON_SCLR_RST_MASK, SRC_M4_ENABLE_MASK);
@@ -38,7 +38,7 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
 int arch_auxiliary_core_check_up(u32 core_id)
 {
 #ifdef CONFIG_IMX8M
-       return call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_STARTED, 0, 0);
+       return call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_STARTED, 0, 0, 0);
 #else
        unsigned int val;
 
index 968e7cf3097356849f4c85d50845efed02366043..fca520c671ba581964e011da057b8a0711427a6d 100644 (file)
@@ -7,7 +7,8 @@
 #include <asm/arch/sys_proto.h>
 
 unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
-                          unsigned long reg1, unsigned long reg2)
+                          unsigned long reg1, unsigned long reg2,
+                          unsigned long reg3)
 {
        struct pt_regs regs;
 
@@ -15,6 +16,7 @@ unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
        regs.regs[1] = reg0;
        regs.regs[2] = reg1;
        regs.regs[3] = reg2;
+       regs.regs[4] = reg3;
 
        smc_call(&regs);
 
index 2f2fad2c17c6448d2869658ee76eceae21b3146b..1309215d4d7ce4797c580b7cf071f5b1177014bc 100644 (file)
@@ -74,7 +74,7 @@ int fuse_prog(u32 bank, u32 word, u32 val)
        }
 
        return call_imx_sip(FSL_SIP_OTP_WRITE, (unsigned long)word,
-                           (unsigned long)val, 0);
+                           (unsigned long)val, 0, 0);
 }
 
 int fuse_override(u32 bank, u32 word, u32 val)
index 164fb3d31dd9e74a89032ca28de70eab31936196..40ece9ee3fa7e6c645e6820e3eed261420bdd4f1 100644 (file)
@@ -37,7 +37,8 @@ static int imx8m_power_domain_on(struct power_domain *power_domain)
        if (pdata->has_pd)
                power_domain_on(&pdata->pd);
 
-       call_imx_sip(IMX_SIP_GPC, IMX_SIP_GPC_PM_DOMAIN, pdata->resource_id, 1);
+       call_imx_sip(IMX_SIP_GPC, IMX_SIP_GPC_PM_DOMAIN,
+                    pdata->resource_id, 1, 0);
 
        return 0;
 }
@@ -51,7 +52,8 @@ static int imx8m_power_domain_off(struct power_domain *power_domain)
        if (pdata->resource_id < 0)
                return -EINVAL;
 
-       call_imx_sip(IMX_SIP_GPC, IMX_SIP_GPC_PM_DOMAIN, pdata->resource_id, 0);
+       call_imx_sip(IMX_SIP_GPC, IMX_SIP_GPC_PM_DOMAIN,
+                    pdata->resource_id, 0, 0);
 
        if (pdata->has_pd)
                power_domain_off(&pdata->pd);