staging: brcm80211: absorb brcmf_sdioh_interrupt_register into brcmf_sdcard_intr_reg
brcmfmac wrapper function cleanup Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
632ea5ee37
commit
8e8d49663f
@@ -21,6 +21,7 @@
|
|||||||
#include <linux/pci_ids.h>
|
#include <linux/pci_ids.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/completion.h>
|
#include <linux/completion.h>
|
||||||
|
#include <linux/mmc/sdio_func.h>
|
||||||
#include <linux/mmc/card.h>
|
#include <linux/mmc/card.h>
|
||||||
|
|
||||||
#include <defs.h>
|
#include <defs.h>
|
||||||
@@ -162,9 +163,28 @@ exit:
|
|||||||
return bcmerror;
|
return bcmerror;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void brcmf_sdioh_irqhandler(struct sdio_func *func)
|
||||||
|
{
|
||||||
|
struct brcmf_sdio_dev *sdiodev = dev_get_drvdata(&func->card->dev);
|
||||||
|
|
||||||
|
BRCMF_TRACE(("brcmf: ***IRQHandler\n"));
|
||||||
|
|
||||||
|
sdio_release_host(func);
|
||||||
|
|
||||||
|
brcmf_sdbrcm_isr(sdiodev->bus);
|
||||||
|
|
||||||
|
sdio_claim_host(func);
|
||||||
|
}
|
||||||
|
|
||||||
int brcmf_sdcard_intr_reg(struct brcmf_sdio_dev *sdiodev)
|
int brcmf_sdcard_intr_reg(struct brcmf_sdio_dev *sdiodev)
|
||||||
{
|
{
|
||||||
return brcmf_sdioh_interrupt_register(sdiodev);
|
BRCMF_TRACE(("%s: Entering\n", __func__));
|
||||||
|
|
||||||
|
sdio_claim_host(sdiodev->func[1]);
|
||||||
|
sdio_claim_irq(sdiodev->func[1], brcmf_sdioh_irqhandler);
|
||||||
|
sdio_release_host(sdiodev->func[1]);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int brcmf_sdcard_intr_dereg(struct brcmf_sdio_dev *sdiodev)
|
int brcmf_sdcard_intr_dereg(struct brcmf_sdio_dev *sdiodev)
|
||||||
|
@@ -44,8 +44,6 @@
|
|||||||
#define SDIO_DEVICE_ID_BROADCOM_4329 0x4329
|
#define SDIO_DEVICE_ID_BROADCOM_4329 0x4329
|
||||||
#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4329) */
|
#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4329) */
|
||||||
|
|
||||||
static void brcmf_sdioh_irqhandler(struct sdio_func *func);
|
|
||||||
static void brcmf_sdioh_irqhandler_f2(struct sdio_func *func);
|
|
||||||
static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr);
|
static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr);
|
||||||
static int brcmf_ops_sdio_probe(struct sdio_func *func,
|
static int brcmf_ops_sdio_probe(struct sdio_func *func,
|
||||||
const struct sdio_device_id *id);
|
const struct sdio_device_id *id);
|
||||||
@@ -192,28 +190,6 @@ void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Configure callback to client when we receive client interrupt */
|
|
||||||
extern int
|
|
||||||
brcmf_sdioh_interrupt_register(struct brcmf_sdio_dev *sdiodev)
|
|
||||||
{
|
|
||||||
BRCMF_TRACE(("%s: Entering\n", __func__));
|
|
||||||
|
|
||||||
/* register and unmask irq */
|
|
||||||
if (sdiodev->func[2]) {
|
|
||||||
sdio_claim_host(sdiodev->func[2]);
|
|
||||||
sdio_claim_irq(sdiodev->func[2], brcmf_sdioh_irqhandler_f2);
|
|
||||||
sdio_release_host(sdiodev->func[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sdiodev->func[1]) {
|
|
||||||
sdio_claim_host(sdiodev->func[1]);
|
|
||||||
sdio_claim_irq(sdiodev->func[1], brcmf_sdioh_irqhandler);
|
|
||||||
sdio_release_host(sdiodev->func[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int brcmf_sdioh_interrupt_deregister(struct brcmf_sdio_dev *sdiodev)
|
int brcmf_sdioh_interrupt_deregister(struct brcmf_sdio_dev *sdiodev)
|
||||||
{
|
{
|
||||||
BRCMF_TRACE(("%s: Entering\n", __func__));
|
BRCMF_TRACE(("%s: Entering\n", __func__));
|
||||||
@@ -662,25 +638,6 @@ brcmf_sdioh_card_regread(struct brcmf_sdio_dev *sdiodev, int func, u32 regaddr,
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void brcmf_sdioh_irqhandler(struct sdio_func *func)
|
|
||||||
{
|
|
||||||
struct brcmf_sdio_dev *sdiodev = dev_get_drvdata(&func->card->dev);
|
|
||||||
|
|
||||||
BRCMF_TRACE(("brcmf: ***IRQHandler\n"));
|
|
||||||
|
|
||||||
sdio_release_host(func);
|
|
||||||
|
|
||||||
brcmf_sdbrcm_isr(sdiodev->bus);
|
|
||||||
|
|
||||||
sdio_claim_host(func);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* interrupt handler for F2 (dummy handler) */
|
|
||||||
static void brcmf_sdioh_irqhandler_f2(struct sdio_func *func)
|
|
||||||
{
|
|
||||||
BRCMF_TRACE(("brcmf: ***IRQHandlerF2\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int brcmf_ops_sdio_probe(struct sdio_func *func,
|
static int brcmf_ops_sdio_probe(struct sdio_func *func,
|
||||||
const struct sdio_device_id *id)
|
const struct sdio_device_id *id)
|
||||||
{
|
{
|
||||||
|
@@ -247,7 +247,6 @@ extern u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_dev *sdiodev);
|
|||||||
extern int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev);
|
extern int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev);
|
||||||
extern void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev);
|
extern void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev);
|
||||||
|
|
||||||
extern int brcmf_sdioh_interrupt_register(struct brcmf_sdio_dev *sdiodev);
|
|
||||||
extern int brcmf_sdioh_interrupt_deregister(struct brcmf_sdio_dev *sdiodev);
|
extern int brcmf_sdioh_interrupt_deregister(struct brcmf_sdio_dev *sdiodev);
|
||||||
|
|
||||||
/* read or write one byte using cmd52 */
|
/* read or write one byte using cmd52 */
|
||||||
|
Reference in New Issue
Block a user