aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/patches-2.6.23/930-ssb_fixes.patch
blob: d3c7cfd2b7c3b48f573bb4affb33dae5fc7dfec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
This patch ports ssb to the 2.6.23 kernel.

--- a/drivers/ssb/driver_mipscore.c
+++ b/drivers/ssb/driver_mipscore.c
@@ -223,3 +223,5 @@ void ssb_mipscore_init(struct ssb_mipsco
 	ssb_mips_serial_init(mcore);
 	ssb_mips_flash_detect(mcore);
 }
+
+EXPORT_SYMBOL(ssb_mips_irq);
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -352,4 +352,19 @@ struct parisc_device_id {
 #define PA_HVERSION_ANY_ID	0xffff
 #define PA_SVERSION_ANY_ID	0xffffffff
 
+/* SSB core, see drivers/ssb/ */
+struct ssb_device_id {
+	__u16	vendor;
+	__u16	coreid;
+	__u8	revision;
+};
+#define SSB_DEVICE(_vendor, _coreid, _revision)  \
+	{ .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
+#define SSB_DEVTABLE_END  \
+	{ 0, },
+
+#define SSB_ANY_VENDOR		0xFFFF
+#define SSB_ANY_ID		0xFFFF
+#define SSB_ANY_REV		0xFF
+
 #endif /* LINUX_MOD_DEVICETABLE_H */
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -321,14 +321,16 @@ static int ssb_bus_match(struct device *
 	return 0;
 }
 
-static int ssb_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int ssb_device_uevent(struct device *dev, char **envp,
+			     int num_envp, char *buffer, int buffer_size)
 {
 	struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
+	int i = 0, len = 0;
 
 	if (!dev)
 		return -ENODEV;
 
-	return add_uevent_var(env,
+	return add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
 			     "MODALIAS=ssb:v%04Xid%04Xrev%02X",
 			     ssb_dev->id.vendor, ssb_dev->id.coreid,
 			     ssb_dev->id.revision);
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -391,12 +391,14 @@ int ssb_bus_scan(struct ssb_bus *bus,
 			if (bus->bustype == SSB_BUSTYPE_PCI) {
 				/* Ignore PCI cores on PCI-E cards.
 				 * Ignore PCI-E cores on PCI cards. */
+				//FIXME kernel 2.6.23 doesn't have is_pcie. Add this check back when updating to 2.6.24 or later.
 				if (dev->id.coreid == SSB_DEV_PCI) {
-					if (bus->host_pci->is_pcie)
-						continue;
+//FIXME					if (bus->host_pci->is_pcie)
+//FIXME						continue;
 				} else {
-					if (!bus->host_pci->is_pcie)
-						continue;
+					continue; //FIXME
+//FIXME					if (!bus->host_pci->is_pcie)
+//FIXME						continue;
 				}
 			}
 			if (bus->pcicore.dev) {
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -362,7 +362,7 @@ static int pcicore_is_in_hostmode(struct
 	    chipid_top != 0x5300)
 		return 0;
 
-	if (bus->sprom.r1.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
+	if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
 		return 0;
 
 	/* The 200-pin BCM4712 package does not bond out PCI. Even when