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/10/09 05:52:07 UTC
(nuttx) branch master updated (8efe6cb235 -> 42041a428c)
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 8efe6cb235 cmake:enhance compile options for custom toolchain,implement the REVERSE opt of `add_compile_options()`
new bc6cd326b8 pci test drv is pci rc drv not pci ep drv
new 1ce6ec7c65 declare pci_dev_register
new acbe19d744 pci_drivers: move qemu edu and test device header content to pci_drivers.h
new 4ebf830bbd userspace: Exclude nuttx/arch.h
new 42041a428c include/nuttx.h: add common align definitions for nuttx
The 5 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/pci/CMakeLists.txt | 8 ++---
drivers/pci/Kconfig | 10 +++----
drivers/pci/Make.defs | 9 +++---
drivers/pci/pci.c | 1 +
drivers/pci/pci_drivers.c | 2 --
drivers/pci/pci_drivers.h | 38 ++++++++++++++++++++++++
drivers/pci/pci_epf.c | 11 ++-----
drivers/pci/pci_qemu_edu.c | 3 +-
drivers/pci/pci_qemu_test.c | 3 +-
include/nuttx/pci/pci_qemu_edu.h | 62 ---------------------------------------
include/nuttx/pci/pci_qemu_test.h | 61 --------------------------------------
11 files changed, 59 insertions(+), 149 deletions(-)
delete mode 100644 include/nuttx/pci/pci_qemu_edu.h
delete mode 100644 include/nuttx/pci/pci_qemu_test.h
(nuttx) 03/05: pci_drivers: move qemu edu and test device header content to pci_drivers.h
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 acbe19d744ac1e8c2625c68abb788b29df958e1e
Author: Bowen Wang <wa...@xiaomi.com>
AuthorDate: Fri Mar 15 21:28:11 2024 +0800
pci_drivers: move qemu edu and test device header content to pci_drivers.h
Signed-off-by: Bowen Wang <wa...@xiaomi.com>
---
drivers/pci/pci_drivers.c | 2 --
drivers/pci/pci_drivers.h | 24 +++++++++++++++
drivers/pci/pci_qemu_edu.c | 3 +-
drivers/pci/pci_qemu_test.c | 3 +-
include/nuttx/pci/pci_qemu_edu.h | 62 ---------------------------------------
include/nuttx/pci/pci_qemu_test.h | 61 --------------------------------------
6 files changed, 28 insertions(+), 127 deletions(-)
diff --git a/drivers/pci/pci_drivers.c b/drivers/pci/pci_drivers.c
index 23cc7d8808..d16fa45b55 100644
--- a/drivers/pci/pci_drivers.c
+++ b/drivers/pci/pci_drivers.c
@@ -25,8 +25,6 @@
#include <debug.h>
#include <nuttx/pci/pci.h>
-#include <nuttx/pci/pci_qemu_edu.h>
-#include <nuttx/pci/pci_qemu_test.h>
#include <nuttx/rptun/rptun_ivshmem.h>
#include <nuttx/rpmsg/rpmsg_virtio_ivshmem.h>
#include <nuttx/virtio/virtio-pci.h>
diff --git a/drivers/pci/pci_drivers.h b/drivers/pci/pci_drivers.h
index bf54fb2fe9..66cdb868ea 100644
--- a/drivers/pci/pci_drivers.h
+++ b/drivers/pci/pci_drivers.h
@@ -105,4 +105,28 @@ int pci_register_epf_test_driver(void);
int pci_register_ep_test_driver(void);
#endif
+/****************************************************************************
+ * Name: pci_register_qemu_test_driver
+ *
+ * Description:
+ * Register qemu test device pci driver
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_PCI_QEMU_TEST
+int pci_register_qemu_test_driver(void);
+#endif
+
+/****************************************************************************
+ * Name: pci_register_qemu_edu_driver
+ *
+ * Description:
+ * Register qemu edu device pci driver
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_PCI_QEMU_EDU
+int pci_register_qemu_edu_driver(void);
+#endif
+
#endif /* __DRIVERS_PCI_PCI_DRIVERS_H */
diff --git a/drivers/pci/pci_qemu_edu.c b/drivers/pci/pci_qemu_edu.c
index 94bddd56cc..521cf163e6 100644
--- a/drivers/pci/pci_qemu_edu.c
+++ b/drivers/pci/pci_qemu_edu.c
@@ -30,9 +30,10 @@
#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
#include <nuttx/pci/pci.h>
-#include <nuttx/pci/pci_qemu_edu.h>
#include <nuttx/semaphore.h>
+#include "pci_drivers.h"
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
diff --git a/drivers/pci/pci_qemu_test.c b/drivers/pci/pci_qemu_test.c
index c2f07103a7..47e357b138 100644
--- a/drivers/pci/pci_qemu_test.c
+++ b/drivers/pci/pci_qemu_test.c
@@ -28,7 +28,8 @@
#include <stdint.h>
#include <nuttx/pci/pci.h>
-#include <nuttx/pci/pci_qemu_test.h>
+
+#include "pci_drivers.h"
/****************************************************************************
* Pre-processor Definitions
diff --git a/include/nuttx/pci/pci_qemu_edu.h b/include/nuttx/pci/pci_qemu_edu.h
deleted file mode 100644
index e846d881c8..0000000000
--- a/include/nuttx/pci/pci_qemu_edu.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
- * include/nuttx/pci/pci_qemu_edu.h
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership. The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-#ifndef __INCLUDE_NUTTX_PCI_PCI_QEMU_EDU_H
-#define __INCLUDE_NUTTX_PCI_PCI_QEMU_EDU_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#ifdef CONFIG_PCI_QEMU_EDU
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C"
-{
-#else
-#define EXTERN extern
-#endif
-
-/****************************************************************************
- * Name: pci_register_qemu_edu_driver
- *
- * Description:
- * register a pci driver
- *
- ****************************************************************************/
-
-int pci_register_qemu_edu_driver(void);
-
-#undef EXTERN
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CONFIG_PCI_QEMU_EDU */
-#endif /* __INCLUDE_NUTTX_PCI_PCI_QEMU_EDU_H */
diff --git a/include/nuttx/pci/pci_qemu_test.h b/include/nuttx/pci/pci_qemu_test.h
deleted file mode 100644
index 8f58c1b49a..0000000000
--- a/include/nuttx/pci/pci_qemu_test.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
- * include/nuttx/pci/pci_qemu_test.h
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership. The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-#ifndef __INCLUDE_NUTTX_PCI_PCI_QEMU_TEST_H
-#define __INCLUDE_NUTTX_PCI_PCI_QEMU_TEST_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C"
-{
-#else
-#define EXTERN extern
-#endif
-
-/****************************************************************************
- * Name: pci_register_qemu_test_driver
- *
- * Description:
- * register a pci driver
- *
- ****************************************************************************/
-
-#ifdef CONFIG_PCI_QEMU_TEST
-int pci_register_qemu_test_driver(void);
-#endif
-
-#undef EXTERN
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __INCLUDE_NUTTX_PCI_PCI_QEMU_TEST_H */
(nuttx) 01/05: pci test drv is pci rc drv not pci ep drv
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 bc6cd326b8d5332494a133e9048ce6c09421a415
Author: lipengfei28 <li...@xiaomi.com>
AuthorDate: Tue Oct 8 18:03:59 2024 +0800
pci test drv is pci rc drv not pci ep drv
Signed-off-by: lipengfei28 <li...@xiaomi.com>
---
drivers/pci/CMakeLists.txt | 8 ++++----
drivers/pci/Kconfig | 10 +++++-----
drivers/pci/Make.defs | 9 +++++----
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/pci/CMakeLists.txt b/drivers/pci/CMakeLists.txt
index d89e96587f..15ae0ac208 100644
--- a/drivers/pci/CMakeLists.txt
+++ b/drivers/pci/CMakeLists.txt
@@ -38,6 +38,10 @@ if(CONFIG_PCI)
list(APPEND SRCS pci_uio_ivshmem.c)
endif()
+ if(CONFIG_PCI_EP_TEST)
+ list(APPEND SRCS pci_ep_test.c)
+ endif()
+
target_sources(drivers PRIVATE ${SRCS})
endif() # CONFIG_PCI
@@ -54,10 +58,6 @@ if(CONFIG_PCI_ENDPOINT)
list(APPEND SRCS pci_epf_test.c)
endif() # CONFIG_PCI_EPF_TEST
- if(CONFIG_PCI_EP_TEST)
- list(APPEND SRCS pci_ep_test.c)
- endif() # CONFIG_PCI_ENDPOINT_TEST
-
target_sources(drivers PRIVATE ${SRCS})
endif() # CONFIG_PCI_ENDPOINT
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index fee521c5bc..eb632311bf 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -73,6 +73,11 @@ config PCI_UIO_IVSHMEM_NPOLLWAITERS
default 2
depends on PCI_UIO_IVSHMEM
+config PCI_EP_TEST
+ bool "PCI endpoint test"
+ ---help---
+ pci endpoint test driver
+
endif # PCI
menuconfig PCI_ENDPOINT
@@ -95,10 +100,5 @@ config PCI_EPF_TEST
---help---
pci epf test driver
-config PCI_EP_TEST
- bool "PCI endpoint test"
- ---help---
- pci endpoint test driver
-
endif # PCI_ENDPOINT
diff --git a/drivers/pci/Make.defs b/drivers/pci/Make.defs
index 4e40738cd3..1a0bed40de 100644
--- a/drivers/pci/Make.defs
+++ b/drivers/pci/Make.defs
@@ -37,6 +37,10 @@ ifeq ($(CONFIG_PCI_UIO_IVSHMEM),y)
CSRCS += pci_uio_ivshmem.c
endif
+ifeq ($(CONFIG_PCI_EP_TEST),y)
+CSRCS += pci_ep_test.c
+endif
+
ifeq ($(CONFIG_PCI_ENDPOINT),y)
CSRCS += pci_epc.c pci_epc_mem.c pci_epf.c
endif
@@ -49,13 +53,10 @@ ifeq ($(CONFIG_PCI_EPF_TEST),y)
CSRCS += pci_epf_test.c
endif
-ifeq ($(CONFIG_PCI_EP_TEST),y)
-CSRCS += pci_ep_test.c
-endif
-
# Include PCI device driver build support
DEPPATH += --dep-path pci
VPATH += :pci
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)pci
+
endif # CONFIG_PCI
(nuttx) 04/05: userspace: Exclude nuttx/arch.h
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 4ebf830bbde453852edf1daebecf76c16d7eeb48
Author: lipengfei28 <li...@xiaomi.com>
AuthorDate: Tue Oct 8 19:38:31 2024 +0800
userspace: Exclude nuttx/arch.h
Signed-off-by: lipengfei28 <li...@xiaomi.com>
---
drivers/pci/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6bde6d6788..c5d9d05a09 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -28,6 +28,7 @@
#include <sys/pciio.h>
#include <sys/endian.h>
+#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/pci/pci.h>
(nuttx) 02/05: declare pci_dev_register
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 1ce6ec7c65f743bf1cad69a7f07c52da264b27f9
Author: lipengfei28 <li...@xiaomi.com>
AuthorDate: Tue Oct 8 18:22:53 2024 +0800
declare pci_dev_register
Signed-off-by: lipengfei28 <li...@xiaomi.com>
---
drivers/pci/pci_drivers.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/pci/pci_drivers.h b/drivers/pci/pci_drivers.h
index 3bacba7363..bf54fb2fe9 100644
--- a/drivers/pci/pci_drivers.h
+++ b/drivers/pci/pci_drivers.h
@@ -26,11 +26,25 @@
****************************************************************************/
#include <nuttx/config.h>
+#include <nuttx/arch.h>
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
+/****************************************************************************
+ * Name: pci_dev_register
+ *
+ * Description:
+ * Create an pci dev driver.
+ *
+ * Returned Value:
+ * Zero (OK) on success; A negated errno value on failure.
+ *
+ ****************************************************************************/
+
+int pci_dev_register(void);
+
/****************************************************************************
* Name: pci_ivshmem_register
*
(nuttx) 05/05: include/nuttx.h: add common align definitions for nuttx
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 42041a428c2895aeb2d36854b92d9e7addd91e10
Author: lipengfei28 <li...@xiaomi.com>
AuthorDate: Tue Oct 8 20:12:51 2024 +0800
include/nuttx.h: add common align definitions for nuttx
Signed-off-by: lipengfei28 <li...@xiaomi.com>
---
drivers/pci/pci_epf.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/pci_epf.c b/drivers/pci/pci_epf.c
index 8b9ba80a5f..c748cf0306 100644
--- a/drivers/pci/pci_epf.c
+++ b/drivers/pci/pci_epf.c
@@ -22,24 +22,17 @@
* Included Files
****************************************************************************/
-#include <string.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
+#include <string.h>
#include <nuttx/lib/math32.h>
+#include <nuttx/nuttx.h>
#include <nuttx/kmalloc.h>
#include <nuttx/pci/pci_epc.h>
#include <nuttx/pci/pci_epf.h>
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-#ifndef ALIGN_UP
-# define ALIGN_UP(s, a) (((s) + (a) - 1) & ~((a) - 1))
-#endif
-
/****************************************************************************
* Private Data
****************************************************************************/