1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 15:25:20 +02:00
openwrt-xburst/target/linux/generic-2.6/patches-2.6.23/930-ssb_fixes.patch
kaloz 51b1102e98 refresh generic 2.6.23 patches in upstream style
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11366 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-06-05 17:01:00 +00:00

86 lines
2.4 KiB
Diff

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 @@
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 @@
#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 @@
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 @@
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 @@
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