aboutsummaryrefslogtreecommitdiff
path: root/plat/marvell/a3700/common/a3700_sip_svc.c
diff options
context:
space:
mode:
authorGrzegorz Jaszczyk <jaz@semihalf.com>2019-11-05 13:14:59 +0100
committerMarcin Wojtas <mw@semihalf.com>2020-06-07 00:06:03 +0200
commita28471722afb3ae784d7bce2118c2ea703f8444c (patch)
tree60edc1ee925bc6645747b23d6621ed9a862a4e39 /plat/marvell/a3700/common/a3700_sip_svc.c
parent967a6d162d9dc1c5ae154f289bcdecc03cb9eb7c (diff)
downloadtrusted-firmware-a-a28471722afb3ae784d7bce2118c2ea703f8444c.tar.gz
marvell: armada: add extra level in marvell platform hierarchy
This commit is a preparation for upcoming support for OcteonTX and OcteonTX2 product families. Armada platform related files (docs, plat, include/plat) are moved to the new "armada" sub-folder. Change-Id: Icf03356187078ad6a2e56c9870992be3ca4c9655 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Diffstat (limited to 'plat/marvell/a3700/common/a3700_sip_svc.c')
-rw-r--r--plat/marvell/a3700/common/a3700_sip_svc.c84
1 files changed, 0 insertions, 84 deletions
diff --git a/plat/marvell/a3700/common/a3700_sip_svc.c b/plat/marvell/a3700/common/a3700_sip_svc.c
deleted file mode 100644
index e8ac5fc08d..0000000000
--- a/plat/marvell/a3700/common/a3700_sip_svc.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2018 Marvell International Ltd.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- * https://spdx.org/licenses
- */
-
-#include <common/debug.h>
-#include <common/runtime_svc.h>
-#include <lib/smccc.h>
-
-#include <marvell_plat_priv.h>
-#include <plat_marvell.h>
-
-#include "comphy/phy-comphy-3700.h"
-
-/* Comphy related FID's */
-#define MV_SIP_COMPHY_POWER_ON 0x82000001
-#define MV_SIP_COMPHY_POWER_OFF 0x82000002
-#define MV_SIP_COMPHY_PLL_LOCK 0x82000003
-
-/* Miscellaneous FID's' */
-#define MV_SIP_DRAM_SIZE 0x82000010
-
-/* This macro is used to identify COMPHY related calls from SMC function ID */
-#define is_comphy_fid(fid) \
- ((fid) >= MV_SIP_COMPHY_POWER_ON && (fid) <= MV_SIP_COMPHY_PLL_LOCK)
-
-uintptr_t mrvl_sip_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)
-{
- u_register_t ret;
-
- VERBOSE("%s: got SMC (0x%x) x1 0x%lx, x2 0x%lx\n",
- __func__, smc_fid, x1, x2);
- if (is_comphy_fid(smc_fid)) {
- if (x1 >= MAX_LANE_NR) {
- ERROR("%s: Wrong smc (0x%x) lane nr: %lx\n",
- __func__, smc_fid, x2);
- SMC_RET1(handle, SMC_UNK);
- }
- }
-
- switch (smc_fid) {
- /* Comphy related FID's */
- case MV_SIP_COMPHY_POWER_ON:
- /* x1: comphy_index, x2: comphy_mode */
- ret = mvebu_3700_comphy_power_on(x1, x2);
- SMC_RET1(handle, ret);
- case MV_SIP_COMPHY_POWER_OFF:
- /* x1: comphy_index, x2: comphy_mode */
- ret = mvebu_3700_comphy_power_off(x1, x2);
- SMC_RET1(handle, ret);
- case MV_SIP_COMPHY_PLL_LOCK:
- /* x1: comphy_index, x2: comphy_mode */
- ret = mvebu_3700_comphy_is_pll_locked(x1, x2);
- SMC_RET1(handle, ret);
- /* Miscellaneous FID's' */
- case MV_SIP_DRAM_SIZE:
- /* x1: ap_base_addr */
- ret = mvebu_get_dram_size(MVEBU_REGS_BASE);
- SMC_RET1(handle, ret);
-
- default:
- ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid);
- SMC_RET1(handle, SMC_UNK);
- }
-}
-
-/* Define a runtime service descriptor for fast SMC calls */
-DECLARE_RT_SVC(
- marvell_sip_svc,
- OEN_SIP_START,
- OEN_SIP_END,
- SMC_TYPE_FAST,
- NULL,
- mrvl_sip_smc_handler
-);