zynq a9 remoteproc: implement _initialize()
authorWendy Liang <jliang@xilinx.com>
Wed, 29 Jun 2016 17:09:20 +0000 (10:09 -0700)
committerWendy 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>
lib/remoteproc/drivers/zynq_remoteproc_a9.c

index 20e21b1d8e8d735bf2816031b6dcd0918d1456b0..892d5ba99a870af6e16ff4ae1b1a2444dff2ce7b 100644 (file)
@@ -82,13 +82,15 @@ static int _enable_interrupt(struct proc_vring *vring_hw);
 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);
 
 /*--------------------------- Globals ---------------------------------- */
-struct hil_platform_ops proc_ops = {
+struct hil_platform_ops zynq_a9_proc_ops = {
        .enable_interrupt = _enable_interrupt,
        .notify           = _notify,
        .boot_cpu         = _boot_cpu,
        .shutdown_cpu     = _shutdown_cpu,
+       .initialize = _initialize,
 };
 
 static int _enable_interrupt(struct proc_vring *vring_hw)
@@ -173,4 +175,11 @@ static void _shutdown_cpu(int cpu_id)
        lock_slcr();
 }
 
-
+static int _initialize(void *pdata,
+                             struct hil_proc *proc,
+                             int cpu_id)
+{
+       (void) cpu_id;
+       memcpy(proc, pdata, sizeof(struct hil_proc));
+       return 0;
+}