sip.c 386 B

12345678910111213141516171819202122
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright 2017 NXP
  4. */
  5. #include <common.h>
  6. #include <asm/arch/sys_proto.h>
  7. unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
  8. unsigned long reg1, unsigned long reg2)
  9. {
  10. struct pt_regs regs;
  11. regs.regs[0] = id;
  12. regs.regs[1] = reg0;
  13. regs.regs[2] = reg1;
  14. regs.regs[3] = reg2;
  15. smc_call(&regs);
  16. return regs.regs[0];
  17. }