scan.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) | scan.c (24ea602e183ca20a7577ebe253323d0e5d0f9847) |
---|---|
1/* 2 * Sonics Silicon Backplane 3 * Bus scanning 4 * 5 * Copyright (C) 2005-2007 Michael Buesch <mb@bu3sch.de> 6 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de> 7 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net> 8 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> --- 161 unchanged lines hidden (view full) --- 170 break; 171 case SSB_BUSTYPE_PCMCIA: 172 if (offset >= 0x800) { 173 ssb_pcmcia_switch_segment(bus, 1); 174 offset -= 0x800; 175 } else 176 ssb_pcmcia_switch_segment(bus, 0); 177 break; | 1/* 2 * Sonics Silicon Backplane 3 * Bus scanning 4 * 5 * Copyright (C) 2005-2007 Michael Buesch <mb@bu3sch.de> 6 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de> 7 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net> 8 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> --- 161 unchanged lines hidden (view full) --- 170 break; 171 case SSB_BUSTYPE_PCMCIA: 172 if (offset >= 0x800) { 173 ssb_pcmcia_switch_segment(bus, 1); 174 offset -= 0x800; 175 } else 176 ssb_pcmcia_switch_segment(bus, 0); 177 break; |
178 case SSB_BUSTYPE_SDIO: 179 offset += current_coreidx * SSB_CORE_SIZE; 180 return ssb_sdio_scan_read32(bus, offset); |
|
178 } 179 return readl(bus->mmio + offset); 180} 181 182static int scan_switchcore(struct ssb_bus *bus, u8 coreidx) 183{ 184 switch (bus->bustype) { 185 case SSB_BUSTYPE_SSB: 186 break; 187 case SSB_BUSTYPE_PCI: 188 return ssb_pci_switch_coreidx(bus, coreidx); 189 case SSB_BUSTYPE_PCMCIA: 190 return ssb_pcmcia_switch_coreidx(bus, coreidx); | 181 } 182 return readl(bus->mmio + offset); 183} 184 185static int scan_switchcore(struct ssb_bus *bus, u8 coreidx) 186{ 187 switch (bus->bustype) { 188 case SSB_BUSTYPE_SSB: 189 break; 190 case SSB_BUSTYPE_PCI: 191 return ssb_pci_switch_coreidx(bus, coreidx); 192 case SSB_BUSTYPE_PCMCIA: 193 return ssb_pcmcia_switch_coreidx(bus, coreidx); |
194 case SSB_BUSTYPE_SDIO: 195 return ssb_sdio_scan_switch_coreidx(bus, coreidx); |
|
191 } 192 return 0; 193} 194 195void ssb_iounmap(struct ssb_bus *bus) 196{ 197 switch (bus->bustype) { 198 case SSB_BUSTYPE_SSB: 199 case SSB_BUSTYPE_PCMCIA: 200 iounmap(bus->mmio); 201 break; 202 case SSB_BUSTYPE_PCI: 203#ifdef CONFIG_SSB_PCIHOST 204 pci_iounmap(bus->host_pci, bus->mmio); 205#else 206 SSB_BUG_ON(1); /* Can't reach this code. */ 207#endif 208 break; | 196 } 197 return 0; 198} 199 200void ssb_iounmap(struct ssb_bus *bus) 201{ 202 switch (bus->bustype) { 203 case SSB_BUSTYPE_SSB: 204 case SSB_BUSTYPE_PCMCIA: 205 iounmap(bus->mmio); 206 break; 207 case SSB_BUSTYPE_PCI: 208#ifdef CONFIG_SSB_PCIHOST 209 pci_iounmap(bus->host_pci, bus->mmio); 210#else 211 SSB_BUG_ON(1); /* Can't reach this code. */ 212#endif 213 break; |
214 case SSB_BUSTYPE_SDIO: 215 break; |
|
209 } 210 bus->mmio = NULL; 211 bus->mapped_device = NULL; 212} 213 214static void __iomem *ssb_ioremap(struct ssb_bus *bus, 215 unsigned long baseaddr) 216{ --- 8 unchanged lines hidden (view full) --- 225 break; 226 case SSB_BUSTYPE_PCI: 227#ifdef CONFIG_SSB_PCIHOST 228 mmio = pci_iomap(bus->host_pci, 0, ~0UL); 229#else 230 SSB_BUG_ON(1); /* Can't reach this code. */ 231#endif 232 break; | 216 } 217 bus->mmio = NULL; 218 bus->mapped_device = NULL; 219} 220 221static void __iomem *ssb_ioremap(struct ssb_bus *bus, 222 unsigned long baseaddr) 223{ --- 8 unchanged lines hidden (view full) --- 232 break; 233 case SSB_BUSTYPE_PCI: 234#ifdef CONFIG_SSB_PCIHOST 235 mmio = pci_iomap(bus->host_pci, 0, ~0UL); 236#else 237 SSB_BUG_ON(1); /* Can't reach this code. */ 238#endif 239 break; |
240 case SSB_BUSTYPE_SDIO: 241 /* Nothing to ioremap in the SDIO case, just fake it */ 242 mmio = (void __iomem *)baseaddr; 243 break; |
|
233 } 234 235 return mmio; 236} 237 238static int we_support_multiple_80211_cores(struct ssb_bus *bus) 239{ 240 /* More than one 802.11 core is only supported by special chips. --- 184 unchanged lines hidden --- | 244 } 245 246 return mmio; 247} 248 249static int we_support_multiple_80211_cores(struct ssb_bus *bus) 250{ 251 /* More than one 802.11 core is only supported by special chips. --- 184 unchanged lines hidden --- |