#ifndef BRCMFMAC_SDIO_H
#define BRCMFMAC_SDIO_H
#include <linux/skbuff.h>
#include <linux/firmware.h>
#include "firmware.h"
#define SDIOD_FBR_SIZE …
#define SDIO_FUNC_ENABLE_1 …
#define SDIO_FUNC_ENABLE_2 …
#define SDIO_FUNC_READY_1 …
#define SDIO_FUNC_READY_2 …
#define INTR_STATUS_FUNC1 …
#define INTR_STATUS_FUNC2 …
#define REG_F0_REG_MASK …
#define REG_F1_MISC_MASK …
#define SDIO_CCCR_BRCM_CARDCAP …
#define SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT …
#define SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT …
#define SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC …
#define SDIO_CCCR_IEN_FUNC0 …
#define SDIO_CCCR_IEN_FUNC1 …
#define SDIO_CCCR_IEN_FUNC2 …
#define SDIO_CCCR_BRCM_CARDCTRL …
#define SDIO_CCCR_BRCM_CARDCTRL_WLANRESET …
#define SDIO_CCCR_BRCM_SEPINT …
#define SDIO_CCCR_BRCM_SEPINT_MASK …
#define SDIO_CCCR_BRCM_SEPINT_OE …
#define SDIO_CCCR_BRCM_SEPINT_ACT_HI …
#define SBSDIO_SPROM_CS …
#define SBSDIO_SPROM_INFO …
#define SBSDIO_SPROM_DATA_LOW …
#define SBSDIO_SPROM_DATA_HIGH …
#define SBSDIO_SPROM_ADDR_LOW …
#define SBSDIO_GPIO_SELECT …
#define SBSDIO_GPIO_OUT …
#define SBSDIO_GPIO_EN …
#define SBSDIO_WATERMARK …
#define SBSDIO_DEVICE_CTL …
#define SBSDIO_FUNC1_SBADDRLOW …
#define SBSDIO_FUNC1_SBADDRMID …
#define SBSDIO_FUNC1_SBADDRHIGH …
#define SBSDIO_FUNC1_FRAMECTRL …
#define SBSDIO_FUNC1_CHIPCLKCSR …
#define SBSDIO_FUNC1_SDIOPULLUP …
#define SBSDIO_FUNC1_WFRAMEBCLO …
#define SBSDIO_FUNC1_WFRAMEBCHI …
#define SBSDIO_FUNC1_RFRAMEBCLO …
#define SBSDIO_FUNC1_RFRAMEBCHI …
#define SBSDIO_FUNC1_MESBUSYCTRL …
#define SBSDIO_MESBUSY_RXFIFO_WM_MASK …
#define SBSDIO_MESBUSY_RXFIFO_WM_SHIFT …
#define SBSDIO_MESBUSYCTRL_ENAB …
#define SBSDIO_MESBUSYCTRL_ENAB_SHIFT …
#define SBSDIO_FUNC1_WAKEUPCTRL …
#define SBSDIO_FUNC1_WCTRL_ALPWAIT_MASK …
#define SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT …
#define SBSDIO_FUNC1_WCTRL_HTWAIT_MASK …
#define SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT …
#define SBSDIO_FUNC1_SLEEPCSR …
#define SBSDIO_FUNC1_SLEEPCSR_KSO_MASK …
#define SBSDIO_FUNC1_SLEEPCSR_KSO_SHIFT …
#define SBSDIO_FUNC1_SLEEPCSR_KSO_EN …
#define SBSDIO_FUNC1_SLEEPCSR_DEVON_MASK …
#define SBSDIO_FUNC1_SLEEPCSR_DEVON_SHIFT …
#define SBSDIO_FUNC1_MISC_REG_START …
#define SBSDIO_FUNC1_MISC_REG_LIMIT …
#define SBSDIO_SB_OFT_ADDR_MASK …
#define SBSDIO_SB_OFT_ADDR_LIMIT …
#define SBSDIO_SB_ACCESS_2_4B_FLAG …
#define SBSDIO_SBWINDOW_MASK …
#define SDIOH_READ …
#define SDIOH_WRITE …
#define SDIOH_DATA_FIX …
#define SDIOH_DATA_INC …
#define SUCCESS …
#define ERROR …
#define BRCMF_SDALIGN …
#define BRCMF_WD_POLL …
enum brcmf_sdiod_state { … };
struct brcmf_sdreg { … };
struct brcmf_sdio;
struct brcmf_sdiod_freezer;
struct brcmf_sdio_dev { … };
struct sdpcmd_regs { … };
int brcmf_sdiod_intr_register(struct brcmf_sdio_dev *sdiodev);
void brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev);
#define brcmf_sdiod_func0_rb(sdiodev, addr, r) …
#define brcmf_sdiod_func0_wb(sdiodev, addr, v, ret) …
#define brcmf_sdiod_readb(sdiodev, addr, r) …
#define brcmf_sdiod_writeb(sdiodev, addr, v, ret) …
u32 brcmf_sdiod_readl(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret);
void brcmf_sdiod_writel(struct brcmf_sdio_dev *sdiodev, u32 addr, u32 data,
int *ret);
int brcmf_sdiod_send_pkt(struct brcmf_sdio_dev *sdiodev,
struct sk_buff_head *pktq);
int brcmf_sdiod_send_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes);
int brcmf_sdiod_recv_pkt(struct brcmf_sdio_dev *sdiodev, struct sk_buff *pkt);
int brcmf_sdiod_recv_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes);
int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev,
struct sk_buff_head *pktq, uint totlen);
#define SDIO_REQ_4BYTE …
#define SDIO_REQ_FIXED …
int brcmf_sdiod_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
u8 *data, uint size);
int brcmf_sdiod_abort(struct brcmf_sdio_dev *sdiodev, struct sdio_func *func);
void brcmf_sdiod_sgtable_alloc(struct brcmf_sdio_dev *sdiodev);
void brcmf_sdiod_change_state(struct brcmf_sdio_dev *sdiodev,
enum brcmf_sdiod_state state);
bool brcmf_sdiod_freezing(struct brcmf_sdio_dev *sdiodev);
void brcmf_sdiod_try_freeze(struct brcmf_sdio_dev *sdiodev);
void brcmf_sdiod_freezer_count(struct brcmf_sdio_dev *sdiodev);
void brcmf_sdiod_freezer_uncount(struct brcmf_sdio_dev *sdiodev);
int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev);
int brcmf_sdiod_remove(struct brcmf_sdio_dev *sdiodev);
struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev);
void brcmf_sdio_remove(struct brcmf_sdio *bus);
void brcmf_sdio_isr(struct brcmf_sdio *bus, bool in_isr);
void brcmf_sdio_wd_timer(struct brcmf_sdio *bus, bool active);
void brcmf_sdio_wowl_config(struct device *dev, bool enabled);
int brcmf_sdio_sleep(struct brcmf_sdio *bus, bool sleep);
void brcmf_sdio_trigger_dpc(struct brcmf_sdio *bus);
#endif