All of lore.kernel.org
 help / color / mirror / Atom feed
* The new SSB subsystem for bcm43xx (and others)
@ 2006-12-22 12:59 Michael Buesch
  2007-02-10 20:46 ` Matthew Garrett
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Buesch @ 2006-12-22 12:59 UTC (permalink / raw)
  To: bcm43xx-dev; +Cc: Felix Fietkau, netdev

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.

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The new SSB subsystem for bcm43xx (and others)
  2006-12-22 12:59 The new SSB subsystem for bcm43xx (and others) Michael Buesch
@ 2007-02-10 20:46 ` Matthew Garrett
  2007-02-10 21:03   ` Michael Buesch
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2007-02-10 20:46 UTC (permalink / raw)
  To: Michael Buesch; +Cc: bcm43xx-dev, netdev, Felix Fietkau

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.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The new SSB subsystem for bcm43xx (and others)
  2007-02-10 20:46 ` Matthew Garrett
@ 2007-02-10 21:03   ` Michael Buesch
  2007-02-10 22:11     ` Matthew Garrett
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Buesch @ 2007-02-10 21:03 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: bcm43xx-dev, netdev, Felix Fietkau

On Saturday 10 February 2007 21:46, Matthew Garrett wrote:
> 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.

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The new SSB subsystem for bcm43xx (and others)
  2007-02-10 21:03   ` Michael Buesch
@ 2007-02-10 22:11     ` Matthew Garrett
  2007-02-10 22:14       ` Michael Buesch
  2007-02-10 22:56       ` Pavel Roskin
  0 siblings, 2 replies; 7+ messages in thread
From: Matthew Garrett @ 2007-02-10 22:11 UTC (permalink / raw)
  To: Michael Buesch; +Cc: netdev, bcm43xx-dev, Felix Fietkau

On Sat, Feb 10, 2007 at 10:03:57PM +0100, Michael Buesch wrote:
> On Saturday 10 February 2007 21:46, Matthew Garrett wrote:
> > 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.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>

---

diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index 64f94b8..b16cee9 100644
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -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 "

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The new SSB subsystem for bcm43xx (and others)
  2007-02-10 22:11     ` Matthew Garrett
@ 2007-02-10 22:14       ` Michael Buesch
  2007-02-10 22:56       ` Pavel Roskin
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Buesch @ 2007-02-10 22:14 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: netdev, bcm43xx-dev, Felix Fietkau

On Saturday 10 February 2007 23:11, Matthew Garrett wrote:
> On Sat, Feb 10, 2007 at 10:03:57PM +0100, Michael Buesch wrote:
> > On Saturday 10 February 2007 21:46, Matthew Garrett wrote:
> > > 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.
> 
> Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>

Ok, nice. Thanks for figuring this out.
I'll apply this too my tree.

> ---
> 
> diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
> index 64f94b8..b16cee9 100644
> --- a/drivers/ssb/scan.c
> +++ b/drivers/ssb/scan.c
> @@ -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 "
> 

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The new SSB subsystem for bcm43xx (and others)
  2007-02-10 22:11     ` Matthew Garrett
  2007-02-10 22:14       ` Michael Buesch
@ 2007-02-10 22:56       ` Pavel Roskin
  2007-02-10 23:10         ` Michael Buesch
  1 sibling, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2007-02-10 22:56 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Michael Buesch, netdev, bcm43xx-dev, Felix Fietkau

On Sat, 2007-02-10 at 22:11 +0000, Matthew Garrett wrote:
> 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.

I've just checked, pcmcia/ciscode.h is not needed.  The rest is needed.

-- 
Regards,
Pavel Roskin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The new SSB subsystem for bcm43xx (and others)
  2007-02-10 22:56       ` Pavel Roskin
@ 2007-02-10 23:10         ` Michael Buesch
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Buesch @ 2007-02-10 23:10 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Matthew Garrett, netdev, bcm43xx-dev, Felix Fietkau

On Saturday 10 February 2007 23:56, Pavel Roskin wrote:
> On Sat, 2007-02-10 at 22:11 +0000, Matthew Garrett wrote:
> > 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.
> 
> I've just checked, pcmcia/ciscode.h is not needed.  The rest is needed.

http://bu3sch.de/gitweb?p=wireless-dev.git;a=commitdiff;h=218241c63246c5611520df98ce8ae06016545c9c

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-10 23:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22 12:59 The new SSB subsystem for bcm43xx (and others) Michael Buesch
2007-02-10 20:46 ` Matthew Garrett
2007-02-10 21:03   ` Michael Buesch
2007-02-10 22:11     ` Matthew Garrett
2007-02-10 22:14       ` Michael Buesch
2007-02-10 22:56       ` Pavel Roskin
2007-02-10 23:10         ` Michael Buesch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.