/hardware/broadcom/wlan/bcm4329/src/include/ |
D | linux_osl.h | 53 #define OSL_PCMCIA_READ_ATTR(osh, offset, buf, size) \ argument 54 osl_pcmcia_read_attr((osh), (offset), (buf), (size)) 55 #define OSL_PCMCIA_WRITE_ATTR(osh, offset, buf, size) \ argument 56 osl_pcmcia_write_attr((osh), (offset), (buf), (size)) 57 extern void osl_pcmcia_read_attr(osl_t *osh, uint offset, void *buf, int size); 58 extern void osl_pcmcia_write_attr(osl_t *osh, uint offset, void *buf, int size); 61 #define OSL_PCI_READ_CONFIG(osh, offset, size) \ argument 62 osl_pci_read_config((osh), (offset), (size)) 63 #define OSL_PCI_WRITE_CONFIG(osh, offset, size, val) \ argument 64 osl_pci_write_config((osh), (offset), (size), (val)) [all …]
|
D | osl.h | 44 #define SET_REG(osh, r, mask, val) W_REG((osh), (r), ((R_REG((osh), r) & ~(mask)) | (val))) argument 47 #define AND_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) & (v)) argument 51 #define OR_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) | (v)) argument
|
D | bcmsdh_sdmmc.h | 65 osl_t *osh; /* osh handler */ member 110 extern uint32 *sdioh_sdmmc_reg_map(osl_t *osh, int32 addr, int size); 111 extern void sdioh_sdmmc_reg_unmap(osl_t *osh, int32 addr, int size);
|
D | bcmsdspi.h | 61 osl_t *osh; /* osh handler */ member 118 extern uint32 *spi_reg_map(osl_t *osh, uintptr addr, int size); 119 extern void spi_reg_unmap(osl_t *osh, uintptr addr, int size);
|
D | hndpmu.h | 31 extern void si_pmu_otp_power(si_t *sih, osl_t *osh, bool on); 32 extern void si_sdiod_drive_strength_init(si_t *sih, osl_t *osh, uint32 drivestrength);
|
D | bcmsdstd.h | 97 osl_t *osh; /* osh handler */ member 166 extern uint32 *sdstd_reg_map(osl_t *osh, int32 addr, int size); 167 extern void sdstd_reg_unmap(osl_t *osh, int32 addr, int size);
|
D | bcmsdh.h | 50 extern bcmsdh_info_t *bcmsdh_attach(osl_t *osh, void *cfghdl, void **regsva, uint irq); 53 extern int bcmsdh_detach(osl_t *osh, void *sdh); 181 uint16 func, uint bustype, void * regsva, osl_t * osh,
|
D | bcmutils.h | 151 extern void pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir); 153 extern void pktq_flush(osl_t *osh, struct pktq *pq, bool dir); 184 extern uint pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf); 185 extern uint pktfrombuf(osl_t *osh, void *p, uint offset, int len, uchar *buf); 186 extern uint pkttotlen(osl_t *osh, void *p); 187 extern void *pktlast(osl_t *osh, void *p); 188 extern uint pktsegcnt(osl_t *osh, void *p);
|
/hardware/broadcom/wlan/bcm4329/src/shared/ |
D | linux_osl.c | 150 osl_t *osh; in osl_attach() local 154 osh = kmalloc(sizeof(osl_t), flags); in osl_attach() 155 ASSERT(osh); in osl_attach() 157 bzero(osh, sizeof(osl_t)); in osl_attach() 162 osh->magic = OS_HANDLE_MAGIC; in osl_attach() 163 osh->malloced = 0; in osl_attach() 164 osh->failed = 0; in osl_attach() 165 osh->dbgmem_list = NULL; in osl_attach() 166 osh->pdev = pdev; in osl_attach() 167 osh->pub.pkttag = pkttag; in osl_attach() [all …]
|
D | aiutils.c | 122 erombase = R_REG(sii->osh, &cc->eromptr); in ai_scan() 134 OSL_PCI_WRITE_CONFIG(sii->osh, PCI_BAR0_WIN, 4, erombase); in ai_scan() 422 return (R_REG(sii->osh, &ai->oobselouta30) & 0x1f); in ai_flag() 435 W_REG(sii->osh, (uint32 *)((uint8 *)ai+offset), val); in ai_write_wrap_reg() 470 return (((R_REG(sii->osh, &ai->ioctrl) & (SICF_FGC | SICF_CLOCK_EN)) == SICF_CLOCK_EN) && in ai_iscoreup() 471 ((R_REG(sii->osh, &ai->resetctrl) & AIRC_RESET) == 0)); in ai_iscoreup() 549 w = (R_REG(sii->osh, r) & ~mask) | val; in ai_corereg() 550 W_REG(sii->osh, r, w); in ai_corereg() 554 w = R_REG(sii->osh, r); in ai_corereg() 580 if (R_REG(sii->osh, &ai->resetctrl) & AIRC_RESET) in ai_core_disable() [all …]
|
D | siutils.c | 50 static si_info_t *si_doattach(si_info_t *sii, uint devid, osl_t *osh, void *regs, 73 si_attach(uint devid, osl_t *osh, void *regs, in si_attach() argument 79 if ((sii = MALLOC(osh, sizeof (si_info_t))) == NULL) { in si_attach() 80 SI_ERROR(("si_attach: malloc failed! malloced %d bytes\n", MALLOCED(osh))); in si_attach() 84 if (si_doattach(sii, devid, osh, regs, bustype, sdh, vars, varsz) == NULL) { in si_attach() 86 MFREE(osh, sii->common_info, sizeof(si_common_info_t)); in si_attach() 87 MFREE(osh, sii, sizeof(si_info_t)); in si_attach() 103 si_kattach(osl_t *osh) in si_kattach() argument 110 if (si_doattach(&ksii, BCM4710_DEVICE_ID, osh, regs, in si_kattach() 112 osh != SI_OSH ? &ksii.vars : NULL, in si_kattach() [all …]
|
D | sbutils.c | 77 OSL_PCMCIA_WRITE_ATTR(sii->osh, MEM_SEG, &tmp, 1); in sb_read_sbreg() 81 val = R_REG(sii->osh, sbr); in sb_read_sbreg() 85 OSL_PCMCIA_WRITE_ATTR(sii->osh, MEM_SEG, &tmp, 1); in sb_read_sbreg() 109 OSL_PCMCIA_WRITE_ATTR(sii->osh, MEM_SEG, &tmp, 1); in sb_write_sbreg() 115 dummy = R_REG(sii->osh, sbr); in sb_write_sbreg() 116 W_REG(sii->osh, ((volatile uint16 *)sbr + 1), (uint16)((v >> 16) & 0xffff)); in sb_write_sbreg() 117 dummy = R_REG(sii->osh, sbr); in sb_write_sbreg() 118 W_REG(sii->osh, (volatile uint16 *)sbr, (uint16)(v & 0xffff)); in sb_write_sbreg() 120 dummy = R_REG(sii->osh, sbr); in sb_write_sbreg() 121 W_REG(sii->osh, (volatile uint16 *)sbr, (uint16)(v & 0xffff)); in sb_write_sbreg() [all …]
|
D | bcmutils.c | 51 pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf) in pktcopy() argument 59 for (; p && offset; p = PKTNEXT(osh, p)) { in pktcopy() 60 if (offset < (uint)PKTLEN(osh, p)) in pktcopy() 62 offset -= PKTLEN(osh, p); in pktcopy() 69 for (; p && len; p = PKTNEXT(osh, p)) { in pktcopy() 70 n = MIN((uint)PKTLEN(osh, p) - offset, (uint)len); in pktcopy() 71 bcopy(PKTDATA(osh, p) + offset, buf, n); in pktcopy() 83 pktfrombuf(osl_t *osh, void *p, uint offset, int len, uchar *buf) in pktfrombuf() argument 88 for (; p && offset; p = PKTNEXT(osh, p)) { in pktfrombuf() 89 if (offset < (uint)PKTLEN(osh, p)) in pktfrombuf() [all …]
|
D | hndpmu.c | 70 si_sdiod_drive_strength_init(si_t *sih, osl_t *osh, uint32 drivestrength) in si_sdiod_drive_strength_init() argument 118 W_REG(osh, &cc->chipcontrol_addr, 1); in si_sdiod_drive_strength_init() 119 cc_data_temp = R_REG(osh, &cc->chipcontrol_data); in si_sdiod_drive_strength_init() 123 W_REG(osh, &cc->chipcontrol_data, cc_data_temp); in si_sdiod_drive_strength_init()
|
D | siutils_priv.h | 69 void *osh; /* osl os handle */ member 183 extern bool sb_pci_fastpmecap(struct osl_info *osh); 189 extern si_t *ai_attach(uint pcidev, osl_t *osh, void *regs, uint bustype, 191 extern si_t *ai_kattach(osl_t *osh);
|
/hardware/broadcom/wlan/bcm4329/src/bcmsdio/sys/ |
D | bcmpcispi.c | 50 #define SPIPCI_ANDREG(osh, r, v) SPIPCI_WREG(osh, (r), (SPIPCI_RREG(osh, r) & (v))) argument 51 #define SPIPCI_ORREG(osh, r, v) SPIPCI_WREG(osh, (r), (SPIPCI_RREG(osh, r) | (v))) argument 59 osl_t *osh; /* osh handle */ member 70 osl_t *osh; in spi_hw_attach() local 75 osh = sd->osh; in spi_hw_attach() 77 if ((si = (spih_info_t *)MALLOC(osh, sizeof(spih_info_t))) == NULL) { in spi_hw_attach() 78 sd_err(("%s: out of memory, malloced %d bytes\n", __FUNCTION__, MALLOCED(osh))); in spi_hw_attach() 86 si->osh = sd->osh; in spi_hw_attach() 87 si->rev = OSL_PCI_READ_CONFIG(sd->osh, PCI_CFG_REV, 4) & 0xFF; in spi_hw_attach() 91 MFREE(osh, si, sizeof(spih_info_t)); in spi_hw_attach() [all …]
|
D | bcmsdh_linux.c | 73 osl_t *osh; member 168 osl_t *osh = NULL; in bcmsdh_probe() local 195 if (!(osh = osl_attach(dev, PCI_BUS, FALSE))) { in bcmsdh_probe() 199 if (!(sdhc = MALLOC(osh, sizeof(bcmsdh_hc_t)))) { in bcmsdh_probe() 202 MALLOCED(osh))); in bcmsdh_probe() 206 sdhc->osh = osh; in bcmsdh_probe() 211 if (!(sdh = bcmsdh_attach(osh, (void *)0, in bcmsdh_probe() 217 if (!(sdh = bcmsdh_attach(osh, (void *)r->start, in bcmsdh_probe() 246 bcmsdh_detach(sdhc->osh, sdhc->sdh); in bcmsdh_probe() 247 MFREE(osh, sdhc, sizeof(bcmsdh_hc_t)); in bcmsdh_probe() [all …]
|
D | bcmsdh_sdmmc.c | 123 sdioh_attach(osl_t *osh, void *bar0, uint irq) in sdioh_attach() argument 135 if ((sd = (sdioh_info_t *)MALLOC(osh, sizeof(sdioh_info_t))) == NULL) { in sdioh_attach() 136 sd_err(("sdioh_attach: out of memory, malloced %d bytes\n", MALLOCED(osh))); in sdioh_attach() 140 sd->osh = osh; in sdioh_attach() 143 MFREE(sd->osh, sd, sizeof(sdioh_info_t)); in sdioh_attach() 189 sdioh_detach(osl_t *osh, sdioh_info_t *sd) in sdioh_detach() argument 208 MFREE(sd->osh, sd, sizeof(sdioh_info_t)); in sdioh_detach() 903 for (pnext = pkt; pnext; pnext = PKTNEXT(sd->osh, pnext)) { in sdioh_request_packet() 904 uint pkt_len = PKTLEN(sd->osh, pnext); in sdioh_request_packet() 918 ASSERT(((uint32)(PKTDATA(sd->osh, pkt)) & DMA_ALIGN_MASK) == 0); in sdioh_request_packet() [all …]
|
D | bcmsdh.c | 51 osl_t *osh; member 72 bcmsdh_attach(osl_t *osh, void *cfghdl, void **regsva, uint irq) in bcmsdh_attach() argument 76 if ((bcmsdh = (bcmsdh_info_t *)MALLOC(osh, sizeof(bcmsdh_info_t))) == NULL) { in bcmsdh_attach() 77 BCMSDH_ERROR(("bcmsdh_attach: out of memory, malloced %d bytes\n", MALLOCED(osh))); in bcmsdh_attach() 85 if (!(bcmsdh->sdioh = sdioh_attach(osh, cfghdl, irq))) { in bcmsdh_attach() 86 bcmsdh_detach(osh, bcmsdh); in bcmsdh_attach() 90 bcmsdh->osh = osh; in bcmsdh_attach() 101 bcmsdh_detach(osl_t *osh, void *sdh) in bcmsdh_detach() argument 107 sdioh_detach(osh, bcmsdh->sdioh); in bcmsdh_detach() 110 MFREE(osh, bcmsdh, sizeof(bcmsdh_info_t)); in bcmsdh_detach() [all …]
|
D | bcmsdspi_linux.c | 112 spi_reg_map(osl_t *osh, uintptr addr, int size) in spi_reg_map() argument 118 spi_reg_unmap(osl_t *osh, uintptr addr, int size) in spi_reg_unmap() argument 128 sdos = (struct sdos_info*)MALLOC(sd->osh, sizeof(struct sdos_info)); in spi_osinit() 146 MFREE(sd->osh, sdos, sizeof(struct sdos_info)); in spi_osfree()
|
D | bcmsdstd.c | 174 sdioh_attach(osl_t *osh, void *bar0, uint irq) in sdioh_attach() argument 179 if ((sd = (sdioh_info_t *)MALLOC(osh, sizeof(sdioh_info_t))) == NULL) { in sdioh_attach() 180 sd_err(("sdioh_attach: out of memory, malloced %d bytes\n", MALLOCED(osh))); in sdioh_attach() 185 sd->osh = osh; in sdioh_attach() 188 MFREE(sd->osh, sd, sizeof(sdioh_info_t)); in sdioh_attach() 191 sd->mem_space = (volatile char *)sdstd_reg_map(osh, (uintptr)bar0, SDIOH_REG_WINSZ); in sdioh_attach() 197 MFREE(sd->osh, sd, sizeof(sdioh_info_t)); in sdioh_attach() 214 OSL_DMADDRWIDTH(osh, 32); in sdioh_attach() 228 sdstd_reg_unmap(osh, (uintptr)sd->mem_space, SDIOH_REG_WINSZ); in sdioh_attach() 232 MFREE(sd->osh, sd, sizeof(sdioh_info_t)); in sdioh_attach() [all …]
|
D | bcmsdstd_linux.c | 102 sdstd_reg_map(osl_t *osh, int32 addr, int size) in sdstd_reg_map() argument 108 sdstd_reg_unmap(osl_t *osh, int32 addr, int size) in sdstd_reg_unmap() argument 118 sdos = (struct sdos_info*)MALLOC(sd->osh, sizeof(struct sdos_info)); in sdstd_osinit() 136 MFREE(sd->osh, sdos, sizeof(struct sdos_info)); in sdstd_osfree()
|
/hardware/broadcom/wlan/bcm4329/src/dhd/sys/ |
D | dhd_sdio.c | 140 PKTFREE(bus->dhd->osh, pkt, FALSE); 338 #define PKTALIGN(osh, p, len, align) \ argument 341 datalign = (uintptr)PKTDATA((osh), (p)); \ 344 ASSERT(PKTLEN((osh), (p)) >= ((len) + datalign)); \ 346 PKTPULL((osh), (p), datalign); \ 347 PKTSETLEN((osh), (p), (len)); \ 368 regvar = R_REG(bus->dhd->osh, regaddr); \ 384 W_REG(bus->dhd->osh, regaddr, regval); \ 411 static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh); 412 static void dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh); [all …]
|
D | dhd_cdc.c | 351 eh = (struct ether_header *)PKTDATA(dhd->osh, pktbuf); in dhd_prot_hdrpush() 354 PKTPUSH(dhd->osh, pktbuf, BDC_HEADER_LEN); in dhd_prot_hdrpush() 356 h = (struct bdc_header *)PKTDATA(dhd->osh, pktbuf); in dhd_prot_hdrpush() 390 if (PKTLEN(dhd->osh, pktbuf) < BDC_HEADER_LEN) { in dhd_proto_fcinfo() 392 __FUNCTION__, PKTLEN(dhd->osh, pktbuf), BDC_HEADER_LEN)); in dhd_proto_fcinfo() 396 h = (struct bdc_header *)PKTDATA(dhd->osh, pktbuf); in dhd_proto_fcinfo() 418 if (PKTLEN(dhd->osh, pktbuf) < BDC_HEADER_LEN) { in dhd_prot_hdrpull() 420 PKTLEN(dhd->osh, pktbuf), BDC_HEADER_LEN)); in dhd_prot_hdrpull() 424 h = (struct bdc_header *)PKTDATA(dhd->osh, pktbuf); in dhd_prot_hdrpull() 446 PKTPULL(dhd->osh, pktbuf, BDC_HEADER_LEN); in dhd_prot_hdrpull() [all …]
|
D | dhd_linux.c | 601 if (!(bufp = buf = MALLOC(dhd->pub.osh, buflen))) { in _dhd_set_multicast_list() 632 MFREE(dhd->pub.osh, buf, buflen); in _dhd_set_multicast_list() 640 if (!(buf = MALLOC(dhd->pub.osh, buflen))) { in _dhd_set_multicast_list() 649 MFREE(dhd->pub.osh, buf, buflen); in _dhd_set_multicast_list() 666 MFREE(dhd->pub.osh, buf, buflen); in _dhd_set_multicast_list() 768 MFREE(dhd->pub.osh, ifp, sizeof(*ifp)); in dhd_op_if() 851 if (PKTLEN(dhdp->osh, pktbuf) >= ETHER_ADDR_LEN) { in dhd_sendpkt() 852 uint8 *pktdata = (uint8 *)PKTDATA(dhdp->osh, pktbuf); in dhd_sendpkt() 918 if (!(pktbuf = PKTFRMNATIVE(dhd->pub.osh, skb))) { in dhd_start_xmit() 974 pnext = PKTNEXT(dhdp->osh, pktbuf); in dhd_rx_frame() [all …]
|