So, to draaaaaag this thread back on topic, here's how to modify the patch for other combo cards based on the Hint HB1 or its successors. You can try this with other bridge chips but it may not work. For devices with two other PCI devices behind the bridge (or for cards where you are happy with only two of them working), this is absolutely trivial. For devices with more, it can get arbitrarily tricky.
We'll take the second-revision Sonnet Tango 2.0 as an example. The first thing you need to do is to stick the card in another machine with OpenFirmware (in my case, I used a beige G3), and get the following things:
- The list of devices behind the bridge (as shown in 'ls')
- The properties for the bridge itself
- If there are more than two devices, the properties of each device will help you work out which ones you need to enable in your patch.
The first thing to do is to get the vendor and device ID of the bridge. This is in the .properties output from the other machine. For the Tango, it looked like this:
Code:
0 > .properties
vendor-id 00003388
device-id 00000021
revision-id 00000011
class-code 00060400
devsel-speed 00000001
fast-back-to-back
AAPL,interrupts 00000017
AAPL,slot-name A1
name pci-bridge
device_type pci
reg 00006800 00000000 00000000 00000000 00000000
#address-cells 00000003
#size-cells 00000002
ranges 82000000 00000000 81800000 82000000 00000000 81800000
bus-range 00000001 00000001
power-consumption 007270E0 007270E0
assigned-addresses
ok
You need to take the top two numbers and put them into the check-node word definition in the patch, replacing 1668 and 100. So, for the Tango 2.0, check-node looks like:
Code:
: check-node
my-space " config-l@" $call-parent
dup d# 16 >> swap h# 0000FFFF and my-space d# 8 + " config-l@" $call-parent d
# 8 >> h# 60400 = swap h# 3388 = and swap h# 21 = and ;
Then, you need to work out which devices you're enabling. To do this, look at the 'ls' output you collected from your other OF machine. Here was mine:
Code:
FF842A70: /pci-bridge@D
FF8437A8: /pci1033,ce@8 [pci1033,ce]
FF843AA0: /pci1033,35@9 [pci1033,35]
FF843D68: /pci1033,e0@9,1 [pci1033,e0]
We are here interested in the numbers after the @ sign. (Note that these are in hex, so they may be A-F; they're still numbers). The Tango 2.0 is easy because there are only two "top level" devices (I don't know what the proper term is), at 8 and 9. The one at 9,1 we ignore.
Now you go into the patch and look at the make-nodes definition. In that, you'll find two invocations of new-device, each followed by two zeros and then a quoted string. The first quoted string is 0,0, the second is 1,0. You should change the first digits of these to be the device numbers that you spotted above. So for the Tango 2.0, we want to change them to 8 and 9, so the code near new-device looks like:
Code:
new-device 0 0 " 8,0"
...
new-device 0 0 " 9,0"
Don't forget that the opening quote needs a space after it: just forth things.
If only some of the USB ports on your card work, then you probably have multiple OHCI hosts on the card (this is what happened with the Kalea). I'll talk about dealing with that in a subsequent post. If, when you restart the computer after applying the patch, the devices appear properly in 'ls' in OF but the machine crashes hard during boot, then it's possible you have a bridge that needs to be initialised differently. Still thinking about that case.