aboutsummaryrefslogtreecommitdiff
path: root/board-js2x
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-10-27 13:39:44 +0200
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-11-17 12:10:36 +0100
commitde5b143a1e1c67575914dab1ac1ad9f8ff525daa (patch)
treec91d23ff10f6583190ec7b2370657b7083cd38ae /board-js2x
parentae0aaffc1587e9f0eac9bb3b863a20bbb7518378 (diff)
downloadSLOF-de5b143a1e1c67575914dab1ac1ad9f8ff525daa.zip
SLOF-de5b143a1e1c67575914dab1ac1ad9f8ff525daa.tar.gz
SLOF-de5b143a1e1c67575914dab1ac1ad9f8ff525daa.tar.bz2
Fixed the PCI map-in function.
The map-in function must retriev the BAR address from the config space address that is provided in the phys.hi parameter. We can not rely on the value in phys.lo as we did before. This patch is needed to get the FCODE from QLOGIC working, and it also revealed some bugs in the current version of our ATI rn50 driver (which uses map-in, too, to get the register base address). Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'board-js2x')
-rw-r--r--board-js2x/slof/pci-device_1002_515e.fs19
1 files changed, 8 insertions, 11 deletions
diff --git a/board-js2x/slof/pci-device_1002_515e.fs b/board-js2x/slof/pci-device_1002_515e.fs
index 5cd692b..84561c4 100644
--- a/board-js2x/slof/pci-device_1002_515e.fs
+++ b/board-js2x/slof/pci-device_1002_515e.fs
@@ -32,15 +32,12 @@ my-space pci-set-irq-line
-1 value regs-addr
false value is_installed
-: >rn [ 18 config-l@ -10 and ] LITERAL + ;
-: rn! >rn rl!-le ;
-: rn@ >rn rl@-le ;
-: reg-rl@ rn@ ;
-: reg-rl! rn! ;
-: map-in " map-in" $call-parent ;
-: map-out " map-out" $call-parent ;
-: pc@ ( offset -- byte ) >rn rb@ ;
-: pc! ( byte offset -- ) >rn rb! ;
+: reg-rl@ regs-addr + rl@-le ;
+: reg-rl! regs-addr + rl!-le ;
+: map-in " map-in" $call-parent ;
+: map-out " map-out" $call-parent ;
+: pc@ ( offset -- byte ) regs-addr + rb@ ;
+: pc! ( byte offset -- ) regs-addr + rb! ;
0 value phys_low
0 value phys_mid
@@ -206,8 +203,8 @@ dup l@ swap la1+
;
: andorset ( reg and or -- )
- 2 pick regs-addr + dup rn@
- 3 pick AND 2 pick OR swap rn! 3drop
+ 2 pick dup reg-rl@
+ 3 pick AND 2 pick OR swap reg-rl! 3drop
;
: INIT1