pci_drivers: move qemu edu and test device header content to pci_drivers.h

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang
2024-03-15 21:28:11 +08:00
committed by Xiang Xiao
parent 1ce6ec7c65
commit acbe19d744
6 changed files with 28 additions and 127 deletions

View File

@@ -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>

View File

@@ -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 */

View File

@@ -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
****************************************************************************/

View File

@@ -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

View File

@@ -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 */

View File

@@ -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 */