1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-09 10:39:21 +02:00
openwrt-xburst/target/linux/generic-2.6/patches-2.6.23/930-ssb_fixes.patch

86 lines
2.5 KiB
Diff
Raw Normal View History

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