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:10 UTC
(nuttx) 03/05: pci_drivers: move qemu edu and test device header content to pci_drivers.h
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 */