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