int brcmf_sdio_probe(struct device *dev)
{
struct sdio_hc *sdhc = NULL;
- unsigned long regs = 0;
+ u32 regs = 0;
struct brcmf_sdio_card *card = NULL;
int irq = 0;
u32 vendevid;
}
sdhc->dev = (void *)dev;
- card = brcmf_sdcard_attach((void *)0, (void **)®s, irq);
+ card = brcmf_sdcard_attach((void *)0, ®s, irq);
if (!card) {
SDLX_MSG(("%s: attach failed\n", __func__));
goto err;
/* try to attach to the target device */
sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
- 0, 0, 0, 0, (void *)regs, card);
+ 0, 0, 0, 0, regs, card);
if (!sdhc->ch) {
SDLX_MSG(("%s: device attach failed\n", __func__));
goto err;
* is supposed to give
* us something we can work with.
*/
- ASSERT(((u32) (pkt->data) & DMA_ALIGN_MASK) == 0);
+ ASSERT(((ulong) (pkt->data) & DMA_ALIGN_MASK) == 0);
if ((write) && (!fifo)) {
err_ret = sdio_memcpy_toio(gInstance->func[func], addr,
memcpy(buffer, mypkt->data, buflen_u);
brcmu_pkt_buf_free_skb(mypkt);
- } else if (((u32) (pkt->data) & DMA_ALIGN_MASK) != 0) {
+ } else if (((ulong) (pkt->data) & DMA_ALIGN_MASK) != 0) {
/* Case 2: We have a packet, but it is unaligned. */
/* In this case, we cannot have a chain. */
static void brcmf_sdbrcm_disconnect(void *ptr);
static bool brcmf_sdbrcm_chipmatch(u16 chipid);
static bool brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card,
- void *regsva, u16 devid);
+ u32 regsva, u16 devid);
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 void
brcmf_sdbrcm_chip_disablecore(struct brcmf_sdio_card *card, u32 corebase);
-static int brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, void *regs);
+static int brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, u32 regs);
static void
brcmf_sdbrcm_chip_resetcore(struct brcmf_sdio_card *card, u32 corebase);
}
static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
- u16 slot, u16 func, uint bustype, void *regsva,
+ u16 slot, u16 func, uint bustype, u32 regsva,
void *card)
{
int ret;
DHD_INFO(("%s: venid 0x%04x devid 0x%04x\n", __func__, venid, devid));
/* We make assumptions about address window mappings */
- ASSERT((unsigned long)regsva == SI_ENUM_BASE);
+ ASSERT(regsva == SI_ENUM_BASE);
/* SDIO car passes venid and devid based on CIS parsing -- but
* low-power start
}
static bool
-brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card, void *regsva,
+brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card, u32 regsva,
u16 devid)
{
u8 clkctl = 0;
/* Attempt to re-attach & download */
if (brcmf_sdbrcm_probe_attach(bus, bus->card,
- (u32 *) SI_ENUM_BASE,
- bus->cl_devid)) {
+ SI_ENUM_BASE,
+ bus->cl_devid)) {
/* Attempt to download binary to the dongle */
if (brcmf_sdbrcm_probe_init(bus, bus->card)) {
/* Re-init bus, enable F2 transfer */
static int
brcmf_sdbrcm_chip_recognition(struct brcmf_sdio_card *card,
- struct chip_info *ci, void *regs)
+ struct chip_info *ci, u32 regs)
{
u32 regdata;
* For different chiptypes or old sdio hosts w/o chipcommon,
* other ways of recognition should be added here.
*/
- ci->cccorebase = (u32)regs;
+ ci->cccorebase = regs;
regdata = brcmf_sdcard_reg_read(card,
CORE_CC_REG(ci->cccorebase, chipid), 4);
ci->chip = regdata & CID_ID_MASK;
}
static int
-brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, void *regs)
+brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, u32 regs)
{
struct chip_info *ci;
int err;
* implementation may maintain a single "default" handle (e.g. the first or
* most recent one) to enable single-instance implementations to pass NULL.
*/
-extern struct brcmf_sdio_card *brcmf_sdcard_attach(void *cfghdl, void **regsva,
- uint irq);
+extern struct brcmf_sdio_card*
+brcmf_sdcard_attach(void *cfghdl, u32 *regsva, uint irq);
/* Detach - freeup resources allocated in attach */
extern int brcmf_sdcard_detach(struct brcmf_sdio_card *card);
struct brcmf_sdioh_driver {
/* attach to device */
void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot,
- u16 func, uint bustype, void *regsva, void *param);
+ u16 func, uint bustype, u32 regsva, void *param);
/* detach from device */
void (*detach) (void *ch);
};