};
/* Private data for SDIO bus interaction */
-typedef struct dhd_bus {
+struct brcmf_bus {
struct brcmf_pub *drvr;
struct brcmf_sdio_card *card; /* Handle for sdio card calls */
const struct firmware *firmware;
const char *nv_name;
u32 fw_ptr;
-} dhd_bus_t;
+};
typedef volatile struct _sbconfig {
u32 PAD[2];
#define HOSTINTMASK (I_HMB_SW_MASK | I_CHIPACTIVE)
#ifdef SDTEST
-static void brcmf_sdbrcm_checkdied(dhd_bus_t *bus, void *pkt, uint seq);
-static void brcmf_sdbrcm_sdtest_set(dhd_bus_t *bus, bool start);
+static void brcmf_sdbrcm_checkdied(struct brcmf_bus *bus, void *pkt, uint seq);
+static void brcmf_sdbrcm_sdtest_set(struct brcmf_bus *bus, bool start);
#endif
#ifdef BCMDBG
static int brcmf_sdbrcm_bus_console_in(struct brcmf_pub *drvr,
unsigned char *msg, uint msglen);
-static int brcmf_sdbrcm_checkdied(dhd_bus_t *bus, u8 *data, uint size);
-static int brcmf_sdbrcm_mem_dump(dhd_bus_t *bus);
+static int brcmf_sdbrcm_checkdied(struct brcmf_bus *bus, u8 *data, uint size);
+static int brcmf_sdbrcm_mem_dump(struct brcmf_bus *bus);
#endif /* BCMDBG */
-static int brcmf_sdbrcm_download_state(dhd_bus_t *bus, bool enter);
+static int brcmf_sdbrcm_download_state(struct brcmf_bus *bus, bool enter);
-static void brcmf_sdbrcm_release(dhd_bus_t *bus);
-static void brcmf_sdbrcm_release_malloc(dhd_bus_t *bus);
+static void brcmf_sdbrcm_release(struct brcmf_bus *bus);
+static void brcmf_sdbrcm_release_malloc(struct brcmf_bus *bus);
static void brcmf_sdbrcm_disconnect(void *ptr);
static bool brcmf_sdbrcm_chipmatch(u16 chipid);
-static bool brcmf_sdbrcm_probe_attach(dhd_bus_t *bus, void *card,
+static bool brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card,
void *regsva, u16 devid);
-static bool brcmf_sdbrcm_probe_malloc(dhd_bus_t *bus, void *card);
-static bool brcmf_sdbrcm_probe_init(dhd_bus_t *bus, void *card);
-static void brcmf_sdbrcm_release_dongle(dhd_bus_t *bus);
+static bool brcmf_sdbrcm_probe_malloc(struct brcmf_bus *bus, void *card);
+static bool brcmf_sdbrcm_probe_init(struct brcmf_bus *bus, void *card);
+static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus);
static uint brcmf_process_nvram_vars(char *varbuf, uint len);
-static void brcmf_sdbrcm_setmemsize(struct dhd_bus *bus, int mem_size);
-static int brcmf_sdbrcm_send_buf(dhd_bus_t *bus, u32 addr, uint fn,
+static void brcmf_sdbrcm_setmemsize(struct brcmf_bus *bus, int mem_size);
+static int brcmf_sdbrcm_send_buf(struct brcmf_bus *bus, u32 addr, uint fn,
uint flags, u8 *buf, uint nbytes,
struct sk_buff *pkt,
brcmf_sdio_cmplt_fn_t complete, void *handle);
-static bool brcmf_sdbrcm_download_firmware(struct dhd_bus *bus, void *card);
-static int _brcmf_sdbrcm_download_firmware(struct dhd_bus *bus);
+static bool brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus, void *card);
+static int _brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus);
-static int brcmf_sdbrcm_download_code_file(struct dhd_bus *bus);
-static int brcmf_sdbrcm_download_nvram(struct dhd_bus *bus);
+static int brcmf_sdbrcm_download_code_file(struct brcmf_bus *bus);
+static int brcmf_sdbrcm_download_nvram(struct brcmf_bus *bus);
static void
brcmf_sdbrcm_chip_disablecore(struct brcmf_sdio_card *card, u32 corebase);
-static int brcmf_sdbrcm_chip_attach(struct dhd_bus *bus, void *regs);
+static int brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, void *regs);
static void
brcmf_sdbrcm_chip_resetcore(struct brcmf_sdio_card *card, u32 corebase);
-static void brcmf_sdbrcm_sdiod_drive_strength_init(struct dhd_bus *bus,
+static void brcmf_sdbrcm_sdiod_drive_strength_init(struct brcmf_bus *bus,
u32 drivestrength);
-static void brcmf_sdbrcm_chip_detach(struct dhd_bus *bus);
-static void brcmf_sdbrcm_wait_for_event(dhd_bus_t *bus, bool *lockvar);
-static void brcmf_sdbrcm_wait_event_wakeup(dhd_bus_t *bus);
+static void brcmf_sdbrcm_chip_detach(struct brcmf_bus *bus);
+static void brcmf_sdbrcm_wait_for_event(struct brcmf_bus *bus, bool *lockvar);
+static void brcmf_sdbrcm_wait_event_wakeup(struct brcmf_bus *bus);
static void brcmf_sdbrcm_watchdog(unsigned long data);
static int brcmf_sdbrcm_watchdog_thread(void *data);
static int brcmf_sdbrcm_dpc_thread(void *data);
static void brcmf_sdbrcm_dpc_tasklet(unsigned long data);
-static void brcmf_sdbrcm_sched_dpc(dhd_bus_t *bus);
-static void brcmf_sdbrcm_sdlock(dhd_bus_t *bus);
-static void brcmf_sdbrcm_sdunlock(dhd_bus_t *bus);
-static int brcmf_sdbrcm_get_image(char *buf, int len, struct dhd_bus *bus);
+static void brcmf_sdbrcm_sched_dpc(struct brcmf_bus *bus);
+static void brcmf_sdbrcm_sdlock(struct brcmf_bus *bus);
+static void brcmf_sdbrcm_sdunlock(struct brcmf_bus *bus);
+static int brcmf_sdbrcm_get_image(char *buf, int len, struct brcmf_bus *bus);
/* Packet free applicable unconditionally for sdio and sdspi.
* Conditional if bufpool was present for gspi bus.
*/
-static void brcmf_sdbrcm_pktfree2(dhd_bus_t *bus, struct sk_buff *pkt)
+static void brcmf_sdbrcm_pktfree2(struct brcmf_bus *bus, struct sk_buff *pkt)
{
if ((bus->bus != SPI_BUS) || bus->usebufpool)
brcmu_pkt_buf_free_skb(pkt);
}
-static void brcmf_sdbrcm_setmemsize(struct dhd_bus *bus, int mem_size)
+static void brcmf_sdbrcm_setmemsize(struct brcmf_bus *bus, int mem_size)
{
s32 min_size = DONGLE_MIN_MEMSIZE;
/* Restrict the memsize to user specified limit */
bus->ramsize = brcmf_dongle_memsize;
}
-static int brcmf_sdbrcm_set_siaddr_window(dhd_bus_t *bus, u32 address)
+static int brcmf_sdbrcm_set_siaddr_window(struct brcmf_bus *bus, u32 address)
{
int err = 0;
brcmf_sdcard_cfg_write(bus->card, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRLOW,
}
/* Turn backplane clock on or off */
-static int brcmf_sdbrcm_htclk(dhd_bus_t *bus, bool on, bool pendok)
+static int brcmf_sdbrcm_htclk(struct brcmf_bus *bus, bool on, bool pendok)
{
int err;
u8 clkctl, clkreq, devctl;
}
/* Change idle/active SD state */
-static int brcmf_sdbrcm_sdclk(dhd_bus_t *bus, bool on)
+static int brcmf_sdbrcm_sdclk(struct brcmf_bus *bus, bool on)
{
DHD_TRACE(("%s: Enter\n", __func__));
}
/* Transition SD and backplane clock readiness */
-static int brcmf_sdbrcm_clkctl(dhd_bus_t *bus, uint target, bool pendok)
+static int brcmf_sdbrcm_clkctl(struct brcmf_bus *bus, uint target, bool pendok)
{
#ifdef BCMDBG
uint oldstate = bus->clkstate;
return 0;
}
-int brcmf_sdbrcm_bussleep(dhd_bus_t *bus, bool sleep)
+int brcmf_sdbrcm_bussleep(struct brcmf_bus *bus, bool sleep)
{
struct brcmf_sdio_card *card = bus->card;
struct sdpcmd_regs *regs = bus->regs;
/* Writes a HW/SW header into the packet and sends it. */
/* Assumes: (a) header space already there, (b) caller holds lock */
-static int brcmf_sdbrcm_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
+static int brcmf_sdbrcm_txpkt(struct brcmf_bus *bus, struct sk_buff *pkt, uint chan,
bool free_pkt)
{
int ret;
return ret;
}
-int brcmf_sdbrcm_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt)
+int brcmf_sdbrcm_bus_txdata(struct brcmf_bus *bus, struct sk_buff *pkt)
{
int ret = -EBADE;
uint datalen, prec;
return ret;
}
-static uint brcmf_sdbrcm_sendfromq(dhd_bus_t *bus, uint maxframes)
+static uint brcmf_sdbrcm_sendfromq(struct brcmf_bus *bus, uint maxframes)
{
struct sk_buff *pkt;
u32 intstatus = 0;
}
int
-brcmf_sdbrcm_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
+brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen)
{
u8 *frame;
u16 len;
return ret ? -EIO : 0;
}
-int brcmf_sdbrcm_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
+int brcmf_sdbrcm_bus_rxctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen)
{
int timeleft;
uint rxlen = 0;
void brcmf_sdbrcm_bus_dump(struct brcmf_pub *drvr, struct brcmu_strbuf *strbuf)
{
- dhd_bus_t *bus = drvr->bus;
+ struct brcmf_bus *bus = drvr->bus;
brcmu_bprintf(strbuf, "Bus SDIO structure:\n");
brcmu_bprintf(strbuf,
bus->sleeping);
}
-void dhd_bus_clearcounts(struct brcmf_pub *drvr)
+void brcmf_bus_clearcounts(struct brcmf_pub *drvr)
{
- dhd_bus_t *bus = (dhd_bus_t *) drvr->bus;
+ struct brcmf_bus *bus = (struct brcmf_bus *) drvr->bus;
bus->intrcount = bus->lastintrs = bus->spurious = bus->regfails = 0;
bus->rxrtx = bus->rx_toolong = bus->rxc_errors = 0;
}
#ifdef SDTEST
-static int brcmf_sdbrcm_pktgen_get(dhd_bus_t *bus, u8 *arg)
+static int brcmf_sdbrcm_pktgen_get(struct brcmf_bus *bus, u8 *arg)
{
brcmf_pktgen_t pktgen;
return 0;
}
-static int brcmf_sdbrcm_pktgen_set(dhd_bus_t *bus, u8 *arg)
+static int brcmf_sdbrcm_pktgen_set(struct brcmf_bus *bus, u8 *arg)
{
brcmf_pktgen_t pktgen;
uint oldcnt, oldmode;
#endif /* SDTEST */
static int
-brcmf_sdbrcm_membytes(dhd_bus_t *bus, bool write, u32 address, u8 *data,
+brcmf_sdbrcm_membytes(struct brcmf_bus *bus, bool write, u32 address, u8 *data,
uint size)
{
int bcmerror = 0;
}
#ifdef BCMDBG
-static int brcmf_sdbrcm_readshared(dhd_bus_t *bus, struct sdpcm_shared *sh)
+static int brcmf_sdbrcm_readshared(struct brcmf_bus *bus, struct sdpcm_shared *sh)
{
u32 addr;
int rv;
return 0;
}
-static int brcmf_sdbrcm_checkdied(dhd_bus_t *bus, u8 *data, uint size)
+static int brcmf_sdbrcm_checkdied(struct brcmf_bus *bus, u8 *data, uint size)
{
int bcmerror = 0;
uint msize = 512;
return bcmerror;
}
-static int brcmf_sdbrcm_mem_dump(dhd_bus_t *bus)
+static int brcmf_sdbrcm_mem_dump(struct brcmf_bus *bus)
{
int ret = 0;
int size; /* Full mem size */
#define CONSOLE_LINE_MAX 192
-static int brcmf_sdbrcm_readconsole(dhd_bus_t *bus)
+static int brcmf_sdbrcm_readconsole(struct brcmf_bus *bus)
{
struct dhd_console *c = &bus->console;
u8 line[CONSOLE_LINE_MAX], ch;
}
#endif /* BCMDBG */
-int brcmf_sdbrcm_downloadvars(dhd_bus_t *bus, void *arg, int len)
+int brcmf_sdbrcm_downloadvars(struct brcmf_bus *bus, void *arg, int len)
{
int bcmerror = 0;
}
static int
-brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid,
+brcmf_sdbrcm_doiovar(struct brcmf_bus *bus, const struct brcmu_iovar *vi, u32 actionid,
const char *name, void *params, int plen, void *arg, int len,
int val_size)
{
return bcmerror;
}
-static int brcmf_sdbrcm_write_vars(dhd_bus_t *bus)
+static int brcmf_sdbrcm_write_vars(struct brcmf_bus *bus)
{
int bcmerror = 0;
u32 varsize;
return bcmerror;
}
-static int brcmf_sdbrcm_download_state(dhd_bus_t *bus, bool enter)
+static int brcmf_sdbrcm_download_state(struct brcmf_bus *bus, bool enter)
{
uint retries;
u32 regdata;
brcmf_sdbrcm_bus_iovar_op(struct brcmf_pub *drvr, const char *name,
void *params, int plen, void *arg, int len, bool set)
{
- dhd_bus_t *bus = drvr->bus;
+ struct brcmf_bus *bus = drvr->bus;
const struct brcmu_iovar *vi = NULL;
int bcmerror = 0;
int val_size;
return bcmerror;
}
-void brcmf_sdbrcm_bus_stop(struct dhd_bus *bus, bool enforce_mutex)
+void brcmf_sdbrcm_bus_stop(struct brcmf_bus *bus, bool enforce_mutex)
{
u32 local_hostintmask;
u8 saveclk;
int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr, bool enforce_mutex)
{
- dhd_bus_t *bus = drvr->bus;
+ struct brcmf_bus *bus = drvr->bus;
struct brcmf_timeout tmo;
uint retries = 0;
u8 ready, enable;
return ret;
}
-static void brcmf_sdbrcm_rxfail(dhd_bus_t *bus, bool abort, bool rtx)
+static void brcmf_sdbrcm_rxfail(struct brcmf_bus *bus, bool abort, bool rtx)
{
struct brcmf_sdio_card *card = bus->card;
struct sdpcmd_regs *regs = bus->regs;
}
static void
-brcmf_sdbrcm_read_control(dhd_bus_t *bus, u8 *hdr, uint len, uint doff)
+brcmf_sdbrcm_read_control(struct brcmf_bus *bus, u8 *hdr, uint len, uint doff)
{
struct brcmf_sdio_card *card = bus->card;
uint rdlen, pad;
brcmf_os_ioctl_resp_wake(bus->drvr);
}
-static u8 brcmf_sdbrcm_rxglom(dhd_bus_t *bus, u8 rxseq)
+static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq)
{
u16 dlen, totlen;
u8 *dptr, num = 0;
/* Return true if there may be more frames to read */
static uint
-brcmf_sdbrcm_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
+brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)
{
struct brcmf_sdio_card *card = bus->card;
return rxcount;
}
-static u32 brcmf_sdbrcm_hostmail(dhd_bus_t *bus)
+static u32 brcmf_sdbrcm_hostmail(struct brcmf_bus *bus)
{
struct sdpcmd_regs *regs = bus->regs;
u32 intstatus = 0;
return intstatus;
}
-static bool brcmf_sdbrcm_dpc(dhd_bus_t *bus)
+static bool brcmf_sdbrcm_dpc(struct brcmf_bus *bus)
{
struct brcmf_sdio_card *card = bus->card;
struct sdpcmd_regs *regs = bus->regs;
void brcmf_sdbrcm_isr(void *arg)
{
- dhd_bus_t *bus = (dhd_bus_t *) arg;
+ struct brcmf_bus *bus = (struct brcmf_bus *) arg;
struct brcmf_sdio_card *card;
DHD_TRACE(("%s: Enter\n", __func__));
}
#ifdef SDTEST
-static void brcmf_sdbrcm_pktgen_init(dhd_bus_t *bus)
+static void brcmf_sdbrcm_pktgen_init(struct brcmf_bus *bus)
{
/* Default to specified length, or full range */
if (brcmf_pktgen_len) {
bus->pktgen_stop = 1;
}
-static void brcmf_sdbrcm_pktgen(dhd_bus_t *bus)
+static void brcmf_sdbrcm_pktgen(struct brcmf_bus *bus)
{
struct sk_buff *pkt;
u8 *data;
}
}
-static void brcmf_sdbrcm_sdtest_set(dhd_bus_t *bus, bool start)
+static void brcmf_sdbrcm_sdtest_set(struct brcmf_bus *bus, bool start)
{
struct sk_buff *pkt;
u8 *data;
}
static void
-brcmf_sdbrcm_checkdied(dhd_bus_t *bus, struct sk_buff *pkt, uint seq)
+brcmf_sdbrcm_checkdied(struct brcmf_bus *bus, struct sk_buff *pkt, uint seq)
{
u8 *data;
uint pktlen;
extern bool brcmf_sdbrcm_bus_watchdog(struct brcmf_pub *drvr)
{
- dhd_bus_t *bus;
+ struct brcmf_bus *bus;
DHD_TIMER(("%s: Enter\n", __func__));
static int brcmf_sdbrcm_bus_console_in(struct brcmf_pub *drvr,
unsigned char *msg, uint msglen)
{
- dhd_bus_t *bus = drvr->bus;
+ struct brcmf_bus *bus = drvr->bus;
u32 addr, val;
int rv;
struct sk_buff *pkt;
void *card)
{
int ret;
- dhd_bus_t *bus;
+ struct brcmf_bus *bus;
/* Init global variables at run-time, not as part of the declaration.
* This is required to support init/de-init of the driver.
}
/* Allocate private bus interface state */
- bus = kzalloc(sizeof(dhd_bus_t), GFP_ATOMIC);
+ bus = kzalloc(sizeof(struct brcmf_bus), GFP_ATOMIC);
if (!bus) {
- DHD_ERROR(("%s: kmalloc of dhd_bus_t failed\n", __func__));
+ DHD_ERROR(("%s: kmalloc of struct dhd_bus failed\n", __func__));
goto fail;
}
bus->card = card;
}
static bool
-brcmf_sdbrcm_probe_attach(struct dhd_bus *bus, void *card, void *regsva,
+brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card, void *regsva,
u16 devid)
{
u8 clkctl = 0;
return false;
}
-static bool brcmf_sdbrcm_probe_malloc(dhd_bus_t *bus, void *card)
+static bool brcmf_sdbrcm_probe_malloc(struct brcmf_bus *bus, void *card)
{
DHD_TRACE(("%s: Enter\n", __func__));
return false;
}
-static bool brcmf_sdbrcm_probe_init(dhd_bus_t *bus, void *card)
+static bool brcmf_sdbrcm_probe_init(struct brcmf_bus *bus, void *card)
{
s32 fnum;
}
static bool
-brcmf_sdbrcm_download_firmware(struct dhd_bus *bus, void *card)
+brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus, void *card)
{
bool ret;
}
/* Detach and free everything */
-static void brcmf_sdbrcm_release(dhd_bus_t *bus)
+static void brcmf_sdbrcm_release(struct brcmf_bus *bus)
{
DHD_TRACE(("%s: Enter\n", __func__));
DHD_TRACE(("%s: Disconnected\n", __func__));
}
-static void brcmf_sdbrcm_release_malloc(dhd_bus_t *bus)
+static void brcmf_sdbrcm_release_malloc(struct brcmf_bus *bus)
{
DHD_TRACE(("%s: Enter\n", __func__));
bus->databuf = NULL;
}
-static void brcmf_sdbrcm_release_dongle(dhd_bus_t *bus)
+static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus)
{
DHD_TRACE(("%s: Enter\n", __func__));
static void brcmf_sdbrcm_disconnect(void *ptr)
{
- dhd_bus_t *bus = (dhd_bus_t *)ptr;
+ struct brcmf_bus *bus = (struct brcmf_bus *)ptr;
DHD_TRACE(("%s: Enter\n", __func__));
brcmf_sdbrcm_disconnect
};
-int dhd_bus_register(void)
+int brcmf_bus_register(void)
{
DHD_TRACE(("%s: Enter\n", __func__));
return brcmf_sdio_register(&dhd_sdio);
}
-void dhd_bus_unregister(void)
+void brcmf_bus_unregister(void)
{
DHD_TRACE(("%s: Enter\n", __func__));
brcmf_sdio_unregister();
}
-static int brcmf_sdbrcm_download_code_file(struct dhd_bus *bus)
+static int brcmf_sdbrcm_download_code_file(struct brcmf_bus *bus)
{
int offset = 0;
uint len;
return buf_len;
}
-static int brcmf_sdbrcm_download_nvram(struct dhd_bus *bus)
+static int brcmf_sdbrcm_download_nvram(struct brcmf_bus *bus)
{
uint len;
char *memblock = NULL;
return ret;
}
-static int _brcmf_sdbrcm_download_firmware(struct dhd_bus *bus)
+static int _brcmf_sdbrcm_download_firmware(struct brcmf_bus *bus)
{
int bcmerror = -1;
static int
-brcmf_sdbrcm_send_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags,
+brcmf_sdbrcm_send_buf(struct brcmf_bus *bus, u32 addr, uint fn, uint flags,
u8 *buf, uint nbytes, struct sk_buff *pkt,
brcmf_sdio_cmplt_fn_t complete, void *handle)
{
handle);
}
-uint dhd_bus_chip(struct dhd_bus *bus)
+uint brcmf_bus_chip(struct brcmf_bus *bus)
{
ASSERT(bus->ci != NULL);
return bus->ci->chip;
}
-void *dhd_bus_pub(struct dhd_bus *bus)
+void *brcmf_bus_drvr(struct brcmf_bus *bus)
{
return bus->drvr;
}
-void *dhd_bus_txq(struct dhd_bus *bus)
+void *brcmf_bus_txq(struct brcmf_bus *bus)
{
return &bus->txq;
}
-uint dhd_bus_hdrlen(struct dhd_bus *bus)
+uint brcmf_bus_hdrlen(struct brcmf_bus *bus)
{
return SDPCM_HDRLEN;
}
int brcmf_bus_devreset(struct brcmf_pub *drvr, u8 flag)
{
int bcmerror = 0;
- dhd_bus_t *bus;
+ struct brcmf_bus *bus;
bus = drvr->bus;
}
static int
-brcmf_sdbrcm_chip_attach(struct dhd_bus *bus, void *regs)
+brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, void *regs)
{
struct chip_info *ci;
int err;
#define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu))
static void
-brcmf_sdbrcm_sdiod_drive_strength_init(struct dhd_bus *bus, u32 drivestrength) {
+brcmf_sdbrcm_sdiod_drive_strength_init(struct brcmf_bus *bus, u32 drivestrength) {
struct sdiod_drive_str *str_tab = NULL;
u32 str_mask = 0;
u32 str_shift = 0;
}
static void
-brcmf_sdbrcm_chip_detach(struct dhd_bus *bus)
+brcmf_sdbrcm_chip_detach(struct brcmf_bus *bus)
{
DHD_TRACE(("%s: Enter\n", __func__));
}
static void
-brcmf_sdbrcm_wait_for_event(dhd_bus_t *bus, bool *lockvar)
+brcmf_sdbrcm_wait_for_event(struct brcmf_bus *bus, bool *lockvar)
{
brcmf_sdbrcm_sdunlock(bus);
wait_event_interruptible_timeout(bus->ctrl_wait,
}
static void
-brcmf_sdbrcm_wait_event_wakeup(dhd_bus_t *bus)
+brcmf_sdbrcm_wait_event_wakeup(struct brcmf_bus *bus)
{
if (waitqueue_active(&bus->ctrl_wait))
wake_up_interruptible(&bus->ctrl_wait);
static int
brcmf_sdbrcm_watchdog_thread(void *data)
{
- dhd_bus_t *bus = (dhd_bus_t *)data;
+ struct brcmf_bus *bus = (struct brcmf_bus *)data;
/* This thread doesn't need any user-level access,
* so get rid of all our resources
static void
brcmf_sdbrcm_watchdog(unsigned long data)
{
- dhd_bus_t *bus = (dhd_bus_t *)data;
+ struct brcmf_bus *bus = (struct brcmf_bus *)data;
if (brcmf_watchdog_prio >= 0) {
if (bus->watchdog_tsk)
}
void
-brcmf_sdbrcm_wd_timer(struct dhd_bus *bus, uint wdtick)
+brcmf_sdbrcm_wd_timer(struct brcmf_bus *bus, uint wdtick)
{
static uint save_ms;
static int brcmf_sdbrcm_dpc_thread(void *data)
{
- dhd_bus_t *bus = (dhd_bus_t *) data;
+ struct brcmf_bus *bus = (struct brcmf_bus *) data;
/* This thread doesn't need any user-level access,
* so get rid of all our resources
static void brcmf_sdbrcm_dpc_tasklet(unsigned long data)
{
- dhd_bus_t *bus = (dhd_bus_t *) data;
+ struct brcmf_bus *bus = (struct brcmf_bus *) data;
/* Call bus dpc unless it indicated down (then clean stop) */
if (bus->drvr->busstate != DHD_BUS_DOWN) {
brcmf_sdbrcm_bus_stop(bus, true);
}
-static void brcmf_sdbrcm_sched_dpc(dhd_bus_t *bus)
+static void brcmf_sdbrcm_sched_dpc(struct brcmf_bus *bus)
{
if (bus->dpc_tsk) {
complete(&bus->dpc_wait);
tasklet_schedule(&bus->tasklet);
}
-static void brcmf_sdbrcm_sdlock(dhd_bus_t *bus)
+static void brcmf_sdbrcm_sdlock(struct brcmf_bus *bus)
{
if (bus->threads_only)
down(&bus->sdsem);
spin_lock_bh(&bus->sdlock);
}
-static void brcmf_sdbrcm_sdunlock(dhd_bus_t *bus)
+static void brcmf_sdbrcm_sdunlock(struct brcmf_bus *bus)
{
if (bus->threads_only)
up(&bus->sdsem);
spin_unlock_bh(&bus->sdlock);
}
-static int brcmf_sdbrcm_get_image(char *buf, int len, struct dhd_bus *bus)
+static int brcmf_sdbrcm_get_image(char *buf, int len, struct brcmf_bus *bus)
{
if (bus->firmware->size < bus->fw_ptr + len)
len = bus->firmware->size - bus->fw_ptr;