static u32 scan_read32(struct ssb_bus *bus, u8 current_coreidx, u16 offset) { u32 lo, hi; switch (bus->bustype) { case SSB_BUSTYPE_SSB: offset += current_coreidx * SSB_CORE_SIZE; break; case SSB_BUSTYPE_PCI: break; case SSB_BUSTYPE_PCMCIA: if (offset >= 0x800) { ssb_pcmcia_switch_segment(bus, 1); offset -= 0x800; } else ssb_pcmcia_switch_segment(bus, 0); lo = readw(bus->mmio + offset); hi = readw(bus->mmio + offset + 2); return lo | (hi << 16); case SSB_BUSTYPE_SDIO: offset += current_coreidx * SSB_CORE_SIZE; return ssb_sdio_scan_read32(bus, offset); } return readl(bus->mmio + offset); }
static u32 scan_read32(struct ssb_bus *bus, u8 current_coreidx, u16 offset) { switch (bus->bustype) { case SSB_BUSTYPE_SSB: offset += current_coreidx * SSB_CORE_SIZE; break; case SSB_BUSTYPE_PCI: break; case SSB_BUSTYPE_PCMCIA: if (offset >= 0x800) { ssb_pcmcia_switch_segment(bus, 1); offset -= 0x800; } else ssb_pcmcia_switch_segment(bus, 0); break; } return readl(bus->mmio + offset); }