1 This patch ports ssb to the 2.6.23 kernel.
3 Index: linux-2.6.23.16/drivers/ssb/driver_mipscore.c
4 ===================================================================
5 --- linux-2.6.23.16.orig/drivers/ssb/driver_mipscore.c 2008-03-21 17:33:28.000000000 +0100
6 +++ linux-2.6.23.16/drivers/ssb/driver_mipscore.c 2008-03-21 17:33:34.000000000 +0100
7 @@ -222,3 +222,5 @@ void ssb_mipscore_init(struct ssb_mipsco
8 ssb_mips_serial_init(mcore);
9 ssb_mips_flash_detect(mcore);
12 +EXPORT_SYMBOL(ssb_mips_irq);
13 Index: linux-2.6.23.16/include/linux/mod_devicetable.h
14 ===================================================================
15 --- linux-2.6.23.16.orig/include/linux/mod_devicetable.h 2008-03-21 17:33:28.000000000 +0100
16 +++ linux-2.6.23.16/include/linux/mod_devicetable.h 2008-03-21 17:33:34.000000000 +0100
17 @@ -352,4 +352,19 @@ struct parisc_device_id {
18 #define PA_HVERSION_ANY_ID 0xffff
19 #define PA_SVERSION_ANY_ID 0xffffffff
21 +/* SSB core, see drivers/ssb/ */
22 +struct ssb_device_id {
27 +#define SSB_DEVICE(_vendor, _coreid, _revision) \
28 + { .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
29 +#define SSB_DEVTABLE_END \
32 +#define SSB_ANY_VENDOR 0xFFFF
33 +#define SSB_ANY_ID 0xFFFF
34 +#define SSB_ANY_REV 0xFF
36 #endif /* LINUX_MOD_DEVICETABLE_H */
37 Index: linux-2.6.23.16/drivers/ssb/main.c
38 ===================================================================
39 --- linux-2.6.23.16.orig/drivers/ssb/main.c 2008-03-21 17:33:28.000000000 +0100
40 +++ linux-2.6.23.16/drivers/ssb/main.c 2008-03-21 17:33:34.000000000 +0100
41 @@ -321,14 +321,16 @@ static int ssb_bus_match(struct device *
45 -static int ssb_device_uevent(struct device *dev, struct kobj_uevent_env *env)
46 +static int ssb_device_uevent(struct device *dev, char **envp,
47 + int num_envp, char *buffer, int buffer_size)
49 struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
55 - return add_uevent_var(env,
56 + return add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
57 "MODALIAS=ssb:v%04Xid%04Xrev%02X",
58 ssb_dev->id.vendor, ssb_dev->id.coreid,
59 ssb_dev->id.revision);
60 Index: linux-2.6.23.16/drivers/ssb/scan.c
61 ===================================================================
62 --- linux-2.6.23.16.orig/drivers/ssb/scan.c 2008-03-21 17:33:28.000000000 +0100
63 +++ linux-2.6.23.16/drivers/ssb/scan.c 2008-03-21 17:33:34.000000000 +0100
64 @@ -391,12 +391,14 @@ int ssb_bus_scan(struct ssb_bus *bus,
65 if (bus->bustype == SSB_BUSTYPE_PCI) {
66 /* Ignore PCI cores on PCI-E cards.
67 * Ignore PCI-E cores on PCI cards. */
68 + //FIXME kernel 2.6.23 doesn't have is_pcie. Add this check back when updating to 2.6.24 or later.
69 if (dev->id.coreid == SSB_DEV_PCI) {
70 - if (bus->host_pci->is_pcie)
72 +//FIXME if (bus->host_pci->is_pcie)
75 - if (!bus->host_pci->is_pcie)
78 +//FIXME if (!bus->host_pci->is_pcie)
82 if (bus->pcicore.dev) {
83 Index: linux-2.6.23.16/drivers/ssb/driver_pcicore.c
84 ===================================================================
85 --- linux-2.6.23.16.orig/drivers/ssb/driver_pcicore.c 2008-03-21 17:33:28.000000000 +0100
86 +++ linux-2.6.23.16/drivers/ssb/driver_pcicore.c 2008-03-21 17:33:34.000000000 +0100
87 @@ -362,7 +362,7 @@ static int pcicore_is_in_hostmode(struct
91 - if (bus->sprom.r1.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
92 + if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
95 /* The 200-pin BCM4712 package does not bond out PCI. Even when