Lines Matching refs:sii
118 si_info_t *sii = SI_INFO(sih); in ai_scan() local
122 erombase = R_REG(sii->osh, &cc->eromptr); in ai_scan()
131 sii->curwrap = (void *)((uintptr)regs + SI_CORE_SIZE); in ai_scan()
134 OSL_PCI_WRITE_CONFIG(sii->osh, PCI_BAR0_WIN, 4, erombase); in ai_scan()
164 SI_MSG(("Found END of erom after %d cores\n", sii->numcores)); in ai_scan()
195 sii->common_info->oob_router = addrl; in ai_scan()
201 idx = sii->numcores; in ai_scan()
203 sii->common_info->cia[idx] = cia; in ai_scan()
204 sii->common_info->cib[idx] = cib; in ai_scan()
205 sii->common_info->coreid[idx] = cid; in ai_scan()
235 sii->common_info->coresba[idx] = addrl; in ai_scan()
236 sii->common_info->coresba_size[idx] = sizel; in ai_scan()
243 sii->common_info->coresba2[idx] = addrl; in ai_scan()
244 sii->common_info->coresba2_size[idx] = sizel; in ai_scan()
274 sii->common_info->wrapba[idx] = addrl; in ai_scan()
291 sii->common_info->wrapba[idx] = addrl; in ai_scan()
299 sii->numcores++; in ai_scan()
305 sii->numcores = 0; in ai_scan()
315 si_info_t *sii = SI_INFO(sih); in ai_setcoreidx() local
316 uint32 addr = sii->common_info->coresba[coreidx]; in ai_setcoreidx()
317 uint32 wrap = sii->common_info->wrapba[coreidx]; in ai_setcoreidx()
320 if (coreidx >= sii->numcores) in ai_setcoreidx()
327 ASSERT((sii->intrsenabled_fn == NULL) || !(*(sii)->intrsenabled_fn)((sii)->intr_arg)); in ai_setcoreidx()
332 if (!sii->common_info->regs[coreidx]) { in ai_setcoreidx()
333 sii->common_info->regs[coreidx] = REG_MAP(addr, SI_CORE_SIZE); in ai_setcoreidx()
334 ASSERT(GOODREGS(sii->common_info->regs[coreidx])); in ai_setcoreidx()
336 sii->curmap = regs = sii->common_info->regs[coreidx]; in ai_setcoreidx()
337 if (!sii->common_info->wrappers[coreidx]) { in ai_setcoreidx()
338 sii->common_info->wrappers[coreidx] = REG_MAP(wrap, SI_CORE_SIZE); in ai_setcoreidx()
339 ASSERT(GOODREGS(sii->common_info->wrappers[coreidx])); in ai_setcoreidx()
341 sii->curwrap = sii->common_info->wrappers[coreidx]; in ai_setcoreidx()
347 sii->curmap = regs = (void *)((uintptr)addr); in ai_setcoreidx()
348 sii->curwrap = (void *)((uintptr)wrap); in ai_setcoreidx()
358 sii->curmap = regs; in ai_setcoreidx()
359 sii->curidx = coreidx; in ai_setcoreidx()
375 si_info_t *sii; in ai_addrspace() local
378 sii = SI_INFO(sih); in ai_addrspace()
379 cidx = sii->curidx; in ai_addrspace()
382 return sii->common_info->coresba[cidx]; in ai_addrspace()
384 return sii->common_info->coresba2[cidx]; in ai_addrspace()
396 si_info_t *sii; in ai_addrspacesize() local
399 sii = SI_INFO(sih); in ai_addrspacesize()
400 cidx = sii->curidx; in ai_addrspacesize()
403 return sii->common_info->coresba_size[cidx]; in ai_addrspacesize()
405 return sii->common_info->coresba2_size[cidx]; in ai_addrspacesize()
416 si_info_t *sii; in ai_flag() local
419 sii = SI_INFO(sih); in ai_flag()
420 ai = sii->curwrap; in ai_flag()
422 return (R_REG(sii->osh, &ai->oobselouta30) & 0x1f); in ai_flag()
433 si_info_t *sii = SI_INFO(sih); in ai_write_wrap_reg() local
434 aidmp_t *ai = sii->curwrap; in ai_write_wrap_reg()
435 W_REG(sii->osh, (uint32 *)((uint8 *)ai+offset), val); in ai_write_wrap_reg()
442 si_info_t *sii; in ai_corevendor() local
445 sii = SI_INFO(sih); in ai_corevendor()
446 cia = sii->common_info->cia[sii->curidx]; in ai_corevendor()
453 si_info_t *sii; in ai_corerev() local
456 sii = SI_INFO(sih); in ai_corerev()
457 cib = sii->common_info->cib[sii->curidx]; in ai_corerev()
464 si_info_t *sii; in ai_iscoreup() local
467 sii = SI_INFO(sih); in ai_iscoreup()
468 ai = sii->curwrap; in ai_iscoreup()
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()
491 si_info_t *sii; in ai_corereg() local
493 sii = SI_INFO(sih); in ai_corereg()
506 if (!sii->common_info->wrappers[coreidx]) { in ai_corereg()
507 sii->common_info->regs[coreidx] = in ai_corereg()
508 REG_MAP(sii->common_info->coresba[coreidx], SI_CORE_SIZE); in ai_corereg()
509 ASSERT(GOODREGS(sii->common_info->regs[coreidx])); in ai_corereg()
511 r = (uint32 *)((uchar *)sii->common_info->regs[coreidx] + regoff); in ai_corereg()
515 if ((sii->common_info->coreid[coreidx] == CC_CORE_ID) && SI_FAST(sii)) { in ai_corereg()
519 r = (uint32 *)((char *)sii->curmap + PCI_16KB0_CCREGS_OFFSET + regoff); in ai_corereg()
520 } else if (sii->pub.buscoreidx == coreidx) { in ai_corereg()
525 if (SI_FAST(sii)) in ai_corereg()
526 r = (uint32 *)((char *)sii->curmap + in ai_corereg()
529 r = (uint32 *)((char *)sii->curmap + in ai_corereg()
537 INTR_OFF(sii, intr_val); in ai_corereg()
540 origidx = si_coreidx(&sii->pub); in ai_corereg()
543 r = (uint32*) ((uchar*) ai_setcoreidx(&sii->pub, coreidx) + regoff); in ai_corereg()
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()
559 ai_setcoreidx(&sii->pub, origidx); in ai_corereg()
561 INTR_RESTORE(sii, intr_val); in ai_corereg()
570 si_info_t *sii; in ai_core_disable() local
574 sii = SI_INFO(sih); in ai_core_disable()
576 ASSERT(GOODREGS(sii->curwrap)); in ai_core_disable()
577 ai = sii->curwrap; in ai_core_disable()
580 if (R_REG(sii->osh, &ai->resetctrl) & AIRC_RESET) in ai_core_disable()
583 W_REG(sii->osh, &ai->ioctrl, bits); in ai_core_disable()
584 dummy = R_REG(sii->osh, &ai->ioctrl); in ai_core_disable()
587 W_REG(sii->osh, &ai->resetctrl, AIRC_RESET); in ai_core_disable()
599 si_info_t *sii; in ai_core_reset() local
603 sii = SI_INFO(sih); in ai_core_reset()
604 ASSERT(GOODREGS(sii->curwrap)); in ai_core_reset()
605 ai = sii->curwrap; in ai_core_reset()
615 W_REG(sii->osh, &ai->ioctrl, (bits | SICF_FGC | SICF_CLOCK_EN)); in ai_core_reset()
616 dummy = R_REG(sii->osh, &ai->ioctrl); in ai_core_reset()
617 W_REG(sii->osh, &ai->resetctrl, 0); in ai_core_reset()
620 W_REG(sii->osh, &ai->ioctrl, (bits | SICF_CLOCK_EN)); in ai_core_reset()
621 dummy = R_REG(sii->osh, &ai->ioctrl); in ai_core_reset()
629 si_info_t *sii; in ai_core_cflags_wo() local
633 sii = SI_INFO(sih); in ai_core_cflags_wo()
634 ASSERT(GOODREGS(sii->curwrap)); in ai_core_cflags_wo()
635 ai = sii->curwrap; in ai_core_cflags_wo()
640 w = ((R_REG(sii->osh, &ai->ioctrl) & ~mask) | val); in ai_core_cflags_wo()
641 W_REG(sii->osh, &ai->ioctrl, w); in ai_core_cflags_wo()
648 si_info_t *sii; in ai_core_cflags() local
652 sii = SI_INFO(sih); in ai_core_cflags()
653 ASSERT(GOODREGS(sii->curwrap)); in ai_core_cflags()
654 ai = sii->curwrap; in ai_core_cflags()
659 w = ((R_REG(sii->osh, &ai->ioctrl) & ~mask) | val); in ai_core_cflags()
660 W_REG(sii->osh, &ai->ioctrl, w); in ai_core_cflags()
663 return R_REG(sii->osh, &ai->ioctrl); in ai_core_cflags()
669 si_info_t *sii; in ai_core_sflags() local
673 sii = SI_INFO(sih); in ai_core_sflags()
674 ASSERT(GOODREGS(sii->curwrap)); in ai_core_sflags()
675 ai = sii->curwrap; in ai_core_sflags()
681 w = ((R_REG(sii->osh, &ai->iostatus) & ~mask) | val); in ai_core_sflags()
682 W_REG(sii->osh, &ai->iostatus, w); in ai_core_sflags()
685 return R_REG(sii->osh, &ai->iostatus); in ai_core_sflags()