diff options
author | Thomas Huth <thuth@redhat.com> | 2016-01-12 09:07:18 +0100 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-01-14 14:52:32 +1100 |
commit | fe7b047c0c0e3ca4c77eda5ee5fe627e2718981d (patch) | |
tree | 8179f69a5ec3a015e32c54a4c7df86c60333cbd1 /board-js2x | |
parent | 056ff5b32d5a33d47beb0598b5df02f913518e43 (diff) | |
download | SLOF-fe7b047c0c0e3ca4c77eda5ee5fe627e2718981d.zip SLOF-fe7b047c0c0e3ca4c77eda5ee5fe627e2718981d.tar.gz SLOF-fe7b047c0c0e3ca4c77eda5ee5fe627e2718981d.tar.bz2 |
Fix dma-alloc and dma-map-in functions on board-js2x
Since slof/fs/dma-function.fs has been introduced for board-qemu,
these function definitions shadow the original js2x functions from
slof/fs/pci-config-bridge.fs, because dma-functions.fs is included
after pci-config-bridge.fs in slof/fs/pci-bridge.fs.
To restore the original behavior, move the js2x functions into
a board-specific dma-function.fs file instead and include that
one into the ROM-fs instead of the version for board-qemu.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'board-js2x')
-rw-r--r-- | board-js2x/slof/Makefile | 2 | ||||
-rw-r--r-- | board-js2x/slof/dma-function.fs | 31 |
2 files changed, 32 insertions, 1 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 +; |