Hi,

after a bit of talking with jsg@ we have found a way forward on how to
integrate FDT into ARM.

An aspect of this is having an MI FDT bus residing in sys/dev/ofw/,
where the fdt subroutines currently already are.  Then we'll convert
the vexpress platform to use FDT and continue with Exynos later on.

As a first step I would rename fdt.c to fdt_subr.c.  The actual fdt bus
will then be committed to fdt.c.  Also, create sys/dev/ofw/files.fdt to
later on declare the new fdt bus in there.

As we'll soon declare fdt at mainbus, I think we should also move the
include of files.fdt to be after mainbus on socppc.  Even if it won't
be used on socppc.

ok?

Patrick

diff --git sys/arch/armv7/conf/files.armv7 sys/arch/armv7/conf/files.armv7
index c5d022c..fc0a14f 100644
--- sys/arch/armv7/conf/files.armv7
+++ sys/arch/armv7/conf/files.armv7
@@ -10,7 +10,8 @@ major {rd = 18}
 
 define fdt {}
 file   arch/armv7/fdt/fdt_machdep.c    fdt     needs-flag
-file   dev/ofw/fdt.c
+
+include "dev/ofw/files.fdt"
 
 file   arch/arm/arm/conf.c
 
diff --git sys/arch/socppc/conf/files.socppc sys/arch/socppc/conf/files.socppc
index 4aa9526..3d02ddb 100644
--- sys/arch/socppc/conf/files.socppc
+++ sys/arch/socppc/conf/files.socppc
@@ -14,10 +14,8 @@ file arch/socppc/socppc/disksubr.c                   disk
 file   arch/socppc/socppc/machdep.c
 file   arch/socppc/socppc/mem.c
 file   dev/cninit.c
-file   dev/ofw/fdt.c
 file   arch/socppc/socppc/n1200_dts.S
 
-
 define mainbus {}
 device mainbus
 attach mainbus at root
@@ -27,6 +25,8 @@ device        cpu
 attach cpu at mainbus
 file   arch/socppc/socppc/cpu.c
 
+include "dev/ofw/files.fdt"
+
 # MPC8349E on-board devices
 device obio {[addr = 0], [ivec = -1], [phy = -1]}
 attach obio at mainbus
diff --git sys/dev/ofw/fdt.c sys/dev/ofw/fdt_subr.c
similarity index 100%
rename from sys/dev/ofw/fdt.c
rename to sys/dev/ofw/fdt_subr.c
diff --git sys/dev/ofw/files.fdt sys/dev/ofw/files.fdt
new file mode 100644
index 0000000..0ff8192
--- /dev/null
+++ sys/dev/ofw/files.fdt
@@ -0,0 +1,3 @@
+# $OpenBSD$
+
+file   dev/ofw/fdt_subr.c

Reply via email to