sip.c 389 B

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