/asus-wl-520gu-7.0.1.45/src/include/ |
H A D | min_osl.h | 32 #define OSL_PCMCIA_READ_ATTR(osh, offset, buf, size) \ 34 #define OSL_PCMCIA_WRITE_ATTR(osh, offset, buf, size) \ 44 #define OSL_PCI_BUS(osh) (0) 45 #define OSL_PCI_SLOT(osh) (0) 54 #define R_REG(osh, r) ({ \ 63 #define W_REG(osh, r, v) do { \ 70 #define AND_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) & (v)) 71 #define OR_REG(osh, [all...] |
H A D | hndpmu.h | 23 extern void sb_pmu_init(sb_t *sbh, osl_t *osh); 24 extern void sb_pmu_pll_init(sb_t *sbh, osl_t *osh, uint32 xtalfreq); 25 extern void sb_pmu_res_init(sb_t *sbh, osl_t *osh); 26 extern uint32 sb_pmu_force_ilp(sb_t *sbh, osl_t *osh, bool force); 27 extern uint32 sb_pmu_cpu_clock(sb_t *sbh, osl_t *osh); 28 extern uint32 sb_pmu_alp_clock(sb_t *sbh, osl_t *osh); 30 extern void sb_pmu_set_switcher_voltage(sb_t *sbh, osl_t *osh, uint8 bb_voltage, uint8 rf_voltage); 31 extern void sb_pmu_set_ldo_voltage(sb_t *sbh, osl_t *osh, uint8 ldo, uint8 voltage); 32 extern void sb_pmu_paref_ldo_enable(sb_t *sbh, osl_t *osh, bool enable); 33 extern uint16 sb_pmu_fast_pwrup_delay(sb_t *sbh, osl_t *osh); [all...] |
H A D | linux_osl.h | 52 #define OSL_LONG_DELAY(osh, usec) osl_long_delay(osh, usec, 0) 53 #define OSL_YIELD_EXEC(osh, usec) osl_long_delay(osh, usec, 1) 54 extern void osl_long_delay(osl_t *osh, uint usec, bool yield); 55 extern int in_long_delay(osl_t *osh); 56 extern void osl_oshsh_init(osl_t *osh, shared_osl_t *oshsh); 57 #define IN_LONG_DELAY(osh) in_long_delay(osh) 70 #define OSL_PCMCIA_READ_ATTR(osh, offse 325 osl_pkt_frmnative(osl_pubinfo_t *osh, struct sk_buff *skb) argument 350 osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt) argument [all...] |
H A D | cfe_osl.h | 47 #define OSL_PCMCIA_READ_ATTR(osh, offset, buf, size) \ 49 #define OSL_PCMCIA_WRITE_ATTR(osh, offset, buf, size) \ 59 #define OSL_PCI_BUS(osh) (0) 60 #define OSL_PCI_SLOT(osh) (0) 76 #define R_REG(osh, r) ({ \ 85 #define W_REG(osh, r, v) do { \ 92 #define AND_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) & (v)) 93 #define OR_REG(osh, [all...] |
H A D | osl.h | 47 #define SET_REG(osh, r, mask, val) W_REG((osh), (r), ((R_REG((osh), r) & ~(mask)) | (val)))
|
H A D | hndchipc.h | 23 extern void sb_jtagm_disable(osl_t *osh, void *h); 24 extern uint32 jtag_rwreg(osl_t *osh, void *h, uint32 ir, uint32 dr);
|
H A D | bcmsrom.h | 299 extern int srom_var_init(sb_t *sbh, uint bus, void *curmap, osl_t *osh, 302 extern int srom_read(sb_t *sbh, uint bus, void *curmap, osl_t *osh, 304 extern int srom_write(sb_t *sbh, uint bus, void *curmap, osl_t *osh, 307 extern int srom_parsecis(osl_t *osh, uint8 **pcis, uint ciscnt,
|
/asus-wl-520gu-7.0.1.45/src/shared/ |
H A D | linux_osl.c | 31 #define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */ 51 shared_osl_t *oshsh; /* osh shared */ 124 osl_t *osh; local 126 osh = kmalloc(sizeof(osl_t), GFP_ATOMIC); 127 ASSERT(osh); 129 bzero(osh, sizeof(osl_t)); 134 osh->magic = OS_HANDLE_MAGIC; 135 osh->malloced = 0; 136 osh->failed = 0; 137 osh 162 osl_detach(osl_t *osh) argument 173 osl_pktget(osl_t *osh, uint len) argument 193 osl_pktfree(osl_t *osh, void *p, bool send) argument 227 osl_pci_read_config(osl_t *osh, uint offset, uint size) argument 248 osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val) argument 269 osl_pci_bus(osl_t *osh) argument 278 osl_pci_slot(osl_t *osh) argument 286 osl_pcmcia_attr(osl_t *osh, uint offset, char *buf, int size, bool write) argument 291 osl_pcmcia_read_attr(osl_t *osh, uint offset, void *buf, int size) argument 297 osl_pcmcia_write_attr(osl_t *osh, uint offset, void *buf, int size) argument 306 osl_debug_malloc(osl_t *osh, uint size, int line, char* file) argument 341 osl_debug_mfree(osl_t *osh, void *addr, uint size, int line, char* file) argument 375 osl_debug_memdump(osl_t *osh, struct bcmstrbuf *b) argument 392 osl_malloc(osl_t *osh, uint size) argument 412 osl_mfree(osl_t *osh, void *addr, uint size) argument 422 osl_malloced(osl_t *osh) argument 429 osl_malloc_failed(osl_t *osh) argument 436 osl_dma_alloc_consistent(osl_t *osh, uint size, ulong *pap) argument 444 osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) argument 452 osl_dma_map(osl_t *osh, void *va, uint size, int direction) argument 462 osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction) argument 497 osl_oshsh_init(osl_t *osh, shared_osl_t* oshsh) argument 505 in_long_delay(osl_t *osh) argument 511 osl_long_delay(osl_t *osh, uint usec, bool yield) argument 557 osl_pktdup(osl_t *osh, void *skb) argument 577 osl_pktalloced(osl_t *osh) argument 584 osl_pktlist_dump(osl_t *osh, char *buf) argument 591 osl_pktlist_add(osl_t *osh, void *p) argument 597 osl_pktlist_remove(osl_t *osh, void *p) argument 779 osl_pktdata(osl_t *osh, void *skb) argument 785 osl_pktlen(osl_t *osh, void *skb) argument 791 osl_pktheadroom(osl_t *osh, void *skb) argument 797 osl_pkttailroom(osl_t *osh, void *skb) argument 803 osl_pktnext(osl_t *osh, void *skb) argument 815 osl_pktsetlen(osl_t *osh, void *skb, uint len) argument 821 osl_pktpush(osl_t *osh, void *skb, int bytes) argument 827 osl_pktpull(osl_t *osh, void *skb, int bytes) argument 868 osl_pkt_tonative(osl_t *osh, void *pkt) argument 891 osl_pkt_frmnative(osl_t *osh, struct sk_buff *skb) argument [all...] |
H A D | hndgige.c | 35 osl_t *osh; local 52 osh = sb_osh(sbh); 66 base = sb_base(R_REG(osh, &sb->sbadmatch1)); 67 W_REG(osh, &pci->base[0], base); 68 W_REG(osh, &pci->base[1], 0); 75 OR_REG(osh, &pci->command, 2); 89 W_REG(osh, &ocp->FlushStatusControl, 0x68); 105 statelow = R_REG(osh, &sb->sbtmstatelow); /* DLL controls */ 106 statehigh = R_REG(osh, &sb->sbtmstatehigh); /* GMII/RGMII mode */ 120 W_REG(osh, [all...] |
H A D | hndpmu.c | 32 static void sb_pmu0_pllinit0(sb_t *sbh, osl_t *osh, chipcregs_t *cc, uint32 xtal); 33 static uint32 sb_pmu0_alpclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc); 34 static uint32 sb_pmu0_cpuclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc); 38 static void sb_pmu1_pllinit0(sb_t *sbh, osl_t *osh, chipcregs_t *cc, uint32 xtal); 39 static uint32 sb_pmu1_cpuclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc); 40 static uint32 sb_pmu1_alpclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc); 45 BCMINITFN(sb_pmu_set_switcher_voltage)(sb_t *sbh, osl_t *osh, argument 58 W_REG(osh, &cc->regcontrol_addr, 0x01); 59 W_REG(osh, &cc->regcontrol_data, (uint32)(bb_voltage & 0x1f) << 22); 61 W_REG(osh, 69 sb_pmu_set_ldo_voltage(sb_t *sbh, osl_t *osh, uint8 ldo, uint8 voltage) argument 138 sb_pmu_paref_ldo_enable(sb_t *sbh, osl_t *osh, bool enable) argument 167 sb_pmu_fast_pwrup_delay(sb_t *sbh, osl_t *osh) argument 202 sb_pmu_force_ilp(sb_t *sbh, osl_t *osh, bool force) argument 304 sb_pmu_res_init(sb_t *sbh, osl_t *osh) argument 521 sb_pmu0_pllinit0(sb_t *sbh, osl_t *osh, chipcregs_t *cc, uint32 xtal) argument 630 sb_pmu0_alpclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc) argument 648 sb_pmu0_cpuclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc) argument 715 sb_pmu1_alpclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc) argument 736 sb_pmu1_pllinit0(sb_t *sbh, osl_t *osh, chipcregs_t *cc, uint32 xtal) argument 832 sb_pmu1_cpuclk0(sb_t *sbh, osl_t *osh, chipcregs_t *cc) argument 858 sb_pmu_pll_init(sb_t *sbh, osl_t *osh, uint xtalfreq) argument 900 sb_pmu_alp_clock(sb_t *sbh, osl_t *osh) argument 947 sb_pmu_cpu_clock(sb_t *sbh, osl_t *osh) argument 992 sb_pmu_init(sb_t *sbh, osl_t *osh) argument 1018 sb_pmu_otp_power(sb_t *sbh, osl_t *osh, bool on) argument 1056 sb_pmu_rcal(sb_t *sbh, osl_t *osh) argument [all...] |
H A D | sflash.c | 31 sflash_cmd(osl_t *osh, chipcregs_t *cc, uint opcode) argument 33 W_REG(osh, &cc->flashcontrol, SFLASH_START | opcode); 34 while (R_REG(osh, &cc->flashcontrol) & SFLASH_BUSY); 42 osl_t *osh; local 46 osh = sb_osh(sbh); 55 sflash_cmd(osh, cc, SFLASH_ST_DP); 56 sflash_cmd(osh, cc, SFLASH_ST_RES); 57 id = R_REG(osh, &cc->flashdata); 90 W_REG(osh, &cc->flashaddress, 1); 91 sflash_cmd(osh, c 156 osl_t *osh; local 201 osl_t *osh; local 238 osl_t *osh; local 390 osl_t *osh; local 427 osl_t *osh; local [all...] |
H A D | sromstubs.c | 24 srom_var_init(sb_t *sbh, uint bus, void *curmap, osl_t *osh, char **vars, uint *count) argument 30 srom_read(sb_t *sbh, uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) argument 36 srom_write(sb_t *sbh, uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) argument
|
H A D | hndchipc.c | 60 osl_t *osh; local 67 osh = sb_osh(sbh); 83 R_REG(osh, &cc->clockcontrol_n), 84 R_REG(osh, &cc->clockcontrol_m2)); 93 AND_REG(osh, &cc->corecontrol, ~CC_UARTCLKEN); 95 OR_REG(osh, &cc->corecontrol, CC_UARTCLKO); 97 OR_REG(osh, &cc->corecontrol, CC_UARTCLKEN); 102 W_REG(osh, &cc->clkdiv, 103 ((R_REG(osh, &cc->clkdiv) & ~CLKD_UART) | div)); 112 ((R_REG(osh, 184 sb_jtagm_disable(osl_t *osh, void *h) argument 199 jtag_rwreg(osl_t *osh, void *h, uint32 ir, uint32 dr) argument [all...] |
H A D | cfe_osl.c | 22 osl_t *osh; local 24 osh = (osl_t *)KMALLOC(sizeof(osl_t), 0); 25 ASSERT(osh); 27 bzero(osh, sizeof(osl_t)); 28 osh->pdev = pdev; 29 return osh; 33 osl_detach(osl_t *osh) argument 35 if (osh == NULL) 37 KFREE((void*) KERNADDR(PHYSADDR((ulong)osh))); 61 osl_pktfree(osl_t *osh, struc argument [all...] |
H A D | hndmips.c | 63 osl_t *osh; local 70 osh = sb_osh(sbh); 79 sbipsflag = R_REG(osh, &sb->sbipsflag); 110 osl_t *osh; local 114 osh = sb_osh(sbh); 121 W_REG(osh, &sb->sbintvec, 0); 123 OR_REG(osh, &sb->sbipsflag, sbips_int_mask[irq]); 135 osl_t *osh; local 141 osh = sb_osh(sbh); 155 AND_REG(osh, 176 osl_t *osh; local 1000 osl_t *osh; local [all...] |
H A D | hnddma.c | 48 void *osh; /* os handle */ member in struct:dma_info 162 static bool _dma32_addrext(osl_t *osh, dma32regs_t *dma32regs); 185 static bool _dma64_addrext(osl_t *osh, dma64regs_t *dma64regs); 207 static bool _dma64_addrext(osl_t *osh, dma64regs_t *dma64regs) { return FALSE; } argument 294 dma_attach(osl_t *osh, char *name, sb_t *sbh, void *dmaregstx, void *dmaregsrx, argument 301 if ((di = MALLOC(osh, sizeof (dma_info_t))) == NULL) { 349 DMA_TRACE(("%s: dma_attach: %s osh %p ntxd %d nrxd %d rxbufsize %d nrxpost %d " 351 name, (di->dma64 ? "DMA64" : "DMA32"), osh, ntxd, nrxd, rxbufsize, 358 di->osh = osh; 538 _dma32_addrext(osl_t *osh, dma32regs_t *dma32regs) argument 958 dma_txpioloopback(osl_t *osh, dma32regs_t *regs) argument 1772 _dma64_addrext(osl_t *osh, dma64regs_t *dma64regs) argument 1855 osl_t *osh; local [all...] |
H A D | hndpci.c | 97 osl_t *osh; local 103 osh = sb_osh(sbh); 116 W_REG(osh, ®s->sbtopci1, win); 124 W_REG(osh, ®s->sbtopci1, SBTOPCI_CFG1); 152 osl_t *osh; local 161 osh = sb_osh(sbh); 168 *val = R_REG(osh, *addr); 223 osl_t *osh; local 227 osh = sb_osh(sbh); 263 W_REG(osh, re 297 osl_t *osh; local 331 osl_t *osh; local 401 osl_t *osh; local 489 osl_t *osh; local 643 osl_t *osh; local 698 osl_t *osh; local [all...] |
H A D | bcmsrom.c | 57 static int initvars_srom_sb(sb_t *sbh, osl_t *osh, void *curmap, char **vars, uint *count); 60 static int initvars_cis_pcmcia(sb_t *sbh, osl_t *osh, char **vars, uint *count); 64 static int sprom_cmd_pcmcia(osl_t *osh, uint8 cmd); 65 static int sprom_read_pcmcia(osl_t *osh, uint16 addr, uint16 *data); 66 static int sprom_write_pcmcia(osl_t *osh, uint16 addr, uint16 data); 67 static int sprom_read_pci(osl_t *osh, uint16 *sprom, uint wordoff, uint16 *buf, uint nwords, 70 static int initvars_table(osl_t *osh, char *start, char *end, char **vars, uint *count); 71 static int initvars_flash(sb_t *sbh, osl_t *osh, char **vp, uint len); 74 static int get_sb_pcmcia_srom(sb_t *sbh, osl_t *osh, uint8 *pcmregs, 76 static int set_sb_pcmcia_srom(sb_t *sbh, osl_t *osh, uint 128 srom_var_init(sb_t *sbh, uint bustype, void *curmap, osl_t *osh, char **vars, uint *count) argument 159 srom_read(sb_t *sbh, uint bustype, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) argument 220 srom_write(sb_t *sbh, uint bustype, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf) argument 350 srom_cmd_sb_pcmcia(osl_t *osh, uint8 *pcmregs, uint8 cmd) argument 372 srom_read_sb_pcmcia(osl_t *osh, uint8 *pcmregs, uint16 addr, uint16 *data) argument 397 srom_write_sb_pcmcia(osl_t *osh, uint8 *pcmregs, uint16 addr, uint16 data) argument 427 get_sb_pcmcia_srom(sb_t *sbh, osl_t *osh, uint8 *pcmregs, uint boff, uint16 *srom, uint bsz) argument 467 set_sb_pcmcia_srom(sb_t *sbh, osl_t *osh, uint8 *pcmregs, uint boff, uint16 *srom, uint bsz) argument 538 srom_parsecis(osl_t *osh, uint8 *pcis[], uint ciscnt, char **vars, uint *count) argument 911 sprom_cmd_pcmcia(osl_t *osh, uint8 cmd) argument 931 sprom_read_pcmcia(osl_t *osh, uint16 addr, uint16 *data) argument 957 sprom_write_pcmcia(osl_t *osh, uint16 addr, uint16 data) argument 983 sprom_read_pci(osl_t *osh, uint16 *sprom, uint wordoff, uint16 *buf, uint nwords, bool check_crc) argument 1022 initvars_table(osl_t *osh, char *start, char *end, char **vars, uint *count) argument 1050 initvars_flash(sb_t *sbh, osl_t *osh, char **base, uint len) argument 1110 osl_t *osh = sb_osh(sbh); local 1657 osl_t *osh = sb_osh(sbh); local 1784 initvars_cis_pcmcia(sb_t *sbh, osl_t *osh, char **vars, uint *count) argument 1814 initvars_srom_sb(sb_t *sbh, osl_t *osh, void *curmap, char **vars, uint *varsz) argument 1934 srom_size(sb_t *sbh, osl_t *osh) argument [all...] |
H A D | sbutils.c | 54 void *osh; /* osl os handle */ member in struct:sb_info 89 static sb_info_t * sb_doattach(sb_info_t *si, uint devid, osl_t *osh, void *regs, 215 OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1); 219 val = R_REG(si->osh, sbr); 223 OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1); 247 OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1); 253 dummy = R_REG(si->osh, sbr); 254 W_REG(si->osh, ((volatile uint16 *)sbr + 1), (uint16)((v >> 16) & 0xffff)); 255 dummy = R_REG(si->osh, sbr); 256 W_REG(si->osh, (volatil 283 sb_attach(uint devid, osl_t *osh, void *regs, uint bustype, void *sdh, char **vars, uint *varsz) argument 313 sb_kattach(osl_t *osh) argument 336 sb_doattach(sb_info_t *si, uint devid, osl_t *osh, void *regs, uint bustype, void *sdh, char **vars, uint *varsz) argument 747 sb_setosh(sb_t *sbh, osl_t *osh) argument [all...] |
H A D | bcmotp.c | 50 osl_t *osh; member in struct:__anon12544 72 oi->hwprot = (uint16)(R_REG(oi->osh, &cc->otpstatus) & OTPS_OL_MASK); 73 oi->prog = (uint16)(R_REG(oi->osh, &cc->otpstatus) & OTPS_GUP_MASK); 116 oi->osh = sb_osh(sbh); 149 if (!(R_REG(oi->osh, &cc->min_res_mask) & PMURES_BIT(RES4325_LNLDO2_PU))) { 179 return R_REG(oi->osh, &cc->otp[wn]); 293 W_REG(oi->osh, &cc->otpprog, otpp); 296 ((st = R_REG(oi->osh, &cc->otpprog)) & OTPP_START_BUSY) && (k < OTPP_TRIES); 392 OR_REG(oi->osh, &cc->otpcontrol, OTPC_PROGEN); 419 AND_REG(oi->osh, 608 osl_t *osh; local 624 osl_t *osh; local 646 osl_t *osh; local 1189 osl_t *osh; local [all...] |
H A D | bcmutils.c | 50 pktcopy(osl_t *osh, void *p, uint offset, int len, uchar *buf) argument 58 for (; p && offset; p = PKTNEXT(osh, p)) { 59 if (offset < (uint)PKTLEN(osh, p)) 61 offset -= PKTLEN(osh, p); 68 for (; p && len; p = PKTNEXT(osh, p)) { 69 n = MIN((uint)PKTLEN(osh, p) - offset, (uint)len); 70 bcopy(PKTDATA(osh, p) + offset, buf, n); 82 pkttotlen(osl_t *osh, void *p) argument 87 for (; p; p = PKTNEXT(osh, p)) 88 total += PKTLEN(osh, 94 pktlast(osl_t *osh, void *p) argument 219 pktq_pflush(osl_t *osh, struct pktq *pq, int prec, bool dir) argument 413 pktq_flush(osl_t *osh, struct pktq *pq, bool dir) argument 1103 void *osh; local [all...] |
/asus-wl-520gu-7.0.1.45/src/et/sys/ |
H A D | etc47xx.c | 49 osl_t *osh; /* os handle */ member in struct:bcm4xxx 69 static void *chipattach(etc_info_t *etc, void *osh, void *regsva); 150 chipattach(etc_info_t *etc, void *osh, void *regsva) argument 161 if ((ch = (struct bcm4xxx*) MALLOC(osh, sizeof(struct bcm4xxx))) == NULL) { 163 MALLOCED(osh))); 170 ch->osh = osh; 173 if ((ch->sbh = sb_attach(etc->deviceid, ch->osh, regsva, PCI_BUS, NULL, &ch->vars, 211 if ((ch->di = dma_attach(osh, name, ch->sbh, 393 MFREE(ch->osh, c [all...] |
H A D | et_linux.c | 68 void *osh; /* pointer to os handle */ member in struct:et_info 147 osl_t *osh; local 158 osh = osl_attach(pdev, PCI_BUS, FALSE); 159 ASSERT(osh); 164 if (!(dev = (struct net_device *) MALLOC(osh, sizeof(struct net_device)))) { 166 MALLOCED(osh))); 167 osl_detach(osh); 174 MFREE(osh, dev, sizeof(struct net_device)); 175 osl_detach(osh); 180 if ((et = (et_info_t*) MALLOC(osh, sizeo 391 osl_t *osh; local 962 osl_t *osh; local [all...] |
H A D | etc.c | 56 etc_attach(void *et, uint vendor, uint device, uint unit, void *osh, void *regsva) argument 67 if ((etc = (etc_info_t*) MALLOC(osh, sizeof(etc_info_t))) == NULL) { 69 MALLOCED(osh))); 76 etc->osh = osh; 87 if ((etc->ch = (*etc->chops->attach)(etc, osh, regsva)) == NULL) { 111 MFREE(etc->osh, etc, sizeof(etc_info_t)); 481 for (; p; p = PKTNEXT(etc->osh, p)) 482 total += PKTLEN(etc->osh, p);
|
H A D | et_cfe.c | 45 osl_t *osh; member in struct:et_info 202 et->osh = osl_attach(et); 203 ASSERT(et->osh); 206 if ((et->etc = etc_attach(et, VENDOR_BROADCOM, device, unit, et->osh, probe_ptr)) == NULL) { 318 PKTFREE(et->osh, p, FALSE);
|