xref: /rk3399_ARM-atf/plat/rockchip/rk3576/plat_sip_calls.c (revision 06f3c7058c42a9f1a9f7df75ea2de71a000855e8)
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 
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