The new SSB subsystem for bcm43xx (and others)
Subsystems (3)
This is a development snapshot of the new Sonics Silicon Backplane subsystem I am currently designing.
A port of the bcm43xx driver is included and it works (more or less). There are still some things left and broken (most are marked with TODO or FIXME).
This is just a snapshot for you to look at what it will look like when it's done. The major API is done. There will be some minor changes to it, but that's it.
Well, what is this, actually? This subsystem has the goal to make it possible to drive the mainline kernel with bcm43xx on an embedded system based on the sonics backplane natively and out of the box. The Linksys WRT router is a good example for one of these devices.
There is also a port of b44 available, so it can run on this, but it's not included here.
In general it works like this:
[Host PCI bus]
\ [Sonics Backplane] \ \ \ bcm43xx b44 other devices...
The Host PCI bus does not need to be there. In fact, it is not there for the embedded devices. So the Sonics Backplane is the main system bus.
The ssb subsystem completely abstracts all these details, so that we can run the same bcm43xx (and b44) driver on a normal PCI machine and such an embedded device natively.
In previous implementations the normal bcm43xx PCI driver was run on these devices, by emulating a PCI bus on top of the real SSB Bus.
The Quilt series for all this can be downloaded here:
http://bu3sch.de/misc/new-ssb-20061222.tar.bz2
This series applies against my wireless development git tree.
Signature · 1 line
Greetings Michael.
I'm testing with your bcm43xx git tree, which I'm guessing is the current ssb code. The only problem I've found is that there doesn't seem to be any sysfs relationship between the ssb bus and (in this case) the PCI device that it's associated with. Is this fixable? Right now it appears as an entirely separate branch of the device tree, which doesn't seem quite right.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 6 lines · Matthew Garrett
I'm testing with your bcm43xx git tree, which I'm guessing is the current ssb code. The only problem I've found is that there doesn't seem to be any sysfs relationship between the ssb bus and (in this case) the PCI device that it's associated with. Is this fixable? Right now it appears as an entirely separate branch of the device tree, which doesn't seem quite right.
I guess that's fixable, but I didn't care too much, yet.
Signature · 1 line
Greetings Michael.
Quoted 9 lines · Michael Buesch
Quoted 6 lines · Matthew Garrett
I'm testing with your bcm43xx git tree, which I'm guessing is the current ssb code. The only problem I've found is that there doesn't seem to be any sysfs relationship between the ssb bus and (in this case) the PCI device that it's associated with. Is this fixable? Right now it appears as an entirely separate branch of the device tree, which doesn't seem quite right.
I guess that's fixable, but I didn't care too much, yet.
Ok, here's a patch. The stack of PCMCIA headers are needed to get the pcmcia_device structure. Seems to work fine for PCI - I don't have any PCMCIA devices. The SSB devices now appear underneath the PCI device rather than in the top level of /sys/devices.
---
drivers/ssb/scan.c +10 -1
@@ -15,6 +15,11 @@#include <linux/ssb/ssb.h> #include <linux/ssb/ssb_regs.h> #include <linux/pci.h> +#include <pcmcia/cs_types.h> +#include <pcmcia/cs.h> +#include <pcmcia/cistpl.h> +#include <pcmcia/ciscode.h> +#include <pcmcia/ds.h> #include <asm/io.h> #include "ssb_private.h"
@@ -306,8 +311,12 @@ int ssb_bus_scan(struct ssb_bus *bus, dev->id.vendor = (idhi &SSB_IDHIGH_VC ) >>SSB_IDHIGH_VC_SHIFT ; dev->core_index = i; dev->bus = bus; -if ((dev->bus->bustype ==SSB_BUSTYPE_PCI ) && (bus->host_pci)) +if ((dev->bus->bustype ==SSB_BUSTYPE_PCI ) && (bus->host_pci)) { dev->irq = bus->host_pci->irq; + dev->dev.parent = &bus->host_pci->dev; + }else if (dev->bus->bustype ==SSB_BUSTYPE_PCMCIA ) { + dev->dev.parent = &bus->host_pcmcia->dev; + } ssb_dprintk(KERN_INFO PFX"Core %d found: %s "
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 9 lines · Matthew Garrett
Quoted 8 lines · Michael Buesch
Quoted 6 lines · Matthew Garrett
I'm testing with your bcm43xx git tree, which I'm guessing is the current ssb code. The only problem I've found is that there doesn't seem to be any sysfs relationship between the ssb bus and (in this case) the PCI device that it's associated with. Is this fixable? Right now it appears as an entirely separate branch of the device tree, which doesn't seem quite right.
Quoted 8 lines
Quoted 1 line
I guess that's fixable, but I didn't care too much, yet.
Ok, here's a patch. The stack of PCMCIA headers are needed to get the
pcmcia_devicestructure. Seems to work fine for PCI - I don't have any PCMCIA devices. The SSB devices now appear underneath the PCI device rather than in the top level of/sys/devices.Signed-off-by Matthew Garrett <[email protected]>
Ok, nice. Thanks for figuring this out.
I'll apply this too my tree.
Quoted 33 lines
---
drivers/ssb/scan.c +10
-1@@ -15,6 +15,11 @@#include <linux/ssb/ssb.h> #include <linux/ssb/ssb_regs.h> #include <linux/pci.h> +#include <pcmcia/cs_types.h> +#include <pcmcia/cs.h> +#include <pcmcia/cistpl.h> +#include <pcmcia/ciscode.h> +#include <pcmcia/ds.h> #include <asm/io.h> #include "ssb_private.h" @@ -306,8 +311,12 @@ int ssb_bus_scan(struct ssb_bus *bus, dev->id.vendor = (idhi &SSB_IDHIGH_VC ) >>SSB_IDHIGH_VC_SHIFT ; dev->core_index = i; dev->bus = bus; -if ((dev->bus->bustype ==SSB_BUSTYPE_PCI ) && (bus->host_pci)) +if ((dev->bus->bustype ==SSB_BUSTYPE_PCI ) && (bus->host_pci)) { dev->irq = bus->host_pci->irq; + dev->dev.parent = &bus->host_pci->dev; + }else if (dev->bus->bustype ==SSB_BUSTYPE_PCMCIA ) { + dev->dev.parent = &bus->host_pcmcia->dev; + } ssb_dprintk(KERN_INFO PFX"Core %d found: %s "
Signature · 1 line
Greetings Michael.
Quoted 4 lines · Matthew Garrett
Ok, here's a patch. The stack of PCMCIA headers are needed to get the
pcmcia_devicestructure. Seems to work fine for PCI - I don't have any PCMCIA devices. The SSB devices now appear underneath the PCI device rather than in the top level of/sys/devices.
I've just checked, pcmcia/ciscode.h is not needed. The rest is needed.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 7 lines · Pavel Roskin
Quoted 4 lines · Matthew Garrett
Ok, here's a patch. The stack of PCMCIA headers are needed to get the
pcmcia_devicestructure. Seems to work fine for PCI - I don't have any PCMCIA devices. The SSB devices now appear underneath the PCI device rather than in the top level of/sys/devices.I've just checked,
pcmcia/ciscode.his not needed. The rest is needed.
http://bu3sch.de/gitweb?p=wireless-dev.git;a=commitdiff;h=218241c63246c5611520df98ce8ae06016545c9c
Signature · 1 line
Greetings Michael.