From a59cbd9e319fb05a092a2d68eb54ad412a09be19 Mon Sep 17 00:00:00 2001 From: Bo-Chen Chen Date: Mon, 5 Sep 2022 13:03:34 +0800 Subject: [PATCH] refator(mediatek): remove unused files We do not use oem_svc.[c|h], so remove them. Signed-off-by: Bo-Chen Chen Change-Id: I0afb64d997cf4e23063f4fa2226e8d2649d22574 --- plat/mediatek/common/custom/oem_svc.c | 100 -------------------------- plat/mediatek/common/custom/oem_svc.h | 44 ------------ 2 files changed, 144 deletions(-) delete mode 100644 plat/mediatek/common/custom/oem_svc.c delete mode 100644 plat/mediatek/common/custom/oem_svc.h diff --git a/plat/mediatek/common/custom/oem_svc.c b/plat/mediatek/common/custom/oem_svc.c deleted file mode 100644 index 27ee6aa7b..000000000 --- a/plat/mediatek/common/custom/oem_svc.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -/* OEM Service UUID */ -DEFINE_SVC_UUID2(oem_svc_uid, - 0xd0ad43b9, 0x9b06, 0xe411, 0x91, 0x91, - 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66); - -/* Setup OEM Services */ -static int32_t oem_svc_setup(void) -{ - /* - * Invoke related module setup from here - */ - - return 0; -} - -/******************************************************************************* - * OEM top level handler for servicing SMCs. - ******************************************************************************/ -uintptr_t oem_smc_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) -{ - WARN("Unimplemented OEM Call: 0x%x\n", smc_fid); - SMC_RET1(handle, SMC_UNK); -} - -/* - * Top-level OEM Service SMC handler. This handler will in turn dispatch - * calls to related SMC handler - */ -uintptr_t oem_svc_smc_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) -{ - /* - * Dispatch OEM calls to OEM Common handler and return its return value - */ - if (is_oem_fid(smc_fid)) { - return oem_smc_handler(smc_fid, x1, x2, x3, x4, cookie, - handle, flags); - } - - switch (smc_fid) { - case OEM_SVC_CALL_COUNT: - /* - * Return the number of OEM Service Calls. - */ - SMC_RET1(handle, OEM_SVC_NUM_CALLS); - - case OEM_SVC_UID: - /* Return UID to the caller */ - SMC_UUID_RET(handle, oem_svc_uid); - - case OEM_SVC_VERSION: - /* Return the version of current implementation */ - SMC_RET2(handle, OEM_VERSION_MAJOR, OEM_VERSION_MINOR); - - default: - WARN("Unimplemented OEM Service Call: 0x%x\n", smc_fid); - SMC_RET1(handle, SMC_UNK); - } -} - -/* Register OEM Service Calls as runtime service */ -DECLARE_RT_SVC( - oem_svc, - OEN_OEM_START, - OEN_OEM_END, - SMC_TYPE_FAST, - oem_svc_setup, - oem_svc_smc_handler -); diff --git a/plat/mediatek/common/custom/oem_svc.h b/plat/mediatek/common/custom/oem_svc.h deleted file mode 100644 index 76f7c24e5..000000000 --- a/plat/mediatek/common/custom/oem_svc.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef OEM_SVC_H -#define OEM_SVC_H - -/******************************************************************************* - * Defines for runtime services func ids - ******************************************************************************/ -/* - * Number of OEM calls (above) implemented. - */ -#define OEM_SVC_NUM_CALLS 3 - -/******************************************************************************* - * Defines for OEM Service queries - ******************************************************************************/ -/* 0x83000000 - 0x8300FEFF is OEM service calls */ -#define OEM_SVC_CALL_COUNT 0x8300ff00 -#define OEM_SVC_UID 0x8300ff01 -/* 0x8300ff02 is reserved */ -#define OEM_SVC_VERSION 0x8300ff03 -/* 0x8300ff04 - 0x8300FFFF is reserved for future expansion */ - -/* OEM Service Calls version numbers */ -#define OEM_VERSION_MAJOR 0x0 -#define OEM_VERSION_MINOR 0x1 - -/* The macros below are used to identify OEM calls from the SMC function ID */ -/* SMC32 ID range from 0x83000000 to 0x83000FFF */ -/* SMC64 ID range from 0xC3000000 to 0xC3000FFF */ -#define OEM_FID_MASK 0xf000u -#define OEM_FID_VALUE 0u -#define is_oem_fid(_fid) \ - (((_fid) & OEM_FID_MASK) == OEM_FID_VALUE) - -#define OEM_SVC_E_SUCCESS 0 -#define OEM_SVC_E_NOT_SUPPORTED -1 -#define OEM_SVC_E_INVALID_PARAMS -2 - -#endif /* OEM_SVC_H */ -- 2.39.5