Skip to content

Commit 61e115a

Browse files
Michael BueschDavid S. Miller
authored andcommitted
[SSB]: add Sonics Silicon Backplane bus support
SSB is an SoC bus used in a number of embedded devices. The most well-known of these devices is probably the Linksys WRT54G, but there are others as well. The bus is also used internally on the BCM43xx and BCM44xx devices from Broadcom. This patch also includes support for SSB ID tables in modules, so that SSB drivers can be loaded automatically. Signed-off-by: Michael Buesch <[email protected]> Signed-off-by: John W. Linville <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5ee3afb commit 61e115a

24 files changed

+5892
-0
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3446,6 +3446,12 @@ M: [email protected]
34463446
34473447
S: Maintained
34483448

3449+
SONICS SILICON BACKPLANE DRIVER (SSB)
3450+
P: Michael Buesch
3451+
3452+
3453+
S: Maintained
3454+
34493455
SONY VAIO CONTROL DEVICE DRIVER
34503456
P: Mattia Dongili
34513457

drivers/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ source "drivers/power/Kconfig"
5858

5959
source "drivers/hwmon/Kconfig"
6060

61+
source "drivers/ssb/Kconfig"
62+
6163
source "drivers/mfd/Kconfig"
6264

6365
source "drivers/media/Kconfig"

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ obj-$(CONFIG_DMA_ENGINE) += dma/
8888
obj-$(CONFIG_HID) += hid/
8989
obj-$(CONFIG_PPC_PS3) += ps3/
9090
obj-$(CONFIG_OF) += of/
91+
obj-$(CONFIG_SSB) += ssb/

drivers/ssb/Kconfig

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
menu "Sonics Silicon Backplane"
2+
3+
config SSB_POSSIBLE
4+
bool
5+
depends on HAS_IOMEM
6+
default y
7+
8+
config SSB
9+
tristate "Sonics Silicon Backplane support"
10+
depends on SSB_POSSIBLE
11+
help
12+
Support for the Sonics Silicon Backplane bus.
13+
You only need to enable this option, if you are
14+
configuring a kernel for an embedded system with
15+
this bus.
16+
It will be auto-selected if needed in other
17+
environments.
18+
19+
The module will be called ssb.
20+
21+
If unsure, say N.
22+
23+
config SSB_PCIHOST_POSSIBLE
24+
bool
25+
depends on SSB && PCI
26+
default y
27+
28+
config SSB_PCIHOST
29+
bool "Support for SSB on PCI-bus host"
30+
depends on SSB_PCIHOST_POSSIBLE
31+
default y
32+
help
33+
Support for a Sonics Silicon Backplane on top
34+
of a PCI device.
35+
36+
If unsure, say Y
37+
38+
config SSB_PCMCIAHOST_POSSIBLE
39+
bool
40+
depends on SSB && PCMCIA && EXPERIMENTAL
41+
default y
42+
43+
config SSB_PCMCIAHOST
44+
bool "Support for SSB on PCMCIA-bus host (EXPERIMENTAL)"
45+
depends on SSB_PCMCIAHOST_POSSIBLE
46+
help
47+
Support for a Sonics Silicon Backplane on top
48+
of a PCMCIA device.
49+
50+
If unsure, say N
51+
52+
config SSB_SILENT
53+
bool "No SSB kernel messages"
54+
depends on SSB && EMBEDDED
55+
help
56+
This option turns off all Sonics Silicon Backplane printks.
57+
Note that you won't be able to identify problems, once
58+
messages are turned off.
59+
This might only be desired for production kernels on
60+
embedded devices to reduce the kernel size.
61+
62+
Say N
63+
64+
config SSB_DEBUG
65+
bool "SSB debugging"
66+
depends on SSB && !SSB_SILENT
67+
help
68+
This turns on additional runtime checks and debugging
69+
messages. Turn this on for SSB troubleshooting.
70+
71+
If unsure, say N
72+
73+
config SSB_SERIAL
74+
bool
75+
depends on SSB
76+
# ChipCommon and ExtIf serial support routines.
77+
78+
config SSB_DRIVER_PCICORE_POSSIBLE
79+
bool
80+
depends on SSB_PCIHOST
81+
default y
82+
83+
config SSB_DRIVER_PCICORE
84+
bool "SSB PCI core driver"
85+
depends on SSB_DRIVER_PCICORE_POSSIBLE
86+
help
87+
Driver for the Sonics Silicon Backplane attached
88+
Broadcom PCI core.
89+
90+
If unsure, say Y
91+
92+
config SSB_PCICORE_HOSTMODE
93+
bool "Hostmode support for SSB PCI core (EXPERIMENTAL)"
94+
depends on SSB_DRIVER_PCICORE && SSB_DRIVER_MIPS && EXPERIMENTAL
95+
help
96+
PCIcore hostmode operation (external PCI bus).
97+
98+
config SSB_DRIVER_MIPS
99+
bool "SSB Broadcom MIPS core driver (EXPERIMENTAL)"
100+
depends on SSB && MIPS && EXPERIMENTAL
101+
select SSB_SERIAL
102+
help
103+
Driver for the Sonics Silicon Backplane attached
104+
Broadcom MIPS core.
105+
106+
If unsure, say N
107+
108+
config SSB_DRIVER_EXTIF
109+
bool "SSB Broadcom EXTIF core driver (EXPERIMENTAL)"
110+
depends on SSB_DRIVER_MIPS && EXPERIMENTAL
111+
help
112+
Driver for the Sonics Silicon Backplane attached
113+
Broadcom EXTIF core.
114+
115+
If unsure, say N
116+
117+
endmenu

drivers/ssb/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# core
2+
ssb-y += main.o scan.o
3+
4+
# host support
5+
ssb-$(CONFIG_SSB_PCIHOST) += pci.o pcihost_wrapper.o
6+
ssb-$(CONFIG_SSB_PCMCIAHOST) += pcmcia.o
7+
8+
# built-in drivers
9+
ssb-y += driver_chipcommon.o
10+
ssb-$(CONFIG_SSB_DRIVER_MIPS) += driver_mipscore.o
11+
ssb-$(CONFIG_SSB_DRIVER_EXTIF) += driver_extif.o
12+
ssb-$(CONFIG_SSB_DRIVER_PCICORE) += driver_pcicore.o
13+
14+
# b43 pci-ssb-bridge driver
15+
# Not strictly a part of SSB, but kept here for convenience
16+
ssb-$(CONFIG_SSB_PCIHOST) += b43_pci_bridge.o
17+
18+
obj-$(CONFIG_SSB) += ssb.o

drivers/ssb/b43_pci_bridge.c

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Broadcom 43xx PCI-SSB bridge module
3+
*
4+
* This technically is a seperate PCI driver module, but
5+
* because of its small size we include it in the SSB core
6+
* instead of creating a standalone module.
7+
*
8+
* Copyright 2007 Michael Buesch <[email protected]>
9+
*
10+
* Licensed under the GNU/GPL. See COPYING for details.
11+
*/
12+
13+
#include <linux/pci.h>
14+
#include <linux/ssb/ssb.h>
15+
16+
17+
static const struct pci_device_id b43_pci_bridge_tbl[] = {
18+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4301) },
19+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4307) },
20+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4311) },
21+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4312) },
22+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4318) },
23+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4319) },
24+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4320) },
25+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4321) },
26+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4324) },
27+
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4325) },
28+
{ 0, },
29+
};
30+
MODULE_DEVICE_TABLE(pci, b43_pci_bridge_tbl);
31+
32+
static struct pci_driver b43_pci_bridge_driver = {
33+
.name = "b43-pci-bridge",
34+
.id_table = b43_pci_bridge_tbl,
35+
};
36+
37+
38+
int __init b43_pci_ssb_bridge_init(void)
39+
{
40+
return ssb_pcihost_register(&b43_pci_bridge_driver);
41+
}
42+
43+
void __exit b43_pci_ssb_bridge_exit(void)
44+
{
45+
ssb_pcihost_unregister(&b43_pci_bridge_driver);
46+
}

0 commit comments

Comments
 (0)