mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-11-20 07:24:36 +01:00
12b5a779b9
SVN-Revision: 10637
96 lines
3.6 KiB
Diff
96 lines
3.6 KiB
Diff
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-03-21 17:33:28.000000000 +0100
|
|
+++ linux-2.6.23.16/drivers/ssb/driver_mipscore.c 2008-03-21 17:33:34.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-03-21 17:33:28.000000000 +0100
|
|
+++ linux-2.6.23.16/include/linux/mod_devicetable.h 2008-03-21 17:33:34.000000000 +0100
|
|
@@ -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 */
|
|
Index: linux-2.6.23.16/drivers/ssb/main.c
|
|
===================================================================
|
|
--- linux-2.6.23.16.orig/drivers/ssb/main.c 2008-03-21 17:33:28.000000000 +0100
|
|
+++ linux-2.6.23.16/drivers/ssb/main.c 2008-03-21 17:33:34.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-03-21 17:33:28.000000000 +0100
|
|
+++ linux-2.6.23.16/drivers/ssb/scan.c 2008-03-21 17:33:34.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-03-21 17:33:28.000000000 +0100
|
|
+++ linux-2.6.23.16/drivers/ssb/driver_pcicore.c 2008-03-21 17:33:34.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
|