aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board-js2x/slof/Makefile2
-rw-r--r--board-js2x/slof/dma-function.fs31
-rw-r--r--slof/fs/pci-config-bridge.fs20
3 files changed, 32 insertions, 21 deletions
diff --git a/board-js2x/slof/Makefile b/board-js2x/slof/Makefile
index fdc716f..4cdd5fa 100644
--- a/board-js2x/slof/Makefile
+++ b/board-js2x/slof/Makefile
@@ -57,6 +57,7 @@ OF_FFS_FILES = \
$(SLOFBRDDIR)/attu.fs \
$(SLOFBRDDIR)/cpu.fs \
$(SLOFBRDDIR)/ioapic.fs \
+ $(SLOFBRDDIR)/dma-function.fs \
$(SLOFBRDDIR)/pci-bridge_1022_7460.fs \
$(SLOFBRDDIR)/pci-device_1014_028c.fs \
$(SLOFBRDDIR)/pci-device_1014_02bd.fs \
@@ -82,7 +83,6 @@ OF_FFS_FILES = \
$(SLOFCMNDIR)/fs/scsi-host-helpers.fs \
$(SLOFCMNDIR)/fs/scsi-probe-helpers.fs \
$(SLOFCMNDIR)/fs/scsi-support.fs \
- $(SLOFCMNDIR)/fs/dma-function.fs \
$(SLOFCMNDIR)/fs/pci-device.fs \
$(SLOFCMNDIR)/fs/pci-bridge.fs \
$(SLOFCMNDIR)/fs/pci-properties.fs \
diff --git a/board-js2x/slof/dma-function.fs b/board-js2x/slof/dma-function.fs
new file mode 100644
index 0000000..2e314cd
--- /dev/null
+++ b/board-js2x/slof/dma-function.fs
@@ -0,0 +1,31 @@
+\ *****************************************************************************
+\ * Copyright (c) 2004, 2011 IBM Corporation
+\ * All rights reserved.
+\ * This program and the accompanying materials
+\ * are made available under the terms of the BSD License
+\ * which accompanies this distribution, and is available at
+\ * http://www.opensource.org/licenses/bsd-license.php
+\ *
+\ * Contributors:
+\ * IBM Corporation - initial implementation
+\ ****************************************************************************/
+
+: dma-alloc ( ... size -- virt )
+ \ ." dma-alloc called: " .s cr
+ alloc-mem
+;
+
+: dma-free ( virt size -- )
+ \ ." dma-free called: " .s cr
+ free-mem
+;
+
+: dma-map-in ( ... virt size cacheable? -- devaddr )
+ \ ." dma-map-in called: " .s cr
+ 2drop
+;
+
+: dma-map-out ( virt devaddr size -- )
+ \ ." dma-map-out called: " .s cr
+ 2drop drop
+;
diff --git a/slof/fs/pci-config-bridge.fs b/slof/fs/pci-config-bridge.fs
index 6893253..1efbcd8 100644
--- a/slof/fs/pci-config-bridge.fs
+++ b/slof/fs/pci-config-bridge.fs
@@ -81,26 +81,6 @@
2drop
;
-: dma-alloc ( ... size -- virt )
- \ ." dma-alloc called: " .s cr
- alloc-mem
-;
-
-: dma-free ( virt size -- )
- \ ." dma-free called: " .s cr
- free-mem
-;
-
-: dma-map-in ( ... virt size cacheable? -- devaddr )
- \ ." dma-map-in called: " .s cr
- 2drop
-;
-
-: dma-map-out ( virt devaddr size -- )
- \ ." dma-map-out called: " .s cr
- 2drop drop
-;
-
: dma-sync ( virt devaddr size -- )
\ XXX should we add at least a memory barrier here?
\ ." dma-sync called: " .s cr