rptun ioctl: Strip rpmsg ioctl and rptun ioctl.

rptun ioctl only handle RPTUNIOC_START, RPTUNIOC_STOP, RPTUNIOC_RESET,
rpmsg ioctl handles the public ioctl commands part.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
This commit is contained in:
wangyongrong
2024-01-11 15:23:19 +08:00
committed by Xiang Xiao
parent 6d27c12c57
commit 10a8c2be92
5 changed files with 111 additions and 75 deletions
+1 -1
View File
@@ -81,7 +81,7 @@
#define _FBIOCBASE (0x2800) /* Frame buffer character driver ioctl commands */
#define _NXTERMBASE (0x2900) /* NxTerm character driver ioctl commands */
#define _RFIOCBASE (0x2a00) /* RF devices ioctl commands */
#define _RPMSGBASE (0x2b00) /* Remote processor tunnel ioctl commands */
#define _RPMSGBASE (0x2b00) /* Remote processor message ioctl commands */
#define _NOTECTLBASE (0x2c00) /* Note filter control ioctl commands*/
#define _NOTERAMBASE (0x2d00) /* Noteram device ioctl commands*/
#define _RCIOCBASE (0x2e00) /* Remote Control device ioctl commands */
+11 -6
View File
@@ -37,12 +37,12 @@
* Pre-processor Definitions
****************************************************************************/
#define RPMSGIOC_START _RPMSGIOC(1)
#define RPMSGIOC_STOP _RPMSGIOC(2)
#define RPMSGIOC_RESET _RPMSGIOC(3)
#define RPMSGIOC_PANIC _RPMSGIOC(4)
#define RPMSGIOC_DUMP _RPMSGIOC(5)
#define RPMSGIOC_PING _RPMSGIOC(6)
#define RPMSGIOC_PANIC _RPMSGIOC(1)
#define RPMSGIOC_DUMP _RPMSGIOC(2)
#define RPMSGIOC_PING _RPMSGIOC(3)
#define RPMSGIOC_START _RPMSGIOC(4)
#define RPMSGIOC_STOP _RPMSGIOC(5)
#define RPMSGIOC_RESET _RPMSGIOC(6)
/****************************************************************************
* Public Types
@@ -74,6 +74,8 @@ struct rpmsg_ops_s
CODE int (*wait)(FAR struct rpmsg_s *rpmsg, FAR sem_t *sem);
CODE int (*post)(FAR struct rpmsg_s *rpmsg, FAR sem_t *sem);
CODE int (*ioctl)(FAR struct rpmsg_s *rpmsg, int cmd, unsigned long arg);
CODE void (*panic)(FAR struct rpmsg_s *rpmsg);
CODE void (*dump)(FAR struct rpmsg_s *rpmsg);
CODE FAR const char *(*get_cpuname)(FAR struct rpmsg_s *rpmsg);
CODE int (*get_tx_buffer_size)(FAR struct rpmsg_s *rpmsg);
CODE int (*get_rx_buffer_size)(FAR struct rpmsg_s *rpmsg);
@@ -129,6 +131,9 @@ int rpmsg_register(FAR const char *path, FAR struct rpmsg_s *rpmsg,
void rpmsg_unregister(FAR const char *path, FAR struct rpmsg_s *rpmsg);
int rpmsg_ioctl(FAR const char *cpuname, int cmd, unsigned long arg);
int rpmsg_panic(FAR const char *cpuname);
void rpmsg_dump_all(void);
#ifdef __cplusplus
}
#endif
+7
View File
@@ -37,6 +37,13 @@
* Pre-processor Definitions
****************************************************************************/
#define _RPTUNIOCVALID(c) _RPMSGIOCVALID(c)
#define _RPTUNIOC(nr) _RPMSGIOC(nr)
#define RPTUNIOC_START _RPTUNIOC(100)
#define RPTUNIOC_STOP _RPTUNIOC(101)
#define RPTUNIOC_RESET _RPTUNIOC(102)
#define RPTUN_NOTIFY_ALL (UINT32_MAX - 0)
/* Access macros ************************************************************/