Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236227
b: refs/heads/master
c: 3c9d4c3
h: refs/heads/master
i:
  236225: eaa9b30
  236223: 2a5ac4f
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Mar 3, 2011
1 parent 487ca4b commit 40747f9
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 121 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 537ebbbef024c662aa0a350cfc6d5ff45211244c
refs/heads/master: 3c9d4c3749a712fa370289b54f40b157c336c8f3
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/brcmfmac/bcmsdbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef void (*sdioh_cb_fn_t) (void *);
* The handler shall be provided by all subsequent calls. No local cache
* cfghdl points to the starting address of pci device mapped memory
*/
extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *cfghdl, uint irq);
extern sdioh_info_t *sdioh_attach(void *cfghdl, uint irq);
extern SDIOH_API_RC sdioh_detach(sdioh_info_t *si);
extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si,
sdioh_cb_fn_t fn, void *argh);
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct bcmsdh_info {
bool init_success; /* underlying driver successfully attached */
void *sdioh; /* handler for sdioh */
u32 vendevid; /* Target Vendor and Device ID on SD bus */
struct osl_info *osh;
bool regfail; /* Save status of last
reg_read/reg_write call */
u32 sbwad; /* Save backplane window address */
Expand All @@ -55,8 +54,7 @@ void bcmsdh_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable)
}
#endif

bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl,
void **regsva, uint irq)
bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq)
{
bcmsdh_info_t *bcmsdh;

Expand All @@ -69,13 +67,12 @@ bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl,
/* save the handler locally */
l_bcmsdh = bcmsdh;

bcmsdh->sdioh = sdioh_attach(osh, cfghdl, irq);
bcmsdh->sdioh = sdioh_attach(cfghdl, irq);
if (!bcmsdh->sdioh) {
bcmsdh_detach(bcmsdh);
return NULL;
}

bcmsdh->osh = osh;
bcmsdh->init_success = true;

*regsva = (u32 *) SI_ENUM_BASE;
Expand Down
21 changes: 4 additions & 17 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ struct bcmsdh_hc {
#else
struct pci_dev *dev; /* pci device handle */
#endif /* BCMPLATFORM_BUS */
struct osl_info *osh;
void *regs; /* SDIO Host Controller address */
bcmsdh_info_t *sdh; /* SDIO Host Controller handle */
void *ch;
Expand Down Expand Up @@ -142,7 +141,6 @@ static
#endif /* BCMLXSDMMC */
int bcmsdh_probe(struct device *dev)
{
struct osl_info *osh = NULL;
bcmsdh_hc_t *sdhc = NULL;
unsigned long regs = 0;
bcmsdh_info_t *sdh = NULL;
Expand Down Expand Up @@ -177,28 +175,21 @@ int bcmsdh_probe(struct device *dev)
}
#endif /* defined(OOB_INTR_ONLY) */
/* allocate SDIO Host Controller state info */
osh = osl_attach(dev, PCI_BUS);
if (!osh) {
SDLX_MSG(("%s: osl_attach failed\n", __func__));
goto err;
}
sdhc = kzalloc(sizeof(bcmsdh_hc_t), GFP_ATOMIC);
if (!sdhc) {
SDLX_MSG(("%s: out of memory\n", __func__));
goto err;
}
sdhc->osh = osh;

sdhc->dev = (void *)dev;

#ifdef BCMLXSDMMC
sdh = bcmsdh_attach(osh, (void *)0, (void **)&regs, irq);
sdh = bcmsdh_attach((void *)0, (void **)&regs, irq);
if (!sdh) {
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
goto err;
}
#else
sdh = bcmsdh_attach(osh, (void *)r->start, (void **)&regs, irq);
sdh = bcmsdh_attach((void *)r->start, (void **)&regs, irq);
if (!sdh) {
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
goto err;
Expand All @@ -220,7 +211,7 @@ int bcmsdh_probe(struct device *dev)

/* try to attach to the target device */
sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
0, 0, 0, 0, (void *)regs, NULL, sdh);
0, 0, 0, 0, (void *)regs, sdh);
if (!sdhc->ch) {
SDLX_MSG(("%s: device attach failed\n", __func__));
goto err;
Expand All @@ -235,8 +226,7 @@ int bcmsdh_probe(struct device *dev)
bcmsdh_detach(sdhc->sdh);
kfree(sdhc);
}
if (osh)
osl_detach(osh);

return -ENODEV;
}

Expand All @@ -246,7 +236,6 @@ static
int bcmsdh_remove(struct device *dev)
{
bcmsdh_hc_t *sdhc, *prev;
struct osl_info *osh;

sdhc = sdhcinfo;
drvinfo.detach(sdhc->ch);
Expand All @@ -269,9 +258,7 @@ int bcmsdh_remove(struct device *dev)
}

/* release SDIO Host Controller info */
osh = sdhc->osh;
kfree(sdhc);
osl_detach(osh);

#if !defined(BCMLXSDMMC)
dev_set_drvdata(dev, NULL);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
/*
* Public entry points & extern's
*/
extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq)
sdioh_info_t *sdioh_attach(void *bar0, uint irq)
{
sdioh_info_t *sd;
int err_ret;
Expand All @@ -128,7 +128,6 @@ extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq)
sd_err(("sdioh_attach: out of memory\n"));
return NULL;
}
sd->osh = osh;
if (sdioh_sdmmc_osinit(sd) != 0) {
sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__));
kfree(sd);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
*/

/* Register mapping routines */
extern u32 *sdioh_sdmmc_reg_map(struct osl_info *osh, s32 addr, int size);
extern void sdioh_sdmmc_reg_unmap(struct osl_info *osh, s32 addr, int size);
extern u32 *sdioh_sdmmc_reg_map(s32 addr, int size);
extern void sdioh_sdmmc_reg_unmap(s32 addr, int size);

/* Interrupt (de)registration routines */
extern int sdioh_sdmmc_register_irq(sdioh_info_t *sd, uint irq);
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ enum dhd_bus_state {
/* Common structure for module and instance linkage */
typedef struct dhd_pub {
/* Linkage ponters */
struct osl_info *osh; /* OSL handle */
struct dhd_bus *bus; /* Bus module handle */
struct dhd_prot *prot; /* Protocol module handle */
struct dhd_info *info; /* Info module handle */
Expand Down Expand Up @@ -213,16 +212,12 @@ typedef struct dhd_if_event {
* Exported from dhd OS modules (dhd_linux/dhd_ndis)
*/

/* To allow osl_attach/detach calls from os-independent modules */
struct osl_info *dhd_osl_attach(void *pdev, uint bustype);
void dhd_osl_detach(struct osl_info *osh);

/* Indication from bus module regarding presence/insertion of dongle.
* Return dhd_pub_t pointer, used as handle to OS module in later calls.
* Returned structure should have bus and prot pointers filled in.
* bus_hdrlen specifies required headroom for bus module header.
*/
extern dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus,
extern dhd_pub_t *dhd_attach(struct dhd_bus *bus,
uint bus_hdrlen);
extern int dhd_net_attach(dhd_pub_t *dhdp, int idx);

Expand Down
14 changes: 1 addition & 13 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,16 +1858,6 @@ static int dhd_open(struct net_device *net)
return ret;
}

struct osl_info *dhd_osl_attach(void *pdev, uint bustype)
{
return osl_attach(pdev, bustype);
}

void dhd_osl_detach(struct osl_info *osh)
{
osl_detach(osh);
}

int
dhd_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name,
u8 *mac_addr, u32 flags, u8 bssidx)
Expand Down Expand Up @@ -1921,8 +1911,7 @@ void dhd_del_if(dhd_info_t *dhd, int ifidx)
up(&dhd->sysioc_sem);
}

dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus,
uint bus_hdrlen)
dhd_pub_t *dhd_attach(struct dhd_bus *bus, uint bus_hdrlen)
{
dhd_info_t *dhd = NULL;
struct net_device *net;
Expand Down Expand Up @@ -1955,7 +1944,6 @@ dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus,
* Save the dhd_info into the priv
*/
memcpy(netdev_priv(net), &dhd, sizeof(dhd));
dhd->pub.osh = osh;

/* Set network interface name if it was provided as module parameter */
if (iface_name[0]) {
Expand Down
Loading

0 comments on commit 40747f9

Please sign in to comment.