summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/patches-2.6.23/930-ssb_fixes.patch
blob: 975a22a68b16d53cbf1f9cc598a48e84606461a0 (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
86
87
88
89
90
91
92
93
94
95
This patch ports ssb to the 2.6.23 kernel.

Index: linux-2.6.23.16/drivers/ssb/driver_mipscore.c
===================================================================
--- linux-2.6.23.16.orig/drivers/ssb/driver_mipscore.c	2008-02-19 13:45:04.000000000 +0100
+++ linux-2.6.23.16/drivers/ssb/driver_mipscore.c	2008-02-19 13:45:07.000000000 +0100
@@ -222,3 +222,5 @@ void ssb_mipscore_init(struct ssb_mipsco
 	ssb_mips_serial_init(mcore);
 	ssb_mips_flash_detect(mcore);
 }
+
+EXPORT_SYMBOL(ssb_mips_irq);
Index: linux-2.6.23.16/include/linux/mod_devicetable.h
===================================================================
--- linux-2.6.23.16.orig/include/linux/mod_devicetable.h	2008-02-19 13:45:04.000000000 +0100
+++ linux-2.6.23.16/include/linux/mod_devicetable.h	2008-02-19 13:45:07.000000000 +0100
@@ -340,4 +340,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 */
Index: linux-2.6.23.16/drivers/ssb/main.c
===================================================================
--- linux-2.6.23.16.orig/drivers/ssb/main.c	2008-02-19 13:45:04.000000000 +0100
+++ linux-2.6.23.16/drivers/ssb/main.c	2008-02-19 13:45:07.000000000 +0100
@@ -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);
Index: linux-2.6.23.16/drivers/ssb/scan.c
===================================================================
--- linux-2.6.23.16.orig/drivers/ssb/scan.c	2008-02-19 13:45:04.000000000 +0100
+++ linux-2.6.23.16/drivers/ssb/scan.c	2008-02-19 13:45:07.000000000 +0100
@@ -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) {
Index: linux-2.6.23.16/drivers/ssb/driver_pcicore.c
===================================================================
--- linux-2.6.23.16.orig/drivers/ssb/driver_pcicore.c	2008-02-19 13:45:04.000000000 +0100
+++ linux-2.6.23.16/drivers/ssb/driver_pcicore.c	2008-02-19 13:45:07.000000000 +0100
@@ -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