blob: 496e8d751b5ede97ef40672ce46591d703ca821e [file] [log] [blame]
XiaoDong Huangdcf89f32023-06-26 16:43:30 +08001/*
2 * Copyright (c) 2024, Rockchip, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <common/debug.h>
8#include <common/runtime_svc.h>
XiaoDong Huang51c6bf82023-06-25 17:38:13 +08009#include <drivers/scmi-msg.h>
XiaoDong Huangdcf89f32023-06-26 16:43:30 +080010
11#include <plat_sip_calls.h>
12#include <rockchip_sip_svc.h>
13
14uintptr_t rockchip_plat_sip_handler(uint32_t smc_fid,
15 u_register_t x1,
16 u_register_t x2,
17 u_register_t x3,
18 u_register_t x4,
19 void *cookie,
20 void *handle,
21 u_register_t flags)
22{
23 switch (smc_fid) {
XiaoDong Huang51c6bf82023-06-25 17:38:13 +080024 case RK_SIP_SCMI_AGENT0:
25 scmi_smt_fastcall_smc_entry(0);
26 SMC_RET1(handle, 0);
27
XiaoDong Huangdcf89f32023-06-26 16:43:30 +080028 default:
29 ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid);
30 SMC_RET1(handle, SMC_UNK);
31 }
32}