summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6395579)
raw | patch | inline | side by side (parent: 6395579)
author | Wendy Liang <jliang@xilinx.com> | |
Wed, 29 Jun 2016 06:08:10 +0000 (23:08 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Thu, 13 Oct 2016 05:01:43 +0000 (22:01 -0700) |
Add _initialize() implementation to have remoteproc
driver specific initialization.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
driver specific initialization.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/remoteproc/drivers/zynqmp_remoteproc_a53.c | patch | blob | history |
diff --git a/lib/remoteproc/drivers/zynqmp_remoteproc_a53.c b/lib/remoteproc/drivers/zynqmp_remoteproc_a53.c
index 40d69cf98cdc90a4a789131b6dc3d8bed1abb062..9fe9f0e271aaf9d013ee3fe11bc40ffe826b4d26 100644 (file)
static void _notify(int cpu_id, struct proc_intr *intr_info);
static int _boot_cpu(int cpu_id, unsigned int load_addr);
static void _shutdown_cpu(int cpu_id);
+static int _initialize(void *pdata, struct hil_proc *proc, int cpu_id);
static void _ipi_handler(int vect_id, void *data);
static void _ipi_handler_deinit(int vect_id, void *data);
/*--------------------------- Globals ---------------------------------- */
-struct hil_platform_ops proc_ops = {
+struct hil_platform_ops zynqmp_r5_a53_proc_ops = {
.enable_interrupt = _enable_interrupt,
.reg_ipi_after_deinit = _reg_ipi_after_deinit,
.notify = _notify,
.boot_cpu = _boot_cpu,
.shutdown_cpu = _shutdown_cpu,
+ .initialize = _initialize,
};
/* Extern functions defined out from OpenAMP lib */
return;
}
-/**
- * platform_get_processor_info
- *
- * Copies the target info from the user defined data structures to
- * HIL proc data structure.In case of remote contexts this function
- * is called with the reserved CPU ID HIL_RSVD_CPU_ID, because for
- * remotes there is only one master.
- *
- * @param proc - HIL proc to populate
- * @param cpu_id - CPU ID
- *
- * return - status of execution
- */
-int platform_get_processor_info(struct hil_proc *proc , int cpu_id)
+static int _initialize(void *pdata,
+ struct hil_proc *proc,
+ int cpu_id)
{
- int idx;
- unsigned int u_cpu_id = cpu_id;
-
- for(idx = 0; idx < proc_table_size; idx++) {
- if ((u_cpu_id == HIL_RSVD_CPU_ID) || (proc_table[idx].cpu_id == u_cpu_id)) {
- memcpy(proc, &proc_table[idx],
- sizeof(struct hil_proc));
- return 0;
- }
- }
- return -1;
+ (void) cpu_id;
+ memcpy(proc, pdata, sizeof(struct hil_proc));
+ return 0;
}
int platform_get_processor_for_fw(char *fw_name)