Lines Matching defs:xdc

99 #error "xdc but no xd?"
266 CFATTACH_DECL_NEW(xdc, sizeof(struct xdc_softc),
389 * xdcmatch: determine if xdc is present or not. we do a
390 * soft reset to detect the xdc.
419 struct xdc_softc *xdc = device_private(self);
428 xdc->sc_dev = self;
429 xdc->xdc = (struct xdc *)bus_mapin(ca->ca_bustype, ca->ca_paddr,
430 sizeof(struct xdc));
431 xdc->bustype = ca->ca_bustype;
432 xdc->ipl = ca->ca_intpri;
433 xdc->vector = ca->ca_intvec;
436 xdc->sc_drives[lcv] = NULL;
444 xdc->iopbase = (struct xd_iopb *)dvma_malloc(XDC_MAXIOPB *
446 memset(xdc->iopbase, 0, XDC_MAXIOPB * sizeof(struct xd_iopb));
447 xdc->dvmaiopb = (struct xd_iopb *)dvma_kvtopa(xdc->iopbase,
448 xdc->bustype);
449 xdc->reqs = kmem_zalloc(XDC_MAXIOPB * sizeof(struct xd_iorq),
456 xdc->reqs[lcv].iopb = &xdc->iopbase[lcv];
457 xdc->freereq[lcv] = lcv;
458 xdc->iopbase[lcv].fixd = 1; /* always the same */
459 xdc->iopbase[lcv].naddrmod = XDC_ADDRMOD; /* always the same */
460 xdc->iopbase[lcv].intr_vec = xdc->vector; /* always the same */
462 xdc->nfree = XDC_MAXIOPB;
463 xdc->nrun = 0;
464 xdc->waithead = xdc->waitend = xdc->nwait = 0;
465 xdc->ndone = 0;
469 bufq_alloc(&xdc->sc_wq, "fcfs", 0);
470 callout_init(&xdc->sc_tick_ch, 0);
480 rqno = xdc_cmd(xdc, XDCMD_RDP, XDFUN_CTL, 0, 0, 0, 0, XD_SUB_POLL);
485 ctl = (struct xd_iopb_ctrl *)&xdc->iopbase[rqno];
487 if (xdc->reqs[rqno].errno)
489 xdc_e2str(xdc->reqs[rqno].errno));
491 XDC_DONE(xdc, rqno, err);
496 XDC_DONE(xdc, rqno, err);
500 rqno = xdc_cmd(xdc, XDCMD_WRP, XDFUN_CTL, 0, 0, 0, 0, XD_SUB_POLL);
501 XDC_DONE(xdc, rqno, err);
509 isr_add_vectored(xdcintr, xdc, ca->ca_intpri, ca->ca_intvec);
510 evcnt_attach_dynamic(&xdc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
519 callout_reset(&xdc->sc_tick_ch, XDC_TICKCNT, xdc_tick, xdc);
542 * xd* and xdc* devices, to simplify boot device identification.
565 struct xdc_softc *xdc = device_private(parent);
580 xd->parent = xdc;
583 xdc->sc_drives[xa->driveno] = xd;
600 struct xdc_softc *xdc;
606 xdc = xd->parent;
613 rqno = xdc_cmd(xdc, XDCMD_RST, 0, xd->xd_drive, 0, 0, 0, fullmode);
614 XDC_DONE(xdc, rqno, err);
630 rqno = xdc_cmd(xdc, XDCMD_WRP, XDFUN_FMT, xd->xd_drive,
632 XDC_DONE(xdc, rqno, err);
641 rqno = xdc_cmd(xdc, XDCMD_RDP, XDFUN_DRV, xd->xd_drive,
644 driopb = (struct xd_iopb_drive *)&xdc->iopbase[rqno];
647 XDC_DONE(xdc, rqno, err);
666 rqno = xdc_cmd(xdc, XDCMD_WRP, XDFUN_DRV, xd->xd_drive,
668 XDC_DONE(xdc, rqno, err);
676 rqno = xdc_cmd(xdc, XDCMD_RD, 0, xd->xd_drive,
678 XDC_DONE(xdc, rqno, err);
702 rqno = xdc_cmd(xdc, XDCMD_WRP, XDFUN_DRV, xd->xd_drive,
704 XDC_DONE(xdc, rqno, err);
718 rqno = xdc_cmd(xdc, XDCMD_RD, 0, xd->xd_drive,
720 XDC_DONE(xdc, rqno, err);
1181 xdc_rqinit(struct xd_iorq *rq, struct xdc_softc *xdc, struct xd_softc *xd,
1185 rq->xdc = xdc;
1224 ? 0 : iorq->xdc->ipl;
1250 iorq->xdc->ipl;
1269 iorq->xdc->ipl;
1286 ? 0 : iorq->xdc->ipl;
1299 dvma_kvtopa(iorq->dbuf, iorq->xdc->bustype);
1494 if (xdcsc->xdc->xdc_csr & XDC_ADDING) {
1529 XDC_GO(xdcsc->xdc, iopbaddr); /* go! */
1565 struct xdc *xdc = xdcsc->xdc;
1576 XDC_WAIT(xdc, count, XDC_MAXTIME, (XDC_REMIOPB | XDC_F_ERROR));
1631 * xdc_reset: reset one drive. NOTE: assumes xdc was just reset.
1646 XDC_GO(xdcsc->xdc, addr); /* go! */
1647 XDC_WAIT(xdcsc->xdc, del, XDC_RESETUSEC, XDC_REMIOPB);
1651 xdcsc->xdc->xdc_csr = XDC_RESET;
1652 XDC_WAIT(xdcsc->xdc, del, XDC_RESETUSEC, XDC_RESET);
1656 xdcsc->xdc->xdc_csr = XDC_CLRRIO; /* clear RIO */
1678 xdcsc->xdc->xdc_csr = XDC_RESET;
1679 XDC_WAIT(xdcsc->xdc, del, XDC_RESETUSEC, XDC_RESET);
1764 (xdcsc->xdc->xdc_csr & XDC_ADDING) == 0) {
1780 struct xdc *xdc = xdcsc->xdc;
1785 if (xdc->xdc_csr & XDC_F_ERROR) {
1791 errno = xdc->xdc_f_err;
1815 if (xdc->xdc_csr & XDC_REMIOPB) {
1816 xdc->xdc_csr = XDC_CLRRIO;
1949 device_xname(iorq->xdc->sc_dev));
2098 xdcsc->xdc->xdc_csr, xdcsc->nwait, xdcsc->nfree, xdcsc->nrun,
2111 /* reduce ttl for each request if one goes to zero, reset xdc */