From: George Kashperko <george@xxxxxxxxxxx> SB- and AI-style buses read irq flags from different locations. SB-ones read them from TPSFLAG whereas AI-ones from core oob register. In order to support both SB- and AI-style buses transparently irq flag accessor is implemented as ssb mips core op. Signed-off-by: George Kashperko <george@xxxxxxxxxxx> --- drivers/ssb/driver_mipscore.c | 6 ++++++ include/linux/ssb/ssb_driver_mips.h | 3 +++ 2 files changed, 9 insertions(+) --- linux-wireless-testing.orig/drivers/ssb/driver_mipscore.c 2011-02-08 00:22:45.000000000 +0200 +++ linux-wireless-testing/drivers/ssb/driver_mipscore.c 2011-02-17 14:05:27.000000000 +0200 @@ -49,6 +49,11 @@ static const u32 ipsflag_irq_shift[] = { static inline u32 ssb_irqflag(struct ssb_device *dev) { + return dev->bus->mipscore.irqflag(dev); +} + +static u32 ssb_irqflag_sb(struct ssb_device *dev) +{ u32 tpsflag = ssb_read32(dev, SSB_TPSFLAG); if (tpsflag) return ssb_read32(dev, SSB_TPSFLAG) & SSB_TPSFLAG_BPFLAG; @@ -241,6 +246,7 @@ void ssb_mipscore_init(struct ssb_mipsco ssb_dprintk(KERN_INFO PFX "Initializing MIPS core...\n"); bus = mcore->dev->bus; + bus->mipscore.irqflag = ssb_irqflag_sb; hz = ssb_clockspeed(bus); if (!hz) hz = 100000000; --- linux-wireless-testing.orig/include/linux/ssb/ssb_driver_mips.h 2011-02-08 00:22:50.000000000 +0200 +++ linux-wireless-testing/include/linux/ssb/ssb_driver_mips.h 2011-02-17 14:05:27.000000000 +0200 @@ -23,6 +23,9 @@ struct ssb_mipscore { u8 flash_buswidth; u32 flash_window; u32 flash_window_size; + + /* mips core implementation-specific irq flag helper */ + u32 (*irqflag)(struct ssb_device *dev); }; extern void ssb_mipscore_init(struct ssb_mipscore *mcore); -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html