Lines Matching refs:cspec
292 if (dd->cspec->cregbase && (dd->flags & QIB_PRESENT)) in write_7220_creg()
293 writeq(value, &dd->cspec->cregbase[regno]); in write_7220_creg()
298 if (!dd->cspec->cregbase || !(dd->flags & QIB_PRESENT)) in read_7220_creg()
300 return readq(&dd->cspec->cregbase[regno]); in read_7220_creg()
305 if (!dd->cspec->cregbase || !(dd->flags & QIB_PRESENT)) in read_7220_creg32()
307 return readl(&dd->cspec->cregbase[regno]); in read_7220_creg32()
905 msg = dd->cspec->sdmamsgbuf; in sdma_7220_errors()
907 sizeof(dd->cspec->sdmamsgbuf)); in sdma_7220_errors()
1103 errs &= dd->cspec->errormask; in handle_7220_errors()
1104 msg = dd->cspec->emsgbuf; in handle_7220_errors()
1108 qib_7220_handle_hwerrors(dd, msg, sizeof(dd->cspec->emsgbuf)); in handle_7220_errors()
1158 qib_decode_7220_err(dd, msg, sizeof(dd->cspec->emsgbuf), errs & ~mask); in handle_7220_errors()
1280 qib_write_kreg(dd, kr_errmask, dd->cspec->errormask); in qib_7220_clear_freeze()
1323 hwerrs &= dd->cspec->hwerrmask; in qib_7220_handle_hwerrors()
1365 dd->cspec->hwerrmask &= ~HWE_MASK(PowerOnBISTFailed); in qib_7220_handle_hwerrors()
1366 qib_write_kreg(dd, kr_hwerrmask, dd->cspec->hwerrmask); in qib_7220_handle_hwerrors()
1372 bitsmsg = dd->cspec->bitsmsgbuf; in qib_7220_handle_hwerrors()
1378 snprintf(bitsmsg, sizeof(dd->cspec->bitsmsgbuf), in qib_7220_handle_hwerrors()
1388 snprintf(bitsmsg, sizeof(dd->cspec->bitsmsgbuf), in qib_7220_handle_hwerrors()
1393 dd->cspec->hwerrmask &= ~(hwerrs & _QIB_PLL_FAIL); in qib_7220_handle_hwerrors()
1394 qib_write_kreg(dd, kr_hwerrmask, dd->cspec->hwerrmask); in qib_7220_handle_hwerrors()
1402 dd->cspec->hwerrmask &= ~QLOGIC_IB_HWE_SERDESPLLFAILED; in qib_7220_handle_hwerrors()
1403 qib_write_kreg(dd, kr_hwerrmask, dd->cspec->hwerrmask); in qib_7220_handle_hwerrors()
1450 dd->cspec->hwerrmask = val; in qib_7220_init_hwerrors()
1453 qib_write_kreg(dd, kr_hwerrmask, dd->cspec->hwerrmask); in qib_7220_init_hwerrors()
1459 dd->cspec->errormask = qib_read_kreg64(dd, kr_errmask); in qib_7220_init_hwerrors()
1474 dd->cspec->errormask |= ERR_MASK(SendPioArmLaunchErr); in qib_set_7220_armlaunch()
1476 dd->cspec->errormask &= ~ERR_MASK(SendPioArmLaunchErr); in qib_set_7220_armlaunch()
1477 qib_write_kreg(dd, kr_errmask, dd->cspec->errormask); in qib_set_7220_armlaunch()
1752 spin_lock_irqsave(&dd->cspec->gpio_lock, flags); in qib_setup_7220_setextled()
1753 extctl = dd->cspec->extctrl & ~(SYM_MASK(EXTCtrl, LEDPriPortGreenOn) | in qib_setup_7220_setextled()
1767 dd->cspec->extctrl = extctl; in qib_setup_7220_setextled()
1769 spin_unlock_irqrestore(&dd->cspec->gpio_lock, flags); in qib_setup_7220_setextled()
1785 kfree(dd->cspec->cntrs); in qib_setup_7220_cleanup()
1786 kfree(dd->cspec->portcntrs); in qib_setup_7220_cleanup()
1899 dd->cspec->gpio_mask &= ~gpio_irq; in unlikely_7220_intr()
1900 qib_write_kreg(dd, kr_gpio_mask, dd->cspec->gpio_mask); in unlikely_7220_intr()
2135 dd->cspec->presets_needed = 1; in qib_setup_7220_reset()
2273 dd->cspec->numctxts = nchipctxts; in qib_7220_config_ctxts()
2302 spin_lock_irqsave(&dd->cspec->rcvmod_lock, flags); in qib_7220_config_ctxts()
2311 spin_unlock_irqrestore(&dd->cspec->rcvmod_lock, flags); in qib_7220_config_ctxts()
2314 dd->cspec->rcvegrcnt = qib_read_kreg32(dd, kr_rcvegrcnt); in qib_7220_config_ctxts()
2315 dd->rcvhdrcnt = max(dd->cspec->rcvegrcnt, IBA7220_KRCVEGRCNT); in qib_7220_config_ctxts()
2462 dd->cspec->presets_needed = 1; in qib_7220_set_ib_cfg()
2735 spin_lock_irqsave(&dd->cspec->rcvmod_lock, flags); in rcvctrl_7220_mod()
2804 spin_unlock_irqrestore(&dd->cspec->rcvmod_lock, flags); in rcvctrl_7220_mod()
3141 dd->cspec->ncntrs = i; in init_7220_cntrnames()
3144 dd->cspec->cntrnamelen = sizeof(cntr7220names) - 1; in init_7220_cntrnames()
3146 dd->cspec->cntrnamelen = 1 + s - cntr7220names; in init_7220_cntrnames()
3147 dd->cspec->cntrs = kmalloc_array(dd->cspec->ncntrs, sizeof(u64), in init_7220_cntrnames()
3152 dd->cspec->nportcntrs = i - 1; in init_7220_cntrnames()
3153 dd->cspec->portcntrnamelen = sizeof(portcntr7220names) - 1; in init_7220_cntrnames()
3154 dd->cspec->portcntrs = kmalloc_array(dd->cspec->nportcntrs, in init_7220_cntrnames()
3164 if (!dd->cspec->cntrs) { in qib_read_7220cntrs()
3171 ret = dd->cspec->cntrnamelen; in qib_read_7220cntrs()
3175 u64 *cntr = dd->cspec->cntrs; in qib_read_7220cntrs()
3178 ret = dd->cspec->ncntrs * sizeof(u64); in qib_read_7220cntrs()
3186 for (i = 0; i < dd->cspec->ncntrs; i++) in qib_read_7220cntrs()
3198 if (!dd->cspec->portcntrs) { in qib_read_7220portcntrs()
3204 ret = dd->cspec->portcntrnamelen; in qib_read_7220portcntrs()
3208 u64 *cntr = dd->cspec->portcntrs; in qib_read_7220portcntrs()
3212 ret = dd->cspec->nportcntrs * sizeof(u64); in qib_read_7220portcntrs()
3219 for (i = 0; i < dd->cspec->nportcntrs; i++) { in qib_read_7220portcntrs()
3330 u32 lbuf = ppd->dd->cspec->lastbuf_for_pio; in get_7220_link_buf()
3568 if (dd->cspec->autoneg_tries == AUTONEG_TRIES) { in autoneg_7220_work()
3570 dd->cspec->autoneg_tries = 0; in autoneg_7220_work()
3645 dd->cspec->autoneg_tries < AUTONEG_TRIES) { in qib_7220_ib_updown()
3647 ++dd->cspec->autoneg_tries; in qib_7220_ib_updown()
3672 dd->cspec->autoneg_tries = 0; in qib_7220_ib_updown()
3758 spin_lock_irqsave(&dd->cspec->gpio_lock, flags); in gpio_7220_mod()
3759 dd->cspec->extctrl &= ~((u64)mask << SYM_LSB(EXTCtrl, GPIOOe)); in gpio_7220_mod()
3760 dd->cspec->extctrl |= ((u64) dir << SYM_LSB(EXTCtrl, GPIOOe)); in gpio_7220_mod()
3761 new_out = (dd->cspec->gpio_out & ~mask) | out; in gpio_7220_mod()
3763 qib_write_kreg(dd, kr_extctrl, dd->cspec->extctrl); in gpio_7220_mod()
3765 dd->cspec->gpio_out = new_out; in gpio_7220_mod()
3766 spin_unlock_irqrestore(&dd->cspec->gpio_lock, flags); in gpio_7220_mod()
3843 dd->cspec->cregbase = (u64 __iomem *) in set_7220_baseaddrs()
3967 dd->cspec = (struct qib_chip_specific *)(cpspec + dd->num_pports); in qib_init_7220_variables()
3968 dd->cspec->dd = dd; in qib_init_7220_variables()
3971 spin_lock_init(&dd->cspec->sdepb_lock); in qib_init_7220_variables()
3972 spin_lock_init(&dd->cspec->rcvmod_lock); in qib_init_7220_variables()
3973 spin_lock_init(&dd->cspec->gpio_lock); in qib_init_7220_variables()
4096 dd->cspec->sdmabufcnt = dd->piobcnt4k; in qib_init_7220_variables()
4099 dd->cspec->sdmabufcnt = 0; in qib_init_7220_variables()
4103 dd->cspec->lastbuf_for_pio = dd->piobcnt2k + dd->piobcnt4k - in qib_init_7220_variables()
4104 dd->cspec->sdmabufcnt; in qib_init_7220_variables()
4105 dd->lastctxt_piobuf = dd->cspec->lastbuf_for_pio - sbufs; in qib_init_7220_variables()
4106 dd->cspec->lastbuf_for_pio--; /* range is <= , not < */ in qib_init_7220_variables()
4107 dd->last_pio = dd->cspec->lastbuf_for_pio; in qib_init_7220_variables()
4120 dd->cspec->updthresh_dflt = updthresh; in qib_init_7220_variables()
4121 dd->cspec->updthresh = updthresh; in qib_init_7220_variables()
4149 last = dd->cspec->lastbuf_for_pio; in qib_7220_getsendbuf()
4245 i = n - dd->cspec->sdmabufcnt; in init_sdma_7220_regs()
4354 rcd->rcvegrcnt = rcd->dd->cspec->rcvegrcnt; in qib_7220_init_ctxt()
4371 dd->cspec->updthresh != dd->cspec->updthresh_dflt in qib_7220_txchk_change()
4375 < dd->cspec->updthresh_dflt) in qib_7220_txchk_change()
4380 dd->cspec->updthresh = dd->cspec->updthresh_dflt; in qib_7220_txchk_change()
4382 dd->sendctrl |= (dd->cspec->updthresh & in qib_7220_txchk_change()
4392 / rcd->subctxt_cnt) - 1) < dd->cspec->updthresh) { in qib_7220_txchk_change()
4393 dd->cspec->updthresh = (rcd->piocnt / in qib_7220_txchk_change()
4396 dd->sendctrl |= (dd->cspec->updthresh & in qib_7220_txchk_change()