plat_sip_calls.c 693 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2024, Rockchip, Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <common/debug.h>
  7. #include <common/runtime_svc.h>
  8. #include <drivers/scmi-msg.h>
  9. #include <plat_sip_calls.h>
  10. #include <rockchip_sip_svc.h>
  11. uintptr_t rockchip_plat_sip_handler(uint32_t smc_fid,
  12. u_register_t x1,
  13. u_register_t x2,
  14. u_register_t x3,
  15. u_register_t x4,
  16. void *cookie,
  17. void *handle,
  18. u_register_t flags)
  19. {
  20. switch (smc_fid) {
  21. case RK_SIP_SCMI_AGENT0:
  22. scmi_smt_fastcall_smc_entry(0);
  23. SMC_RET1(handle, 0);
  24. default:
  25. ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid);
  26. SMC_RET1(handle, SMC_UNK);
  27. }
  28. }