diff --git a/apps/examples/load_fw/zynqmp_apu_lcm_rproc_example.c b/apps/examples/load_fw/zynqmp_apu_lcm_rproc_example.c index 2d72abc97..268365074 100644 --- a/apps/examples/load_fw/zynqmp_apu_lcm_rproc_example.c +++ b/apps/examples/load_fw/zynqmp_apu_lcm_rproc_example.c @@ -19,6 +19,7 @@ static struct remoteproc *apu_rproc_init(struct remoteproc *rproc, return NULL; } + (void)ops; LPRINTF("%s: node id: %d\n\r", __func__, cpu_id); priv = metal_allocate_memory(sizeof(*priv)); if (!priv) @@ -26,7 +27,6 @@ static struct remoteproc *apu_rproc_init(struct remoteproc *rproc, memset(priv, 0, sizeof(*priv)); priv->rproc = rproc; priv->cpu_id = cpu_id; - priv->rproc->ops = ops; priv->rproc->priv = priv; rproc->state = RPROC_READY; return priv->rproc; diff --git a/apps/examples/load_fw/zynqmp_r5_lcm_rproc_example.c b/apps/examples/load_fw/zynqmp_r5_lcm_rproc_example.c index 63b29bd5c..561a8d9dc 100644 --- a/apps/examples/load_fw/zynqmp_r5_lcm_rproc_example.c +++ b/apps/examples/load_fw/zynqmp_r5_lcm_rproc_example.c @@ -107,6 +107,7 @@ struct remoteproc *r5_rproc_init(struct remoteproc *rproc, return NULL; } + (void)ops; xil_printf("rproc init: node id: %d\r\n", cpu_id); priv = metal_allocate_memory(sizeof(*priv)); if (!priv) @@ -114,7 +115,6 @@ struct remoteproc *r5_rproc_init(struct remoteproc *rproc, memset(priv, 0, sizeof(*priv)); priv->rproc = rproc; priv->cpu_id = cpu_id; - priv->rproc->ops = ops; priv->rproc->priv = priv; priv->rpu_base = RPU_BASE_ADDR; metal_io_init(&priv->rpu_io, (void *)RPU_BASE_ADDR, &priv->rpu_base, diff --git a/apps/examples/load_fw/zynqmp_rpu_lcm_rproc_example.c b/apps/examples/load_fw/zynqmp_rpu_lcm_rproc_example.c index b590a210b..89dadef5f 100644 --- a/apps/examples/load_fw/zynqmp_rpu_lcm_rproc_example.c +++ b/apps/examples/load_fw/zynqmp_rpu_lcm_rproc_example.c @@ -17,6 +17,7 @@ static struct remoteproc *rpu_rproc_init(struct remoteproc *rproc, return NULL; } + (void)ops; LPRINTF("%s: node id: %d\n\r", __func__, cpu_id); priv = metal_allocate_memory(sizeof(*priv)); if (!priv) @@ -24,7 +25,6 @@ static struct remoteproc *rpu_rproc_init(struct remoteproc *rproc, memset(priv, 0, sizeof(*priv)); priv->rproc = rproc; priv->cpu_id = cpu_id; - priv->rproc->ops = ops; priv->rproc->priv = priv; rproc->state = RPROC_READY; return priv->rproc; diff --git a/apps/machine/microblaze_generic/zynqmp_mb_a53_rproc.c b/apps/machine/microblaze_generic/zynqmp_mb_a53_rproc.c index 123a8fdb1..c6c6591ad 100644 --- a/apps/machine/microblaze_generic/zynqmp_mb_a53_rproc.c +++ b/apps/machine/microblaze_generic/zynqmp_mb_a53_rproc.c @@ -28,19 +28,6 @@ #include #include "platform_info.h" -static struct remoteproc * -zynqmp_mb_a53_proc_init(struct remoteproc *rproc, - const struct remoteproc_ops *ops, void *arg) -{ - struct remoteproc_priv *prproc = arg; - - if (!rproc || !prproc || !ops) - return NULL; - rproc->priv = prproc; - rproc->ops = ops; - return rproc; -} - static inline void zynqmp_mb_a53_proc_remove(struct remoteproc *rproc) { (void)rproc; @@ -108,7 +95,7 @@ static int zynqmp_mb_a53_proc_notify(struct remoteproc *rproc, uint32_t id) * notification operation and remote processor management operations. */ const struct remoteproc_ops zynqmp_mb_a53_proc_ops = { - .init = zynqmp_mb_a53_proc_init, + .init = NULL, .remove = zynqmp_mb_a53_proc_remove, .mmap = zynqmp_mb_a53_proc_mmap, .notify = zynqmp_mb_a53_proc_notify, diff --git a/apps/machine/zynq7/zynq_a9_rproc.c b/apps/machine/zynq7/zynq_a9_rproc.c index 4ba60961a..92a89f2ed 100644 --- a/apps/machine/zynq7/zynq_a9_rproc.c +++ b/apps/machine/zynq7/zynq_a9_rproc.c @@ -52,7 +52,8 @@ zynq_a9_proc_init(struct remoteproc *rproc, unsigned int irq_vect; int ret; - if (!rproc || !prproc || !ops) + (void)ops; + if (!rproc || !prproc) return NULL; ret = metal_device_open(prproc->gic_bus_name, prproc->gic_name, &dev); @@ -60,12 +61,10 @@ zynq_a9_proc_init(struct remoteproc *rproc, xil_printf("failed to open GIC device: %d.\r\n", ret); return NULL; } - rproc->priv = prproc; prproc->gic_dev = dev; prproc->gic_io = metal_device_io_region(dev, 0); if (!prproc->gic_io) goto err1; - rproc->ops = ops; atomic_flag_test_and_set(&prproc->nokick); /* Register interrupt handler and enable interrupt */ diff --git a/apps/machine/zynqmp/zynqmp_linux_r5_proc.c b/apps/machine/zynqmp/zynqmp_linux_r5_proc.c index 6ed2fdaa4..df54e8703 100644 --- a/apps/machine/zynqmp/zynqmp_linux_r5_proc.c +++ b/apps/machine/zynqmp/zynqmp_linux_r5_proc.c @@ -74,10 +74,9 @@ zynqmp_linux_r5_proc_init(struct remoteproc *rproc, metal_phys_addr_t mem_pa; int ret; - if (!rproc || !prproc || !ops) + (void)ops; + if (!rproc || !prproc) return NULL; - rproc->priv = prproc; - rproc->ops = ops; prproc->ipi_dev = NULL; prproc->shm_dev = NULL; /* Get shared memory device */ diff --git a/apps/machine/zynqmp_r5/zynqmp_r5_a53_rproc.c b/apps/machine/zynqmp_r5/zynqmp_r5_a53_rproc.c index 27e7cd6cb..c6bc6df23 100644 --- a/apps/machine/zynqmp_r5/zynqmp_r5_a53_rproc.c +++ b/apps/machine/zynqmp_r5/zynqmp_r5_a53_rproc.c @@ -65,7 +65,8 @@ zynqmp_r5_a53_proc_init(struct remoteproc *rproc, unsigned int irq_vect; int ret; - if (!rproc || !prproc || !ops) + (void)ops; + if (!rproc || !prproc) return NULL; ret = metal_device_open(prproc->kick_dev_bus_name, prproc->kick_dev_name, @@ -74,7 +75,6 @@ zynqmp_r5_a53_proc_init(struct remoteproc *rproc, xil_printf("failed to open polling device: %d.\r\n", ret); return NULL; } - rproc->priv = prproc; prproc->kick_dev = kick_dev; prproc->kick_io = metal_device_io_region(kick_dev, 0); if (!prproc->kick_io) @@ -91,7 +91,6 @@ zynqmp_r5_a53_proc_init(struct remoteproc *rproc, (void)irq_vect; metal_io_write32(prproc->kick_io, 0, !POLL_STOP); #endif /* !RPMSG_NO_IPI */ - rproc->ops = ops; return rproc; err1: diff --git a/apps/system/linux/machine/generic/platform_info.c b/apps/system/linux/machine/generic/platform_info.c index c35bc5b40..5f7c8d1de 100644 --- a/apps/system/linux/machine/generic/platform_info.c +++ b/apps/system/linux/machine/generic/platform_info.c @@ -247,9 +247,10 @@ linux_proc_init(struct remoteproc *rproc, struct vring_ipi_info *ipi; int ret; + (void)ops; if (!rproc || !prproc) return NULL; - rproc->priv = prproc; + /* Create shared memory io */ ret = metal_shmem_open(prproc->shm_file, prproc->shm_size, &io); if (ret) { @@ -281,7 +282,6 @@ linux_proc_init(struct remoteproc *rproc, } metal_irq_register(ipi->fd, linux_proc_irq_handler, ipi); metal_irq_enable(ipi->fd); - rproc->ops = ops; return rproc; err: