summaryrefslogtreecommitdiff
path: root/plat/freescale/common/sci/svc
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>2017-08-28 19:16:33 -0500
committerAnson Huang <Anson.Huang@nxp.com>2017-08-29 17:13:00 +0800
commit8fa9a67cc4938ce6c2c1c09a2d0c9e3f7dcd835c (patch)
tree3da366edbc83cad08439129da410ef55cac46809 /plat/freescale/common/sci/svc
parent96f4d3768c8b35d2d8cbcce75617790f3bb037f6 (diff)
Update to the latest SCFW API.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Diffstat (limited to 'plat/freescale/common/sci/svc')
-rwxr-xr-x[-rw-r--r--]plat/freescale/common/sci/svc/pad/pad_rpc_clnt.c89
-rwxr-xr-x[-rw-r--r--]plat/freescale/common/sci/svc/pad/rpc.h37
-rwxr-xr-x[-rw-r--r--]plat/freescale/common/sci/svc/pm/rpc.h35
-rwxr-xr-x[-rw-r--r--]plat/freescale/common/sci/svc/rm/rm_rpc_clnt.c108
-rwxr-xr-x[-rw-r--r--]plat/freescale/common/sci/svc/rm/rpc.h62
5 files changed, 209 insertions, 122 deletions
diff --git a/plat/freescale/common/sci/svc/pad/pad_rpc_clnt.c b/plat/freescale/common/sci/svc/pad/pad_rpc_clnt.c
index 4b0ef948..b5e79f1d 100644..100755
--- a/plat/freescale/common/sci/svc/pad/pad_rpc_clnt.c
+++ b/plat/freescale/common/sci/svc/pad/pad_rpc_clnt.c
@@ -7,7 +7,7 @@
/*!
* File containing client-side RPC functions for the PAD service. These
- * function are ported to clients that communicate to the SC.
+ * functions are ported to clients that communicate to the SC.
*
* @addtogroup PAD_SVC
* @{
@@ -50,7 +50,8 @@ sc_err_t sc_pad_set_mux(sc_ipc_t ipc, sc_pad_t pad,
}
sc_err_t sc_pad_get_mux(sc_ipc_t ipc, sc_pad_t pad,
- uint8_t *mux, sc_pad_config_t *config, sc_pad_iso_t *iso)
+ uint8_t *mux, sc_pad_config_t *config,
+ sc_pad_iso_t *iso)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -110,8 +111,7 @@ sc_err_t sc_pad_get_gp(sc_ipc_t ipc, sc_pad_t pad, uint32_t *ctrl)
return (sc_err_t) result;
}
-sc_err_t sc_pad_set_wakeup(sc_ipc_t ipc, sc_pad_t pad,
- sc_pad_wakeup_t wakeup)
+sc_err_t sc_pad_set_wakeup(sc_ipc_t ipc, sc_pad_t pad, sc_pad_wakeup_t wakeup)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -129,8 +129,7 @@ sc_err_t sc_pad_set_wakeup(sc_ipc_t ipc, sc_pad_t pad,
return (sc_err_t) result;
}
-sc_err_t sc_pad_get_wakeup(sc_ipc_t ipc, sc_pad_t pad,
- sc_pad_wakeup_t *wakeup)
+sc_err_t sc_pad_get_wakeup(sc_ipc_t ipc, sc_pad_t pad, sc_pad_wakeup_t *wakeup)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -174,8 +173,8 @@ sc_err_t sc_pad_set_all(sc_ipc_t ipc, sc_pad_t pad, uint8_t mux,
}
sc_err_t sc_pad_get_all(sc_ipc_t ipc, sc_pad_t pad, uint8_t *mux,
- sc_pad_config_t *config, sc_pad_iso_t *iso, uint32_t *ctrl,
- sc_pad_wakeup_t *wakeup)
+ sc_pad_config_t *config, sc_pad_iso_t *iso,
+ uint32_t *ctrl, sc_pad_wakeup_t *wakeup)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -239,23 +238,19 @@ sc_err_t sc_pad_get(sc_ipc_t ipc, sc_pad_t pad, uint32_t *val)
return (sc_err_t) result;
}
-sc_err_t sc_pad_set_gp_28lpp(sc_ipc_t ipc, sc_pad_t pad,
- sc_pad_28lpp_dse_t dse, bool sre, bool hys, bool pe,
- sc_pad_28lpp_ps_t ps)
+sc_err_t sc_pad_set_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
+ sc_pad_28fdsoi_dse_t dse, sc_pad_28fdsoi_ps_t ps)
{
sc_rpc_msg_t msg;
uint8_t result;
RPC_VER(&msg) = SC_RPC_VERSION;
RPC_SVC(&msg) = SC_RPC_SVC_PAD;
- RPC_FUNC(&msg) = PAD_FUNC_SET_GP_28LPP;
+ RPC_FUNC(&msg) = PAD_FUNC_SET_GP_28FDSOI;
RPC_U16(&msg, 0) = pad;
RPC_U8(&msg, 2) = dse;
RPC_U8(&msg, 3) = ps;
- RPC_U8(&msg, 4) = sre;
- RPC_U8(&msg, 5) = hys;
- RPC_U8(&msg, 6) = pe;
- RPC_SIZE(&msg) = 3;
+ RPC_SIZE(&msg) = 2;
sc_call_rpc(ipc, &msg, false);
@@ -263,16 +258,16 @@ sc_err_t sc_pad_set_gp_28lpp(sc_ipc_t ipc, sc_pad_t pad,
return (sc_err_t) result;
}
-sc_err_t sc_pad_get_gp_28lpp(sc_ipc_t ipc, sc_pad_t pad,
- sc_pad_28lpp_dse_t *dse, bool *sre, bool *hys, bool *pe,
- sc_pad_28lpp_ps_t *ps)
+sc_err_t sc_pad_get_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
+ sc_pad_28fdsoi_dse_t *dse,
+ sc_pad_28fdsoi_ps_t *ps)
{
sc_rpc_msg_t msg;
uint8_t result;
RPC_VER(&msg) = SC_RPC_VERSION;
RPC_SVC(&msg) = SC_RPC_SVC_PAD;
- RPC_FUNC(&msg) = PAD_FUNC_GET_GP_28LPP;
+ RPC_FUNC(&msg) = PAD_FUNC_GET_GP_28FDSOI;
RPC_U16(&msg, 0) = pad;
RPC_SIZE(&msg) = 2;
@@ -283,28 +278,27 @@ sc_err_t sc_pad_get_gp_28lpp(sc_ipc_t ipc, sc_pad_t pad,
*dse = RPC_U8(&msg, 0);
if (ps != NULL)
*ps = RPC_U8(&msg, 1);
- if (sre != NULL)
- *sre = RPC_U8(&msg, 2);
- if (hys != NULL)
- *hys = RPC_U8(&msg, 3);
- if (pe != NULL)
- *pe = RPC_U8(&msg, 4);
return (sc_err_t) result;
}
-sc_err_t sc_pad_set_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
- sc_pad_28fdsoi_dse_t dse, sc_pad_28fdsoi_ps_t ps)
+sc_err_t sc_pad_set_gp_28fdsoi_hsic(sc_ipc_t ipc, sc_pad_t pad,
+ sc_pad_28fdsoi_dse_t dse, bool hys,
+ sc_pad_28fdsoi_pus_t pus, bool pke,
+ bool pue)
{
sc_rpc_msg_t msg;
uint8_t result;
RPC_VER(&msg) = SC_RPC_VERSION;
RPC_SVC(&msg) = SC_RPC_SVC_PAD;
- RPC_FUNC(&msg) = PAD_FUNC_SET_GP_28FDSOI;
+ RPC_FUNC(&msg) = PAD_FUNC_SET_GP_28FDSOI_HSIC;
RPC_U16(&msg, 0) = pad;
RPC_U8(&msg, 2) = dse;
- RPC_U8(&msg, 3) = ps;
- RPC_SIZE(&msg) = 2;
+ RPC_U8(&msg, 3) = pus;
+ RPC_U8(&msg, 4) = hys;
+ RPC_U8(&msg, 5) = pke;
+ RPC_U8(&msg, 6) = pue;
+ RPC_SIZE(&msg) = 3;
sc_call_rpc(ipc, &msg, false);
@@ -312,15 +306,17 @@ sc_err_t sc_pad_set_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
return (sc_err_t) result;
}
-sc_err_t sc_pad_get_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
- sc_pad_28fdsoi_dse_t *dse, sc_pad_28fdsoi_ps_t *ps)
+sc_err_t sc_pad_get_gp_28fdsoi_hsic(sc_ipc_t ipc, sc_pad_t pad,
+ sc_pad_28fdsoi_dse_t *dse, bool *hys,
+ sc_pad_28fdsoi_pus_t * pus, bool *pke,
+ bool *pue)
{
sc_rpc_msg_t msg;
uint8_t result;
RPC_VER(&msg) = SC_RPC_VERSION;
RPC_SVC(&msg) = SC_RPC_SVC_PAD;
- RPC_FUNC(&msg) = PAD_FUNC_GET_GP_28FDSOI;
+ RPC_FUNC(&msg) = PAD_FUNC_GET_GP_28FDSOI_HSIC;
RPC_U16(&msg, 0) = pad;
RPC_SIZE(&msg) = 2;
@@ -329,14 +325,21 @@ sc_err_t sc_pad_get_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
result = RPC_R8(&msg);
if (dse != NULL)
*dse = RPC_U8(&msg, 0);
- if (ps != NULL)
- *ps = RPC_U8(&msg, 1);
+ if (pus != NULL)
+ *pus = RPC_U8(&msg, 1);
+ if (hys != NULL)
+ *hys = RPC_U8(&msg, 2);
+ if (pke != NULL)
+ *pke = RPC_U8(&msg, 3);
+ if (pue != NULL)
+ *pue = RPC_U8(&msg, 4);
return (sc_err_t) result;
}
sc_err_t sc_pad_set_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pad_t pad,
- uint8_t compen, bool fastfrz, uint8_t rasrcp, uint8_t rasrcn,
- bool nasrc_sel)
+ uint8_t compen, bool fastfrz,
+ uint8_t rasrcp, uint8_t rasrcn,
+ bool nasrc_sel, bool psw_ovr)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -350,6 +353,7 @@ sc_err_t sc_pad_set_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pad_t pad,
RPC_U8(&msg, 4) = rasrcn;
RPC_U8(&msg, 5) = fastfrz;
RPC_U8(&msg, 6) = nasrc_sel;
+ RPC_U8(&msg, 7) = psw_ovr;
RPC_SIZE(&msg) = 3;
sc_call_rpc(ipc, &msg, false);
@@ -359,8 +363,10 @@ sc_err_t sc_pad_set_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pad_t pad,
}
sc_err_t sc_pad_get_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pad_t pad,
- uint8_t *compen, bool *fastfrz, uint8_t *rasrcp, uint8_t *rasrcn,
- bool *nasrc_sel, bool *compok, uint8_t *nasrc)
+ uint8_t *compen, bool *fastfrz,
+ uint8_t *rasrcp, uint8_t *rasrcn,
+ bool *nasrc_sel, bool *compok,
+ uint8_t *nasrc, bool *psw_ovr)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -388,8 +394,9 @@ sc_err_t sc_pad_get_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pad_t pad,
*nasrc_sel = RPC_U8(&msg, 5);
if (compok != NULL)
*compok = RPC_U8(&msg, 6);
+ if (psw_ovr != NULL)
+ *psw_ovr = RPC_U8(&msg, 7);
return (sc_err_t) result;
}
/**@}*/
-
diff --git a/plat/freescale/common/sci/svc/pad/rpc.h b/plat/freescale/common/sci/svc/pad/rpc.h
index f0f32aff..c86b295a 100644..100755
--- a/plat/freescale/common/sci/svc/pad/rpc.h
+++ b/plat/freescale/common/sci/svc/pad/rpc.h
@@ -24,25 +24,24 @@
/*!
* This type is used to indicate RPC PAD function calls.
*/
-typedef enum pad_func_e
-{
- PAD_FUNC_UNKNOWN = 0, /*!< Unknown function */
- PAD_FUNC_SET_MUX = 1, /*!< Index for pad_set_mux() RPC call */
- PAD_FUNC_GET_MUX = 6, /*!< Index for pad_get_mux() RPC call */
- PAD_FUNC_SET_GP = 2, /*!< Index for pad_set_gp() RPC call */
- PAD_FUNC_GET_GP = 7, /*!< Index for pad_get_gp() RPC call */
- PAD_FUNC_SET_WAKEUP = 4, /*!< Index for pad_set_wakeup() RPC call */
- PAD_FUNC_GET_WAKEUP = 9, /*!< Index for pad_get_wakeup() RPC call */
- PAD_FUNC_SET_ALL = 5, /*!< Index for pad_set_all() RPC call */
- PAD_FUNC_GET_ALL = 10, /*!< Index for pad_get_all() RPC call */
- PAD_FUNC_SET = 15, /*!< Index for pad_set() RPC call */
- PAD_FUNC_GET = 16, /*!< Index for pad_get() RPC call */
- PAD_FUNC_SET_GP_28LPP = 3, /*!< Index for pad_set_gp_28lpp() RPC call */
- PAD_FUNC_GET_GP_28LPP = 8, /*!< Index for pad_get_gp_28lpp() RPC call */
- PAD_FUNC_SET_GP_28FDSOI = 11, /*!< Index for pad_set_gp_28fdsoi() RPC call */
- PAD_FUNC_GET_GP_28FDSOI = 12, /*!< Index for pad_get_gp_28fdsoi() RPC call */
- PAD_FUNC_SET_GP_28FDSOI_COMP = 13, /*!< Index for pad_set_gp_28fdsoi_comp() RPC call */
- PAD_FUNC_GET_GP_28FDSOI_COMP = 14, /*!< Index for pad_get_gp_28fdsoi_comp() RPC call */
+typedef enum pad_func_e {
+ PAD_FUNC_UNKNOWN = 0, /* Unknown function */
+ PAD_FUNC_SET_MUX = 1, /* Index for pad_set_mux() RPC call */
+ PAD_FUNC_GET_MUX = 6, /* Index for pad_get_mux() RPC call */
+ PAD_FUNC_SET_GP = 2, /* Index for pad_set_gp() RPC call */
+ PAD_FUNC_GET_GP = 7, /* Index for pad_get_gp() RPC call */
+ PAD_FUNC_SET_WAKEUP = 4, /* Index for pad_set_wakeup() RPC call */
+ PAD_FUNC_GET_WAKEUP = 9, /* Index for pad_get_wakeup() RPC call */
+ PAD_FUNC_SET_ALL = 5, /* Index for pad_set_all() RPC call */
+ PAD_FUNC_GET_ALL = 10, /* Index for pad_get_all() RPC call */
+ PAD_FUNC_SET = 15, /* Index for pad_set() RPC call */
+ PAD_FUNC_GET = 16, /* Index for pad_get() RPC call */
+ PAD_FUNC_SET_GP_28FDSOI = 11, /* Index for pad_set_gp_28fdsoi() RPC call */
+ PAD_FUNC_GET_GP_28FDSOI = 12, /* Index for pad_get_gp_28fdsoi() RPC call */
+ PAD_FUNC_SET_GP_28FDSOI_HSIC = 3, /* Index for pad_set_gp_28fdsoi_hsic() RPC call */
+ PAD_FUNC_GET_GP_28FDSOI_HSIC = 8, /* Index for pad_get_gp_28fdsoi_hsic() RPC call */
+ PAD_FUNC_SET_GP_28FDSOI_COMP = 13, /* Index for pad_set_gp_28fdsoi_comp() RPC call */
+ PAD_FUNC_GET_GP_28FDSOI_COMP = 14, /* Index for pad_get_gp_28fdsoi_comp() RPC call */
} pad_func_t;
/* Functions */
diff --git a/plat/freescale/common/sci/svc/pm/rpc.h b/plat/freescale/common/sci/svc/pm/rpc.h
index 1f4235a2..cbed56ab 100644..100755
--- a/plat/freescale/common/sci/svc/pm/rpc.h
+++ b/plat/freescale/common/sci/svc/pm/rpc.h
@@ -24,24 +24,23 @@
/*!
* This type is used to indicate RPC PM function calls.
*/
-typedef enum pm_func_e
-{
- PM_FUNC_UNKNOWN = 0, /*!< Unknown function */
- PM_FUNC_SET_SYS_POWER_MODE = 1, /*!< Index for pm_set_sys_power_mode() RPC call */
- PM_FUNC_GET_SYS_POWER_MODE = 2, /*!< Index for pm_get_sys_power_mode() RPC call */
- PM_FUNC_SET_RESOURCE_POWER_MODE = 3, /*!< Index for pm_set_resource_power_mode() RPC call */
- PM_FUNC_GET_RESOURCE_POWER_MODE = 4, /*!< Index for pm_get_resource_power_mode() RPC call */
- PM_FUNC_SET_CLOCK_RATE = 5, /*!< Index for pm_set_clock_rate() RPC call */
- PM_FUNC_GET_CLOCK_RATE = 6, /*!< Index for pm_get_clock_rate() RPC call */
- PM_FUNC_CLOCK_ENABLE = 7, /*!< Index for pm_clock_enable() RPC call */
- PM_FUNC_SET_CLOCK_PARENT = 14, /*!< Index for pm_set_clock_parent() RPC call */
- PM_FUNC_GET_CLOCK_PARENT = 15, /*!< Index for pm_get_clock_parent() RPC call */
- PM_FUNC_RESET = 13, /*!< Index for pm_reset() RPC call */
- PM_FUNC_RESET_REASON = 10, /*!< Index for pm_reset_reason() RPC call */
- PM_FUNC_BOOT = 8, /*!< Index for pm_boot() RPC call */
- PM_FUNC_REBOOT = 9, /*!< Index for pm_reboot() RPC call */
- PM_FUNC_REBOOT_PARTITION = 12, /*!< Index for pm_reboot_partition() RPC call */
- PM_FUNC_CPU_START = 11, /*!< Index for pm_cpu_start() RPC call */
+typedef enum pm_func_e {
+ PM_FUNC_UNKNOWN = 0, /* Unknown function */
+ PM_FUNC_SET_SYS_POWER_MODE = 1, /* Index for pm_set_sys_power_mode() RPC call */
+ PM_FUNC_GET_SYS_POWER_MODE = 2, /* Index for pm_get_sys_power_mode() RPC call */
+ PM_FUNC_SET_RESOURCE_POWER_MODE = 3, /* Index for pm_set_resource_power_mode() RPC call */
+ PM_FUNC_GET_RESOURCE_POWER_MODE = 4, /* Index for pm_get_resource_power_mode() RPC call */
+ PM_FUNC_SET_CLOCK_RATE = 5, /* Index for pm_set_clock_rate() RPC call */
+ PM_FUNC_GET_CLOCK_RATE = 6, /* Index for pm_get_clock_rate() RPC call */
+ PM_FUNC_CLOCK_ENABLE = 7, /* Index for pm_clock_enable() RPC call */
+ PM_FUNC_SET_CLOCK_PARENT = 14, /* Index for pm_set_clock_parent() RPC call */
+ PM_FUNC_GET_CLOCK_PARENT = 15, /* Index for pm_get_clock_parent() RPC call */
+ PM_FUNC_RESET = 13, /* Index for pm_reset() RPC call */
+ PM_FUNC_RESET_REASON = 10, /* Index for pm_reset_reason() RPC call */
+ PM_FUNC_BOOT = 8, /* Index for pm_boot() RPC call */
+ PM_FUNC_REBOOT = 9, /* Index for pm_reboot() RPC call */
+ PM_FUNC_REBOOT_PARTITION = 12, /* Index for pm_reboot_partition() RPC call */
+ PM_FUNC_CPU_START = 11, /* Index for pm_cpu_start() RPC call */
} pm_func_t;
/* Functions */
diff --git a/plat/freescale/common/sci/svc/rm/rm_rpc_clnt.c b/plat/freescale/common/sci/svc/rm/rm_rpc_clnt.c
index 9cdf6177..454d07bb 100644..100755
--- a/plat/freescale/common/sci/svc/rm/rm_rpc_clnt.c
+++ b/plat/freescale/common/sci/svc/rm/rm_rpc_clnt.c
@@ -7,7 +7,7 @@
/*!
* File containing client-side RPC functions for the RM service. These
- * function are ported to clients that communicate to the SC.
+ * functions are ported to clients that communicate to the SC.
*
* @addtogroup RM_SVC
* @{
@@ -28,7 +28,8 @@
/* Local Functions */
sc_err_t sc_rm_partition_alloc(sc_ipc_t ipc, sc_rm_pt_t *pt, bool secure,
- bool isolated, bool restricted, bool confidential, bool coherent)
+ bool isolated, bool restricted,
+ bool confidential, bool coherent)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -84,8 +85,7 @@ sc_rm_did_t sc_rm_get_did(sc_ipc_t ipc)
return (sc_rm_did_t) result;
}
-sc_err_t sc_rm_partition_static(sc_ipc_t ipc, sc_rm_pt_t pt,
- sc_rm_did_t did)
+sc_err_t sc_rm_partition_static(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rm_did_t did)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -138,8 +138,7 @@ sc_err_t sc_rm_get_partition(sc_ipc_t ipc, sc_rm_pt_t *pt)
return (sc_err_t)result;
}
-sc_err_t sc_rm_set_parent(sc_ipc_t ipc, sc_rm_pt_t pt,
- sc_rm_pt_t pt_parent)
+sc_err_t sc_rm_set_parent(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rm_pt_t pt_parent)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -178,8 +177,7 @@ sc_err_t sc_rm_move_all(sc_ipc_t ipc, sc_rm_pt_t pt_src, sc_rm_pt_t pt_dst,
return (sc_err_t)result;
}
-sc_err_t sc_rm_assign_resource(sc_ipc_t ipc, sc_rm_pt_t pt,
- sc_rsrc_t resource)
+sc_err_t sc_rm_assign_resource(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rsrc_t resource)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -217,8 +215,28 @@ sc_err_t sc_rm_set_resource_movable(sc_ipc_t ipc, sc_rsrc_t resource_fst,
return (sc_err_t)result;
}
+sc_err_t sc_rm_set_subsys_rsrc_movable(sc_ipc_t ipc, sc_rsrc_t resource,
+ bool movable)
+{
+ sc_rpc_msg_t msg;
+ uint8_t result;
+
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SVC(&msg) = SC_RPC_SVC_RM;
+ RPC_FUNC(&msg) = RM_FUNC_SET_SUBSYS_RSRC_MOVABLE;
+ RPC_U16(&msg, 0) = resource;
+ RPC_U8(&msg, 2) = movable;
+ RPC_SIZE(&msg) = 2;
+
+ sc_call_rpc(ipc, &msg, false);
+
+ result = RPC_R8(&msg);
+ return (sc_err_t)result;
+}
+
sc_err_t sc_rm_set_master_attributes(sc_ipc_t ipc, sc_rsrc_t resource,
- sc_rm_spa_t sa, sc_rm_spa_t pa, bool smmu_bypass)
+ sc_rm_spa_t sa, sc_rm_spa_t pa,
+ bool smmu_bypass)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -238,8 +256,7 @@ sc_err_t sc_rm_set_master_attributes(sc_ipc_t ipc, sc_rsrc_t resource,
return (sc_err_t)result;
}
-sc_err_t sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource,
- sc_rm_sid_t sid)
+sc_err_t sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid)
{
sc_rpc_msg_t msg;
uint8_t result;
@@ -371,6 +388,31 @@ sc_err_t sc_rm_memreg_alloc(sc_ipc_t ipc, sc_rm_mr_t *mr,
return (sc_err_t)result;
}
+sc_err_t sc_rm_memreg_split(sc_ipc_t ipc, sc_rm_mr_t mr,
+ sc_rm_mr_t *mr_ret, sc_faddr_t addr_start,
+ sc_faddr_t addr_end)
+{
+ sc_rpc_msg_t msg;
+ uint8_t result;
+
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SVC(&msg) = SC_RPC_SVC_RM;
+ RPC_FUNC(&msg) = RM_FUNC_MEMREG_SPLIT;
+ RPC_U32(&msg, 0) = addr_start >> 32;
+ RPC_U32(&msg, 4) = addr_start;
+ RPC_U32(&msg, 8) = addr_end >> 32;
+ RPC_U32(&msg, 12) = addr_end;
+ RPC_U8(&msg, 16) = mr;
+ RPC_SIZE(&msg) = 6;
+
+ sc_call_rpc(ipc, &msg, false);
+
+ result = RPC_R8(&msg);
+ if (mr_ret != NULL)
+ *mr_ret = RPC_U8(&msg, 0);
+ return (sc_err_t)result;
+}
+
sc_err_t sc_rm_memreg_free(sc_ipc_t ipc, sc_rm_mr_t mr)
{
sc_rpc_msg_t msg;
@@ -388,6 +430,29 @@ sc_err_t sc_rm_memreg_free(sc_ipc_t ipc, sc_rm_mr_t mr)
return (sc_err_t)result;
}
+sc_err_t sc_rm_find_memreg(sc_ipc_t ipc, sc_rm_mr_t *mr,
+ sc_faddr_t addr_start, sc_faddr_t addr_end)
+{
+ sc_rpc_msg_t msg;
+ uint8_t result;
+
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SVC(&msg) = SC_RPC_SVC_RM;
+ RPC_FUNC(&msg) = RM_FUNC_FIND_MEMREG;
+ RPC_U32(&msg, 0) = addr_start >> 32;
+ RPC_U32(&msg, 4) = addr_start;
+ RPC_U32(&msg, 8) = addr_end >> 32;
+ RPC_U32(&msg, 12) = addr_end;
+ RPC_SIZE(&msg) = 5;
+
+ sc_call_rpc(ipc, &msg, false);
+
+ result = RPC_R8(&msg);
+ if (mr != NULL)
+ *mr = RPC_U8(&msg, 0);
+ return (sc_err_t)result;
+}
+
sc_err_t sc_rm_assign_memreg(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rm_mr_t mr)
{
sc_rpc_msg_t msg;
@@ -458,9 +523,11 @@ sc_err_t sc_rm_get_memreg_info(sc_ipc_t ipc, sc_rm_mr_t mr,
sc_call_rpc(ipc, &msg, false);
if (addr_start != NULL)
- *addr_start = ((uint64_t) RPC_U32(&msg, 0) << 32) | RPC_U32(&msg, 4);
+ *addr_start =
+ ((uint64_t) RPC_U32(&msg, 0) << 32) | RPC_U32(&msg, 4);
if (addr_end != NULL)
- *addr_end = ((uint64_t) RPC_U32(&msg, 8) << 32) | RPC_U32(&msg, 12);
+ *addr_end =
+ ((uint64_t) RPC_U32(&msg, 8) << 32) | RPC_U32(&msg, 12);
result = RPC_R8(&msg);
return (sc_err_t)result;
}
@@ -520,5 +587,18 @@ bool sc_rm_is_pad_owned(sc_ipc_t ipc, sc_pad_t pad)
return (bool)result;
}
-/**@}*/
+void sc_rm_dump(sc_ipc_t ipc)
+{
+ sc_rpc_msg_t msg;
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SVC(&msg) = SC_RPC_SVC_RM;
+ RPC_FUNC(&msg) = RM_FUNC_DUMP;
+ RPC_SIZE(&msg) = 1;
+
+ sc_call_rpc(ipc, &msg, false);
+
+ return;
+}
+
+/**@}*/
diff --git a/plat/freescale/common/sci/svc/rm/rpc.h b/plat/freescale/common/sci/svc/rm/rpc.h
index 68037470..2a911874 100644..100755
--- a/plat/freescale/common/sci/svc/rm/rpc.h
+++ b/plat/freescale/common/sci/svc/rm/rpc.h
@@ -24,35 +24,38 @@
/*!
* This type is used to indicate RPC RM function calls.
*/
-typedef enum rm_func_e
-{
- RM_FUNC_UNKNOWN = 0, /*!< Unknown function */
- RM_FUNC_PARTITION_ALLOC = 1, /*!< Index for rm_partition_alloc() RPC call */
- RM_FUNC_PARTITION_FREE = 2, /*!< Index for rm_partition_free() RPC call */
- RM_FUNC_GET_DID = 26, /*!< Index for rm_get_did() RPC call */
- RM_FUNC_PARTITION_STATIC = 3, /*!< Index for rm_partition_static() RPC call */
- RM_FUNC_PARTITION_LOCK = 4, /*!< Index for rm_partition_lock() RPC call */
- RM_FUNC_GET_PARTITION = 5, /*!< Index for rm_get_partition() RPC call */
- RM_FUNC_SET_PARENT = 6, /*!< Index for rm_set_parent() RPC call */
- RM_FUNC_MOVE_ALL = 7, /*!< Index for rm_move_all() RPC call */
- RM_FUNC_ASSIGN_RESOURCE = 8, /*!< Index for rm_assign_resource() RPC call */
- RM_FUNC_SET_RESOURCE_MOVABLE = 9, /*!< Index for rm_set_resource_movable() RPC call */
- RM_FUNC_SET_MASTER_ATTRIBUTES = 10, /*!< Index for rm_set_master_attributes() RPC call */
- RM_FUNC_SET_MASTER_SID = 11, /*!< Index for rm_set_master_sid() RPC call */
- RM_FUNC_SET_PERIPHERAL_PERMISSIONS = 12, /*!< Index for rm_set_peripheral_permissions() RPC call */
- RM_FUNC_IS_RESOURCE_OWNED = 13, /*!< Index for rm_is_resource_owned() RPC call */
- RM_FUNC_IS_RESOURCE_MASTER = 14, /*!< Index for rm_is_resource_master() RPC call */
- RM_FUNC_IS_RESOURCE_PERIPHERAL = 15, /*!< Index for rm_is_resource_peripheral() RPC call */
- RM_FUNC_GET_RESOURCE_INFO = 16, /*!< Index for rm_get_resource_info() RPC call */
- RM_FUNC_MEMREG_ALLOC = 17, /*!< Index for rm_memreg_alloc() RPC call */
- RM_FUNC_MEMREG_FREE = 18, /*!< Index for rm_memreg_free() RPC call */
- RM_FUNC_ASSIGN_MEMREG = 19, /*!< Index for rm_assign_memreg() RPC call */
- RM_FUNC_SET_MEMREG_PERMISSIONS = 20, /*!< Index for rm_set_memreg_permissions() RPC call */
- RM_FUNC_IS_MEMREG_OWNED = 21, /*!< Index for rm_is_memreg_owned() RPC call */
- RM_FUNC_GET_MEMREG_INFO = 22, /*!< Index for rm_get_memreg_info() RPC call */
- RM_FUNC_ASSIGN_PAD = 23, /*!< Index for rm_assign_pad() RPC call */
- RM_FUNC_SET_PAD_MOVABLE = 24, /*!< Index for rm_set_pad_movable() RPC call */
- RM_FUNC_IS_PAD_OWNED = 25, /*!< Index for rm_is_pad_owned() RPC call */
+typedef enum rm_func_e {
+ RM_FUNC_UNKNOWN = 0, /* Unknown function */
+ RM_FUNC_PARTITION_ALLOC = 1, /* Index for rm_partition_alloc() RPC call */
+ RM_FUNC_PARTITION_FREE = 2, /* Index for rm_partition_free() RPC call */
+ RM_FUNC_GET_DID = 26, /* Index for rm_get_did() RPC call */
+ RM_FUNC_PARTITION_STATIC = 3, /* Index for rm_partition_static() RPC call */
+ RM_FUNC_PARTITION_LOCK = 4, /* Index for rm_partition_lock() RPC call */
+ RM_FUNC_GET_PARTITION = 5, /* Index for rm_get_partition() RPC call */
+ RM_FUNC_SET_PARENT = 6, /* Index for rm_set_parent() RPC call */
+ RM_FUNC_MOVE_ALL = 7, /* Index for rm_move_all() RPC call */
+ RM_FUNC_ASSIGN_RESOURCE = 8, /* Index for rm_assign_resource() RPC call */
+ RM_FUNC_SET_RESOURCE_MOVABLE = 9, /* Index for rm_set_resource_movable() RPC call */
+ RM_FUNC_SET_SUBSYS_RSRC_MOVABLE = 28, /* Index for rm_set_subsys_rsrc_movable() RPC call */
+ RM_FUNC_SET_MASTER_ATTRIBUTES = 10, /* Index for rm_set_master_attributes() RPC call */
+ RM_FUNC_SET_MASTER_SID = 11, /* Index for rm_set_master_sid() RPC call */
+ RM_FUNC_SET_PERIPHERAL_PERMISSIONS = 12, /* Index for rm_set_peripheral_permissions() RPC call */
+ RM_FUNC_IS_RESOURCE_OWNED = 13, /* Index for rm_is_resource_owned() RPC call */
+ RM_FUNC_IS_RESOURCE_MASTER = 14, /* Index for rm_is_resource_master() RPC call */
+ RM_FUNC_IS_RESOURCE_PERIPHERAL = 15, /* Index for rm_is_resource_peripheral() RPC call */
+ RM_FUNC_GET_RESOURCE_INFO = 16, /* Index for rm_get_resource_info() RPC call */
+ RM_FUNC_MEMREG_ALLOC = 17, /* Index for rm_memreg_alloc() RPC call */
+ RM_FUNC_MEMREG_SPLIT = 29, /* Index for rm_memreg_split() RPC call */
+ RM_FUNC_MEMREG_FREE = 18, /* Index for rm_memreg_free() RPC call */
+ RM_FUNC_FIND_MEMREG = 30, /* Index for rm_find_memreg() RPC call */
+ RM_FUNC_ASSIGN_MEMREG = 19, /* Index for rm_assign_memreg() RPC call */
+ RM_FUNC_SET_MEMREG_PERMISSIONS = 20, /* Index for rm_set_memreg_permissions() RPC call */
+ RM_FUNC_IS_MEMREG_OWNED = 21, /* Index for rm_is_memreg_owned() RPC call */
+ RM_FUNC_GET_MEMREG_INFO = 22, /* Index for rm_get_memreg_info() RPC call */
+ RM_FUNC_ASSIGN_PAD = 23, /* Index for rm_assign_pad() RPC call */
+ RM_FUNC_SET_PAD_MOVABLE = 24, /* Index for rm_set_pad_movable() RPC call */
+ RM_FUNC_IS_PAD_OWNED = 25, /* Index for rm_is_pad_owned() RPC call */
+ RM_FUNC_DUMP = 27, /* Index for rm_dump() RPC call */
} rm_func_t;
/* Functions */
@@ -76,4 +79,3 @@ void rm_xlate(sc_ipc_t ipc, sc_rpc_msg_t *msg);
#endif /* _SC_RM_RPC_H */
/**@}*/
-