[PATCH] powerpc/nexus: Add legacy PCI support to PowerPC Motorola Shared BSP family

chrisj at rtems.org chrisj at rtems.org
Tue Oct 20 01:52:13 UTC 2020


From: Chris Johns <chrisj at rtems.org>

---
 libbsd.py                                     | 2 +-
 rtemsbsd/include/bsp/nexus-devices.h          | 6 +++++-
 rtemsbsd/powerpc/include/machine/legacyvar.h  | 2 ++
 rtemsbsd/powerpc/include/machine/pci_cfgreg.h | 2 ++
 4 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 rtemsbsd/powerpc/include/machine/legacyvar.h
 create mode 100644 rtemsbsd/powerpc/include/machine/pci_cfgreg.h

diff --git a/libbsd.py b/libbsd.py
index 7c9743cb..2dc0d0db 100644
--- a/libbsd.py
+++ b/libbsd.py
@@ -2787,7 +2787,7 @@ class pci(builder.Module):
             ]
         )
         self.addCPUDependentFreeBSDSourceFiles(
-            [ 'i386' ],
+            [ 'i386', "powerpc" ],
             [
                 'sys/x86/x86/legacy.c',
                 'sys/x86/pci/pci_bus.c',
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index 94013564..125ac0c3 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -196,6 +196,10 @@ SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
 RTEMS_BSD_DEFINE_NEXUS_DEVICE(fec, 0, 0, NULL);
 SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
 
-#endif
+#elif defined(LIBBSP_POWERPC_MOTOROLA_POWERPC_BSP_H)
+
+RTEMS_BSD_DRIVER_PC_LEGACY;
+
+#endif /* LIBBSP_POWERPC_MOTOROLA_POWERPC_BSP_H */
 
 #endif
diff --git a/rtemsbsd/powerpc/include/machine/legacyvar.h b/rtemsbsd/powerpc/include/machine/legacyvar.h
new file mode 100644
index 00000000..8683a0e5
--- /dev/null
+++ b/rtemsbsd/powerpc/include/machine/legacyvar.h
@@ -0,0 +1,2 @@
+/* See freebsd/sys/x86/include/machine/legacyvar.h */
+#include <x86/include/machine/legacyvar.h>
diff --git a/rtemsbsd/powerpc/include/machine/pci_cfgreg.h b/rtemsbsd/powerpc/include/machine/pci_cfgreg.h
new file mode 100644
index 00000000..1bfa468e
--- /dev/null
+++ b/rtemsbsd/powerpc/include/machine/pci_cfgreg.h
@@ -0,0 +1,2 @@
+/* See freebsd/sys/x86/include/machine/pci_cfgreg.h */
+#include <x86/include/machine/pci_cfgreg.h>
-- 
2.24.1



More information about the devel mailing list