Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rptun/rpmsg_virtio: remove cmd initialize #138

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions arch/sim/src/sim/sim_rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ sim_rpmsg_virtio_get_resource(struct rpmsg_virtio_s *dev)
struct sim_rpmsg_virtio_dev_s *priv =
container_of(dev, struct sim_rpmsg_virtio_dev_s, dev);
struct rpmsg_virtio_rsc_s *rsc;
struct rpmsg_virtio_cmd_s *cmd;

priv->shmem = host_allocshmem(priv->shmemname, sizeof(*priv->shmem));
if (!priv->shmem)
Expand All @@ -97,7 +96,6 @@ sim_rpmsg_virtio_get_resource(struct rpmsg_virtio_s *dev)
}

rsc = &priv->shmem->rsc;
cmd = RPMSG_VIRTIO_RSC2CMD(rsc);

if (priv->master)
{
Expand All @@ -115,7 +113,6 @@ sim_rpmsg_virtio_get_resource(struct rpmsg_virtio_s *dev)
rsc->rpmsg_vring1.num = 8;
rsc->config.r2h_buf_size = 2048;
rsc->config.h2r_buf_size = 2048;
cmd->cmd_slave = 0;

priv->shmem->base = (uintptr_t)priv->shmem;
}
Expand All @@ -128,7 +125,6 @@ sim_rpmsg_virtio_get_resource(struct rpmsg_virtio_s *dev)
usleep(1000);
}

cmd->cmd_master = 0;
priv->addrenv[0].va = (uintptr_t)priv->shmem;
priv->addrenv[0].pa = priv->shmem->base;
priv->addrenv[0].size = sizeof(*priv->shmem);
Expand Down
6 changes: 0 additions & 6 deletions arch/sim/src/sim/sim_rptun.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ sim_rptun_get_resource(struct rptun_dev_s *dev)
{
struct sim_rptun_dev_s *priv = container_of(dev,
struct sim_rptun_dev_s, rptun);
struct rptun_cmd_s *cmd;

priv->shmem = host_allocshmem(priv->shmemname,
sizeof(*priv->shmem));
Expand All @@ -111,8 +110,6 @@ sim_rptun_get_resource(struct rptun_dev_s *dev)
return NULL;
}

cmd = RPTUN_RSC2CMD(&priv->shmem->rsc);

priv->raddrenv[0].da = 0;
priv->raddrenv[0].size = sizeof(*priv->shmem);

Expand Down Expand Up @@ -147,7 +144,6 @@ sim_rptun_get_resource(struct rptun_dev_s *dev)
rsc->config.r2h_buf_size = 0x800;
rsc->config.h2r_buf_size = 0x800;

cmd->cmd_slave = 0;
priv->shmem->base = (uintptr_t)priv->shmem;

/* The master notifies its slave when it starts again */
Expand Down Expand Up @@ -177,8 +173,6 @@ sim_rptun_get_resource(struct rptun_dev_s *dev)
usleep(1000);
}

cmd->cmd_master = 0;

priv->raddrenv[0].pa = (uintptr_t)priv->shmem->base;

priv->shmem->boots = SIM_RPTUN_STATUS_OK;
Expand Down
1 change: 0 additions & 1 deletion drivers/rpmsg/rpmsg_virtio_ivshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ rpmsg_virtio_ivshmem_get_resource(FAR struct rpmsg_virtio_s *dev)
usleep(1000);
}

cmd->cmd_master = 0;
priv->addrenv[0].va = (uint64_t)(uintptr_t)priv->shmem;
priv->addrenv[0].pa = priv->shmem->basem;
priv->addrenv[0].size = priv->shmem_size;
Expand Down
1 change: 0 additions & 1 deletion drivers/rptun/rptun_ivshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ rptun_ivshmem_get_resource(FAR struct rptun_dev_s *dev)
rsc->config.h2r_buf_size = CONFIG_RPTUN_IVSHMEM_BUFFSIZE;

priv->shmem->rsc_size = sizeof(struct rptun_rsc_s);
cmd->cmd_master = 0;
cmd->cmd_slave = RPTUN_CMD(RPTUN_CMD_READY, 0);

/* Wait untils master is ready, salve need use master base to
Expand Down
Loading