[rtems-libbsd commit] powerpc/nexus: Add legacy PCI support to PowerPC Motorola Shared BSP family

Chris Johns chrisj at rtems.org
Sun Oct 25 21:35:49 UTC 2020


Module:    rtems-libbsd
Branch:    6-freebsd-12
Commit:    c99a1ab00e800c1f67138074273704dd94dc7711
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=c99a1ab00e800c1f67138074273704dd94dc7711

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue Oct 20 12:35:22 2020 +1100

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

---

 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(-)

diff --git a/libbsd.py b/libbsd.py
index 7c9743c..24f42df 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 9401356..125ac0c 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 0000000..8683a0e
--- /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 0000000..1bfa468
--- /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>



More information about the vc mailing list