1 /* 2 * Copyright (c) 2023 Shenzhen Kaihong Digital Industry Development Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 #ifndef PCIE_BUS_TEST_H 9 #define PCIE_BUS_TEST_H 10 #include <inttypes.h> 11 #include "hdf_ibus_intf.h" 12 #include "hdf_io_service_if.h" 13 14 enum PcieBusCmd { 15 CMD_TEST_PCIE_BUS_GET_INFO, 16 CMD_TEST_PCIE_BUS_READ_WRITE_DATA, 17 CMD_TEST_PCIE_BUS_READ_WRITE_BULK, 18 CMD_TEST_PCIE_BUS_READ_WRITE_FUNC0, 19 CMD_TEST_PCIE_BUS_CLAIM_RELEASE_IRQ, 20 CMD_TEST_PCIE_BUS_DISABLE_RESET_BUS, 21 CMD_TEST_PCIE_BUS_CLAIM_RELEASE_HOST, 22 CMD_TEST_PCIE_BUS_READ_WRITE_IO, 23 CMD_TEST_PCIE_BUS_MAP_UNMAP_DMA, 24 CMD_TEST_PCIE_MAX, 25 }; 26 27 struct PcieBusTestConfig { 28 uint8_t busNum; 29 }; 30 31 struct PcieBusTester { 32 struct PcieBusTestConfig config; 33 struct BusDev busDev; 34 }; 35 int32_t PcieBusTestExecute(int32_t cmd); 36 #endif 37