aboutsummaryrefslogtreecommitdiff
path: root/board-js2x
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-10-14 16:46:13 +0200
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-11-17 12:09:57 +0100
commitc140913ecec3cbba27793a65a5c7d0562c16a3ba (patch)
tree7196d8e7092542b727e63bea0f35cac14754fd8a /board-js2x
parent8d9bb6b048e525a2505987667e84cf23f15264f8 (diff)
downloadSLOF-c140913ecec3cbba27793a65a5c7d0562c16a3ba.zip
SLOF-c140913ecec3cbba27793a65a5c7d0562c16a3ba.tar.gz
SLOF-c140913ecec3cbba27793a65a5c7d0562c16a3ba.tar.bz2
Fixed config-xx PCI bus node functions
According to the IEEE 1275 PCI bus binding, the config space address for the config-xx access functions should also always contain the bus-device-function numbers (i.e. "my-space"). The SLOF code behaved different so far by adding my-space during the config-xx words instead. This of course caused problems when running FCODE that expects the IEEE 1275 behaviour. The config-xx functions have now been changed to automatically detect the required behaviour: If the caller supplied a bus-device-function number, we do not add "my-space" in these functions anymore. However, our pci-bridge code for the AMD 8111 abused the old behaviour by accessing multiple devices+functions without specifying the full unit address. So for this device, special config-xx functions have been added to work-around this problem. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'board-js2x')
-rw-r--r--board-js2x/slof/pci-bridge_1022_7460.fs9
1 files changed, 9 insertions, 0 deletions
diff --git a/board-js2x/slof/pci-bridge_1022_7460.fs b/board-js2x/slof/pci-bridge_1022_7460.fs
index c28e0d2..d6a73d3 100644
--- a/board-js2x/slof/pci-bridge_1022_7460.fs
+++ b/board-js2x/slof/pci-bridge_1022_7460.fs
@@ -15,6 +15,15 @@
\ See the documentation at http://www.amd.com ; the datasheet for this chip is
\ document #24674.
+\ Config space access functions - we're touching multiple device numbers and
+\ device functions below, so we've got to add our own my-space base here:
+: config-b@ dup 1000 < IF my-space + THEN config-b@ ;
+: config-w@ dup 1000 < IF my-space + THEN config-w@ ;
+: config-l@ dup 1000 < IF my-space + THEN config-l@ ;
+: config-b! dup 1000 < IF my-space + THEN config-b! ;
+: config-w! dup 1000 < IF my-space + THEN config-w! ;
+: config-l! dup 1000 < IF my-space + THEN config-l! ;
+
\ First, some master config. Not all of this logically belongs to just
\ one function, and certainly not to the LPC bridge; also, we'll
\ initialize all functions in "downstream" order, and this code has to be