brcmfmac: add out of band interrupt support
authorFranky Lin <frankyl@broadcom.com>
Sat, 28 Apr 2012 01:56:59 +0000 (18:56 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 May 2012 01:53:55 +0000 (21:53 -0400)
commitba89bf1961bb991a5c6415bd8408a8cb61ee46dc
tree073ad2e1ae876eb9a37eb20d649bd02d3d0310f1
parente2f93cc3218853a3c00bd7c9f923bec65aaf9103
brcmfmac: add out of band interrupt support

Some sdio host controllers do not support real in band interrupt.
Software polling mode as a replacement is not fast enough for
high throughput and new features. Also some in band interrupts
do not support host wake up on embedded platform even when they
are real physical interrupts. Therefore out of band (oob)
interrupt mechanism is implemented for these scenarios.

To provide oob irq number and flags used for irq registration in
brcmfmac, a platform device contains irq resource must be
registered in board specific code.

Here is an example of platform device structure:
struct resource brcmf_sdio_res[] = {
{
.start = GPIO_BRCMF_SDIO_OOB_NUM,
.end = GPIO_BRCMF_SDIO_OOB_NUM,
.flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
}
};
struct platform_device brcmf_sdio_device = {
.name = "brcmf_sdio_pd",
.id = -1,
.num_resources = ARRAY_SIZE(brcmf_sdio_res),
.resource = brcmf_sdio_res,
};

Reviewed-by: pieter-paul giesberts <pieterpg@broadcom.com>
Reviewed-by: arend van spriel <arend@broadcom.com>
Signed-off-by: franky lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/Kconfig
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h