diff options
author | Albert Herranz <albert_herranz@yahoo.es> | 2009-09-08 13:30:12 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-09 11:19:00 -0400 |
commit | 24ea602e183ca20a7577ebe253323d0e5d0f9847 (patch) | |
tree | 9cd9c0b3832cac2f155e633fbed1ce2bf3331f9a /include/linux/ssb/ssb.h | |
parent | f020979d5d7c9816c071d0aedf60a889fa4fae40 (diff) |
ssb: Implement SDIO host bus support
Add support for communicating with a Sonics Silicon Backplane through a
SDIO interface, as found in the Nintendo Wii WLAN daughter card.
The Nintendo Wii WLAN card includes a custom Broadcom 4318 chip with
a SDIO host interface.
Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/ssb/ssb.h')
-rw-r--r-- | include/linux/ssb/ssb.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 17ffc1f84d76..3d0a9ff24f01 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -238,6 +238,7 @@ enum ssb_bustype { | |||
238 | SSB_BUSTYPE_SSB, /* This SSB bus is the system bus */ | 238 | SSB_BUSTYPE_SSB, /* This SSB bus is the system bus */ |
239 | SSB_BUSTYPE_PCI, /* SSB is connected to PCI bus */ | 239 | SSB_BUSTYPE_PCI, /* SSB is connected to PCI bus */ |
240 | SSB_BUSTYPE_PCMCIA, /* SSB is connected to PCMCIA bus */ | 240 | SSB_BUSTYPE_PCMCIA, /* SSB is connected to PCMCIA bus */ |
241 | SSB_BUSTYPE_SDIO, /* SSB is connected to SDIO bus */ | ||
241 | }; | 242 | }; |
242 | 243 | ||
243 | /* board_vendor */ | 244 | /* board_vendor */ |
@@ -270,8 +271,12 @@ struct ssb_bus { | |||
270 | 271 | ||
271 | /* The core in the basic address register window. (PCI bus only) */ | 272 | /* The core in the basic address register window. (PCI bus only) */ |
272 | struct ssb_device *mapped_device; | 273 | struct ssb_device *mapped_device; |
273 | /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */ | 274 | union { |
274 | u8 mapped_pcmcia_seg; | 275 | /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */ |
276 | u8 mapped_pcmcia_seg; | ||
277 | /* Current SSB base address window for SDIO. */ | ||
278 | u32 sdio_sbaddr; | ||
279 | }; | ||
275 | /* Lock for core and segment switching. | 280 | /* Lock for core and segment switching. |
276 | * On PCMCIA-host busses this is used to protect the whole MMIO access. */ | 281 | * On PCMCIA-host busses this is used to protect the whole MMIO access. */ |
277 | spinlock_t bar_lock; | 282 | spinlock_t bar_lock; |
@@ -282,6 +287,11 @@ struct ssb_bus { | |||
282 | struct pci_dev *host_pci; | 287 | struct pci_dev *host_pci; |
283 | /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */ | 288 | /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */ |
284 | struct pcmcia_device *host_pcmcia; | 289 | struct pcmcia_device *host_pcmcia; |
290 | /* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */ | ||
291 | struct sdio_func *host_sdio; | ||
292 | |||
293 | /* See enum ssb_quirks */ | ||
294 | unsigned int quirks; | ||
285 | 295 | ||
286 | #ifdef CONFIG_SSB_SPROM | 296 | #ifdef CONFIG_SSB_SPROM |
287 | /* Mutex to protect the SPROM writing. */ | 297 | /* Mutex to protect the SPROM writing. */ |
@@ -336,6 +346,11 @@ struct ssb_bus { | |||
336 | #endif /* DEBUG */ | 346 | #endif /* DEBUG */ |
337 | }; | 347 | }; |
338 | 348 | ||
349 | enum ssb_quirks { | ||
350 | /* SDIO connected card requires performing a read after writing a 32-bit value */ | ||
351 | SSB_QUIRK_SDIO_READ_AFTER_WRITE32 = (1 << 0), | ||
352 | }; | ||
353 | |||
339 | /* The initialization-invariants. */ | 354 | /* The initialization-invariants. */ |
340 | struct ssb_init_invariants { | 355 | struct ssb_init_invariants { |
341 | /* Versioning information about the PCB. */ | 356 | /* Versioning information about the PCB. */ |
@@ -366,6 +381,12 @@ extern int ssb_bus_pcmciabus_register(struct ssb_bus *bus, | |||
366 | struct pcmcia_device *pcmcia_dev, | 381 | struct pcmcia_device *pcmcia_dev, |
367 | unsigned long baseaddr); | 382 | unsigned long baseaddr); |
368 | #endif /* CONFIG_SSB_PCMCIAHOST */ | 383 | #endif /* CONFIG_SSB_PCMCIAHOST */ |
384 | #ifdef CONFIG_SSB_SDIOHOST | ||
385 | extern int ssb_bus_sdiobus_register(struct ssb_bus *bus, | ||
386 | struct sdio_func *sdio_func, | ||
387 | unsigned int quirks); | ||
388 | #endif /* CONFIG_SSB_SDIOHOST */ | ||
389 | |||
369 | 390 | ||
370 | extern void ssb_bus_unregister(struct ssb_bus *bus); | 391 | extern void ssb_bus_unregister(struct ssb_bus *bus); |
371 | 392 | ||