From c6f186273f44b2e6499698e2970f7bb74b3911c7 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 7 Dec 2011 18:19:30 +0100 Subject: 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 --- board-js2x/slof/tree.fs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'board-js2x') 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! ; -- cgit v1.1