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