aboutsummaryrefslogtreecommitdiff
path: root/board-js2x
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-12-07 18:19:30 +0100
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-12-20 17:56:48 +0100
commitc6f186273f44b2e6499698e2970f7bb74b3911c7 (patch)
tree22e03a4162ad5a03ba687ff1f26ed86b5cc7abcd /board-js2x
parent631dd47cc8be019abf7c08d229ff659a0bccc20e (diff)
downloadSLOF-c6f186273f44b2e6499698e2970f7bb74b3911c7.zip
SLOF-c6f186273f44b2e6499698e2970f7bb74b3911c7.tar.gz
SLOF-c6f186273f44b2e6499698e2970f7bb74b3911c7.tar.bz2
JS2x: Fixed config space access functions.
According to the PCI bus binding to Open Firmware, the uppermost byte can contain some description bits when doing "config-l@" and the like. For accessing the config space via MMIO, we've got to mask them away. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'board-js2x')
-rw-r--r--board-js2x/slof/tree.fs9
1 files changed, 8 insertions, 1 deletions
diff --git a/board-js2x/slof/tree.fs b/board-js2x/slof/tree.fs
index fe43955..26f441d 100644
--- a/board-js2x/slof/tree.fs
+++ b/board-js2x/slof/tree.fs
@@ -15,7 +15,14 @@
0 value puid
: >conf-rtas ( config-addr -- config-addr )
- puid f2000000 >= IF dup ffff > IF 1000000 + THEN THEN puid + ;
+ puid f2000000 >= IF
+ ffffff AND \ Mask away highest byte for normal PCI
+ dup ffff > IF
+ 1000000 +
+ THEN
+ THEN
+ puid +
+;
: rtas-config-b@ ( config-addr -- value ) >conf-rtas rb@ ;
: rtas-config-b! ( value config-addr -- ) >conf-rtas rb! ;