You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/01/15 07:06:56 UTC

(nuttx) branch master updated (f280c33311 -> df147406db)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from f280c33311 sched/logging: add task activation/exit logs
     new 11cefd087a rptun ping: decoupling rptun ping and rptun virtio device
     new df147406db rptun_ping: decoupling rptun ping and rptun. ping is not only rptun support, so move it to public part.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 drivers/rptun/Kconfig                               | 14 +++++++-------
 drivers/rptun/rptun.c                               |  2 +-
 drivers/rptun/rptun.h                               |  8 ++------
 drivers/rptun/rptun_ping.c                          |  7 +++----
 drivers/rptun/{rptun.h => rptun_ping.h}             | 18 +++++++++---------
 include/nuttx/rptun/rptun.h                         | 11 +----------
 .../nuttx/rptun/rptun_ping.h                        | 21 +++++++++++++++------
 7 files changed, 38 insertions(+), 43 deletions(-)
 copy drivers/rptun/{rptun.h => rptun_ping.h} (81%)
 copy boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278adk80d.h => include/nuttx/rptun/rptun_ping.h (79%)


(nuttx) 02/02: rptun_ping: decoupling rptun ping and rptun. ping is not only rptun support, so move it to public part.

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit df147406db4011267c57d86f029bcfa89fdd369d
Author: wangyongrong <wa...@xiaomi.com>
AuthorDate: Thu Nov 30 18:21:21 2023 +0800

    rptun_ping: decoupling rptun ping and rptun.
    ping is not only rptun support, so move it to public part.
    
    Signed-off-by: wangyongrong <wa...@xiaomi.com>
---
 drivers/rptun/Kconfig                              | 14 +++++------
 drivers/rptun/rptun.h                              |  8 ++----
 drivers/rptun/rptun_ping.c                         |  3 +--
 drivers/rptun/{rptun.h => rptun_ping.h}            | 16 ++++++------
 include/nuttx/rptun/rptun.h                        | 11 +-------
 .../rptun.h => include/nuttx/rptun/rptun_ping.h    | 29 ++++++++++++----------
 6 files changed, 35 insertions(+), 46 deletions(-)

diff --git a/drivers/rptun/Kconfig b/drivers/rptun/Kconfig
index 6124408762..10e4834389 100644
--- a/drivers/rptun/Kconfig
+++ b/drivers/rptun/Kconfig
@@ -10,6 +10,13 @@ menuconfig RPTUN
 	---help---
 		RPTUN driver is used for multi-cores' communication.
 
+config RPTUN_PING
+	bool "rptun ping support"
+	default n
+	---help---
+		This is for debugging & profiling, create ping rpmsg
+		channel, user can use it to get send/recv speed & latency.
+
 if RPTUN
 
 config RPTUN_PRIORITY
@@ -38,11 +45,4 @@ config RPTUN_PM
 		goto RAM-retention mode, can't access from another CPU.
 		So, we provide this method to resolve this.
 
-config RPTUN_PING
-	bool "rptun ping support"
-	default n
-	---help---
-		This is for rptun debugging & profiling, create ping RPMSG
-		channel, user can use it to get send/recv speed & latency.
-
 endif # RPTUN
diff --git a/drivers/rptun/rptun.h b/drivers/rptun/rptun.h
index e890a05679..b937fabb2c 100644
--- a/drivers/rptun/rptun.h
+++ b/drivers/rptun/rptun.h
@@ -28,6 +28,8 @@
 #include <nuttx/rptun/rptun.h>
 #include <openamp/open_amp.h>
 
+#include "rptun_ping.h"
+
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
@@ -35,10 +37,4 @@
 int rptun_buffer_nused(FAR struct rpmsg_virtio_device *rvdev, bool rx);
 void rptun_dump(FAR struct rpmsg_virtio_device *rvdev);
 
-int rptun_ping_init(FAR struct rpmsg_device *rvdev,
-                    FAR struct rpmsg_endpoint *ept);
-void rptun_ping_deinit(FAR struct rpmsg_endpoint *ept);
-int rptun_ping(FAR struct rpmsg_endpoint *ept,
-               FAR const struct rptun_ping_s *ping);
-
 #endif /* __DRIVERS_RPTUN_RPTUN_H */
diff --git a/drivers/rptun/rptun_ping.c b/drivers/rptun/rptun_ping.c
index 83bfcf4260..5534e2957f 100644
--- a/drivers/rptun/rptun_ping.c
+++ b/drivers/rptun/rptun_ping.c
@@ -31,8 +31,7 @@
 #include <time.h>
 #include <nuttx/signal.h>
 
-#include "rptun.h"
-
+#include "rptun_ping.h"
 /****************************************************************************
  * Pre-processor definitions
  ****************************************************************************/
diff --git a/drivers/rptun/rptun.h b/drivers/rptun/rptun_ping.h
similarity index 85%
copy from drivers/rptun/rptun.h
copy to drivers/rptun/rptun_ping.h
index e890a05679..9e17ee3dd3 100644
--- a/drivers/rptun/rptun.h
+++ b/drivers/rptun/rptun_ping.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- * drivers/rptun/rptun.h
+ * drivers/rptun/rptun_ping.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,27 +18,27 @@
  *
  ****************************************************************************/
 
-#ifndef __DRIVERS_RPTUN_RPTUN_H
-#define __DRIVERS_RPTUN_RPTUN_H
+#ifndef __DRIVERS_RPTUN_RPTUN_PING_H
+#define __DRIVERS_RPTUN_RPTUN_PING_H
 
 /****************************************************************************
  * Included Files
  ****************************************************************************/
 
-#include <nuttx/rptun/rptun.h>
+#include <nuttx/rptun/rptun_ping.h>
 #include <openamp/open_amp.h>
 
+#ifdef CONFIG_RPTUN_PING
+
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
 
-int rptun_buffer_nused(FAR struct rpmsg_virtio_device *rvdev, bool rx);
-void rptun_dump(FAR struct rpmsg_virtio_device *rvdev);
-
 int rptun_ping_init(FAR struct rpmsg_device *rvdev,
                     FAR struct rpmsg_endpoint *ept);
 void rptun_ping_deinit(FAR struct rpmsg_endpoint *ept);
 int rptun_ping(FAR struct rpmsg_endpoint *ept,
                FAR const struct rptun_ping_s *ping);
 
-#endif /* __DRIVERS_RPTUN_RPTUN_H */
+#endif /* CONFIG_RPTUN_PING */
+#endif /* __DRIVERS_RPTUN_RPTUN_PING_H */
diff --git a/include/nuttx/rptun/rptun.h b/include/nuttx/rptun/rptun.h
index 94050e550a..e887d9b2df 100644
--- a/include/nuttx/rptun/rptun.h
+++ b/include/nuttx/rptun/rptun.h
@@ -30,6 +30,7 @@
 #ifdef CONFIG_RPTUN
 
 #include <nuttx/fs/ioctl.h>
+#include <nuttx/rptun/rptun_ping.h>
 #include <openamp/open_amp.h>
 
 /****************************************************************************
@@ -342,16 +343,6 @@ struct rptun_dev_s
   FAR const struct rptun_ops_s *ops;
 };
 
-/* used for ioctl RPTUNIOC_PING */
-
-struct rptun_ping_s
-{
-  int  times;
-  int  len;
-  int  ack;
-  int  sleep; /* unit: ms */
-};
-
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
diff --git a/drivers/rptun/rptun.h b/include/nuttx/rptun/rptun_ping.h
similarity index 69%
copy from drivers/rptun/rptun.h
copy to include/nuttx/rptun/rptun_ping.h
index e890a05679..a47440bde3 100644
--- a/drivers/rptun/rptun.h
+++ b/include/nuttx/rptun/rptun_ping.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- * drivers/rptun/rptun.h
+ * include/nuttx/rptun/rptun_ping.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,27 +18,30 @@
  *
  ****************************************************************************/
 
-#ifndef __DRIVERS_RPTUN_RPTUN_H
-#define __DRIVERS_RPTUN_RPTUN_H
+#ifndef __INCLUDE_NUTTX_RPTUN_RPTUN_PING_H
+#define __INCLUDE_NUTTX_RPTUN_RPTUN_PING_H
 
 /****************************************************************************
  * Included Files
  ****************************************************************************/
 
-#include <nuttx/rptun/rptun.h>
-#include <openamp/open_amp.h>
+#include <nuttx/config.h>
+
+#ifdef CONFIG_RPTUN_PING
 
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
 
-int rptun_buffer_nused(FAR struct rpmsg_virtio_device *rvdev, bool rx);
-void rptun_dump(FAR struct rpmsg_virtio_device *rvdev);
+/* used for ioctl RPTUNIOC_PING */
 
-int rptun_ping_init(FAR struct rpmsg_device *rvdev,
-                    FAR struct rpmsg_endpoint *ept);
-void rptun_ping_deinit(FAR struct rpmsg_endpoint *ept);
-int rptun_ping(FAR struct rpmsg_endpoint *ept,
-               FAR const struct rptun_ping_s *ping);
+struct rptun_ping_s
+{
+  int  times;
+  int  len;
+  int  ack;
+  int  sleep; /* unit: ms */
+};
 
-#endif /* __DRIVERS_RPTUN_RPTUN_H */
+#endif /* CONFIG_RPTUN_PING */
+#endif /* __INCLUDE_NUTTX_RPTUN_RPTUN_PING_H */


(nuttx) 01/02: rptun ping: decoupling rptun ping and rptun virtio device

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 11cefd087abde4647a072f26b7c56a5795dbe876
Author: wangyongrong <wa...@xiaomi.com>
AuthorDate: Fri Nov 24 16:56:32 2023 +0800

    rptun ping: decoupling rptun ping and rptun virtio device
    
    Signed-off-by: wangyongrong <wa...@xiaomi.com>
---
 drivers/rptun/rptun.c      | 2 +-
 drivers/rptun/rptun.h      | 2 +-
 drivers/rptun/rptun_ping.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index f46cd962c1..2f3bf54b06 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -719,7 +719,7 @@ static int rptun_dev_start(FAR struct remoteproc *rproc)
   virtqueue_enable_cb(priv->rvdev.svq);
 
 #ifdef CONFIG_RPTUN_PING
-  rptun_ping_init(&priv->rvdev, &priv->ping);
+  rptun_ping_init(&priv->rvdev.rdev, &priv->ping);
 #endif
   return 0;
 }
diff --git a/drivers/rptun/rptun.h b/drivers/rptun/rptun.h
index 77038b6dfe..e890a05679 100644
--- a/drivers/rptun/rptun.h
+++ b/drivers/rptun/rptun.h
@@ -35,7 +35,7 @@
 int rptun_buffer_nused(FAR struct rpmsg_virtio_device *rvdev, bool rx);
 void rptun_dump(FAR struct rpmsg_virtio_device *rvdev);
 
-int rptun_ping_init(FAR struct rpmsg_virtio_device *rvdev,
+int rptun_ping_init(FAR struct rpmsg_device *rvdev,
                     FAR struct rpmsg_endpoint *ept);
 void rptun_ping_deinit(FAR struct rpmsg_endpoint *ept);
 int rptun_ping(FAR struct rpmsg_endpoint *ept,
diff --git a/drivers/rptun/rptun_ping.c b/drivers/rptun/rptun_ping.c
index 4c62712e94..83bfcf4260 100644
--- a/drivers/rptun/rptun_ping.c
+++ b/drivers/rptun/rptun_ping.c
@@ -226,10 +226,10 @@ int rptun_ping(FAR struct rpmsg_endpoint *ept,
   return 0;
 }
 
-int rptun_ping_init(FAR struct rpmsg_virtio_device *rvdev,
+int rptun_ping_init(FAR struct rpmsg_device *rdev,
                     FAR struct rpmsg_endpoint *ept)
 {
-  return rpmsg_create_ept(ept, &rvdev->rdev, RPTUN_PING_EPT_NAME,
+  return rpmsg_create_ept(ept, rdev, RPTUN_PING_EPT_NAME,
                           RPMSG_ADDR_ANY, RPMSG_ADDR_ANY,
                           rptun_ping_ept_cb, NULL);
 }