summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6825ee5)
raw | patch | inline | side by side (parent: 6825ee5)
author | Wendy Liang <jliang@xilinx.com> | |
Wed, 29 Jun 2016 20:20:13 +0000 (13:20 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Thu, 13 Oct 2016 05:01:44 +0000 (22:01 -0700) |
Setting data function is defined in the remoteproc driver.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
apps/machine/zynq7/platform_info.c | patch | blob | history | |
apps/machine/zynq7/platform_info_remoteproc_master.c | patch | blob | history |
index 9e32a125e23e1b7e87f03fa792a46d699f5f4806..6de513a84e191a005ef2cf5a58aaa2c0483d7da1 100644 (file)
/* Reference implementation that show cases platform_get_cpu_info and
platform_get_for_firmware API implementation for Bare metal environment */
-extern struct hil_platform_ops proc_ops;
+extern struct hil_platform_ops zynq_a9_proc_ops;
/* IPC Device parameters */
#define SHM_ADDR (void *)0x08008000
},
/* HIL platform ops table. */
- &proc_ops,
+ &zynq_a9_proc_ops,
/* Next three fields are for future use only */
0,
NULL,
{NULL, NULL}
},
-
- /* CPU node for remote context */
- {
- /* CPU ID of remote */
- REMOTE_CPU_ID,
-
- /* Shared memory info - Last field is not used currently */
- {
- SHM_ADDR, SHM_SIZE, 0x00},
-
- /* VirtIO device info */
- {
- 0, 0, 0,
- {
- {
- /* Provide vring interrupts info here. Other fields are obtained
- * from the rsc table so leave them empty.
- */
- NULL, NULL, 0, 0,
- {
- VRING0_IPI_VECT, 0x1006, 1}
- },
- {
- NULL, NULL, 0, 0,
- {
- VRING1_IPI_VECT, 0x1006, 1}
- }
- }
- },
-
- /* Number of RPMSG channels */
- 1,
-
- /* RPMSG channel info - Only channel name is expected currently */
- {
- {"rpmsg-openamp-demo-channel"}
- },
-
- /* HIL platform ops table. */
- &proc_ops,
-
- /* Next three fields are for future use only */
- 0,
- 0,
- NULL,
- {NULL, NULL}
- }
};
-/**
- * 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)
-{
- int idx;
- for (idx = 0; idx < sizeof(proc_table) / sizeof(struct hil_proc); idx++) {
- if ((cpu_id == HIL_RSVD_CPU_ID)
- || (proc_table[idx].cpu_id == cpu_id)) {
- memcpy(proc, &proc_table[idx],
- sizeof(struct hil_proc));
- return 0;
- }
- }
- return -1;
-}
-
int platform_get_processor_for_fw(char *fw_name)
{
diff --git a/apps/machine/zynq7/platform_info_remoteproc_master.c b/apps/machine/zynq7/platform_info_remoteproc_master.c
index 0002b4d7436adcbbbf7128b726e438c48f0f75f1..adf4dd50027ced870a1e08c8d4c4a83cd5f745a2 100644 (file)
/* Reference implementation that show cases platform_get_cpu_info and
platform_get_for_firmware API implementation for Bare metal environment */
-extern struct hil_platform_ops proc_ops;
+extern struct hil_platform_ops zynq_a9_proc_ops;
/* IPC Device parameters */
#define SHM_ADDR (void *)0x08008000
*/
struct hil_proc proc_table []=
{
-
- /* CPU node for remote context */
- {
- /* CPU ID of master */
- MASTER_CPU_ID,
-
- /* Shared memory info - Last field is not used currently */
- {
- SHM_ADDR, SHM_SIZE, 0x00
- },
-
- /* VirtIO device info */
- {
- /* Leave these three fields empty as these are obtained from rsc
- * table.
- */
- 0, 0, 0,
-
- /* Vring info */
- {
-
- {
- /* Provide only vring interrupts info here. Other fields are
- * obtained from the resource table so leave them empty.
- */
- NULL, NULL, 0, 0,
- {
- VRING0_IPI_VECT,0x1006,1,NULL
- }
- },
- {
- NULL, NULL, 0, 0,
- {
- VRING1_IPI_VECT,0x1006,1,NULL
- }
- }
- }
- },
-
- /* Number of RPMSG channels */
- 1,
-
- /* RPMSG channel info - Only channel name is expected currently */
- {
- {"rpmsg-openamp-demo-channel"}
- },
-
- /* HIL platform ops table. */
- &proc_ops,
-
- /* Next three fields are for future use only */
- 0,
- 0,
- NULL
- },
-
- /* CPU node for remote context */
{
/* CPU ID of remote */
REMOTE_CPU_ID,
},
/* HIL platform ops table. */
- &proc_ops,
+ &zynq_a9_proc_ops,
/* Next three fields are for future use only */
0,
}
};
-/**
- * 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) {
- int idx;
- for(idx = 0; idx < sizeof(proc_table)/sizeof(struct hil_proc); idx++) {
- if((cpu_id == HIL_RSVD_CPU_ID) || (proc_table[idx].cpu_id == cpu_id) ) {
- memcpy(proc, &proc_table[idx], sizeof(struct hil_proc));
- return 0;
- }
- }
- return -1;
-}
-
int platform_get_processor_for_fw(char *fw_name) {
return 1;