xref: /openbmc/u-boot/arch/arm/mach-imx/sip.c (revision c0fb2fc0)
1 /*
2  * Copyright 2017 NXP
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #include <common.h>
8 #include <asm/arch/sys_proto.h>
9 
10 unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
11 			   unsigned long reg1, unsigned long reg2)
12 {
13 	struct pt_regs regs;
14 
15 	regs.regs[0] = id;
16 	regs.regs[1] = reg0;
17 	regs.regs[2] = reg1;
18 	regs.regs[3] = reg2;
19 
20 	smc_call(&regs);
21 
22 	return regs.regs[0];
23 }
24