@@ -11,7 +11,8 @@ endif
tests-common = \
$(TEST_DIR)/selftest.flat \
- $(TEST_DIR)/spinlock-test.flat
+ $(TEST_DIR)/spinlock-test.flat \
+ $(TEST_DIR)/pci-test.flat
all: test_cases
@@ -33,6 +34,8 @@ include scripts/asm-offsets.mak
cflatobjs += lib/util.o
cflatobjs += lib/alloc.o
cflatobjs += lib/devicetree.o
+cflatobjs += lib/pci.o
+cflatobjs += lib/pci-host-generic.o
cflatobjs += lib/virtio.o
cflatobjs += lib/virtio-mmio.o
cflatobjs += lib/chr-testdev.o
new file mode 100644
@@ -0,0 +1,19 @@
+/*
+ * PCI bus operation test
+ *
+ * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <agordeev@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.
+ */
+#include <libcflat.h>
+#include <pci.h>
+
+int main(void)
+{
+ if (!pci_probe())
+ report_abort("PCI bus probing failed\n");
+
+ pci_print();
+
+ return report_summary();
+}
new file mode 100644
@@ -0,0 +1 @@
+#include "asm-generic/pci-host-bridge.h"
new file mode 100644
@@ -0,0 +1 @@
+#include "../../arm/asm/pci.h"