From c140913ecec3cbba27793a65a5c7d0562c16a3ba Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 14 Oct 2011 16:46:13 +0200 Subject: 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 --- board-js2x/slof/pci-bridge_1022_7460.fs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'board-js2x') 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 -- cgit v1.1