Revert "rptun/rptun_ivshmem:add restart cmd to reboot slave"

This reverts commit 4fa1c460d3.
to reducing the complexity of rptun driver.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2024-12-18 01:09:41 +08:00 committed by GUIDINGLI
parent 109a3a090c
commit d7f3e41b13
2 changed files with 0 additions and 39 deletions

View file

@ -31,7 +31,6 @@
#include <stdio.h>
#include <nuttx/nuttx.h>
#include <nuttx/board.h>
#include <nuttx/drivers/addrenv.h>
#include <nuttx/pci/pci_ivshmem.h>
#include <nuttx/rptun/rptun.h>
@ -289,38 +288,6 @@ static int rptun_ivshmem_register_callback(FAR struct rptun_dev_s *dev,
return 0;
}
/****************************************************************************
* Name: rptun_ivshmem_check_cmd
****************************************************************************/
static void rptun_ivshmem_check_cmd(FAR struct rptun_ivshmem_dev_s *priv)
{
FAR struct rptun_cmd_s *rptun_cmd = RPTUN_RSC2CMD(&priv->shmem->rsc);
uint32_t cmd;
if (priv->master)
{
cmd = RPTUN_GET_CMD(rptun_cmd->cmd_slave);
rptun_cmd->cmd_slave = RPTUN_CMD(RPTUN_CMD_DEFAULT, 0);
}
else
{
cmd = RPTUN_GET_CMD(rptun_cmd->cmd_master);
rptun_cmd->cmd_master = RPTUN_CMD(RPTUN_CMD_DEFAULT, 0);
}
switch (cmd)
{
case RPTUN_CMD_RESTART:
#ifdef CONFIG_BOARDCTL_RESET
board_reset(0);
#endif
break;
default:
break;
}
}
/****************************************************************************
* Name: rptun_ivshmem_interrupt
****************************************************************************/
@ -329,8 +296,6 @@ static int rptun_ivshmem_interrupt(int irq, FAR void *context, FAR void *arg)
{
FAR struct rptun_ivshmem_dev_s *priv = arg;
rptun_ivshmem_check_cmd(priv);
if (priv->callback != NULL)
{
priv->callback(priv->arg, RPTUN_NOTIFY_ALL);
@ -349,8 +314,6 @@ static void rptun_ivshmem_wdog(wdparm_t arg)
(FAR struct rptun_ivshmem_dev_s *)arg;
bool should_notify = false;
rptun_ivshmem_check_cmd(priv);
if (priv->master && priv->seq != priv->shmem->seqs)
{
priv->seq = priv->shmem->seqs;

View file

@ -50,11 +50,9 @@
#define RPTUN_NOTIFY_ALL (UINT32_MAX - 0)
#define RPTUN_CMD_DEFAULT 0x0
#define RPTUN_CMD_PANIC 0x1
#define RPTUN_CMD_STOP 0x2
#define RPTUN_CMD_READY 0x3
#define RPTUN_CMD_RESTART 0x4
#define RPTUN_CMD_MASK 0xffff
#define RPTUN_CMD_SHIFT 16