Home | History | Annotate | Download | only in dev

Lines Matching defs:xyc

99 #error "xyc but no xy?"
107 * XYC_GO: start iopb ADDR (DVMA addr in a u_long) on XYC
109 #define XYC_GO(XYC, ADDR) \
111 (XYC)->xyc_addr_lo = ((ADDR) & 0xff); \
113 (XYC)->xyc_addr_hi = ((ADDR) & 0xff); \
115 (XYC)->xyc_reloc_lo = ((ADDR) & 0xff); \
117 (XYC)->xyc_reloc_hi = (ADDR); \
118 (XYC)->xyc_csr = XYC_GBSY; /* go! */ \
178 int xyc_unbusy(struct xyc *, int);
200 CFATTACH_DECL_NEW(xyc, sizeof(struct xyc_softc),
321 * xycmatch: determine if xyc is present or not. we do a
322 * soft reset to detect the xyc.
350 struct xyc_softc *xyc = device_private(self);
360 xyc->sc_dev = self;
361 xyc->xyc = (struct xyc *)bus_mapin(ca->ca_bustype, ca->ca_paddr,
362 sizeof(struct xyc));
363 xyc->bustype = ca->ca_bustype;
364 xyc->ipl = ca->ca_intpri;
365 xyc->vector = ca->ca_intvec;
366 xyc->no_ols = 0; /* XXX should be from config */
369 xyc->sc_drives[lcv] = NULL;
390 xyc->iopbase = tmp;
391 xyc->dvmaiopb =
392 (struct xy_iopb *)dvma_kvtopa(xyc->iopbase, xyc->bustype);
393 xyc->reqs = kmem_zalloc(XYC_MAXIOPB * sizeof(struct xy_iorq),
402 xyc->xy_chain[lcv] = NULL;
403 xyc->reqs[lcv].iopb = &xyc->iopbase[lcv];
404 xyc->iopbase[lcv].asr = 1; /* always the same */
405 xyc->iopbase[lcv].eef = 1; /* always the same */
406 xyc->iopbase[lcv].ecm = XY_ECM; /* always the same */
407 xyc->iopbase[lcv].aud = 1; /* always the same */
408 xyc->iopbase[lcv].relo = 1; /* always the same */
409 xyc->iopbase[lcv].thro = XY_THRO;/* always the same */
411 xyc->ciorq = &xyc->reqs[XYC_CTLIOPB]; /* short hand name */
412 xyc->ciopb = &xyc->iopbase[XYC_CTLIOPB]; /* short hand name */
413 xyc->xy_hand = 0;
417 err = xyc_cmd(xyc, XYCMD_ST, 0, 0, 0, 0, 0, XY_SUB_POLL);
418 res = xyc->ciopb->ctyp;
419 XYC_DONE(xyc, err);
427 if (xyc->no_ols)
435 if ((xyc->xyc->xyc_csr & XYC_ADRM) == 0) {
443 isr_add_vectored(xycintr, xyc, ca->ca_intpri, ca->ca_intvec);
444 evcnt_attach_dynamic(&xyc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
447 callout_init(&xyc->sc_tick_ch, 0);
454 callout_reset(&xyc->sc_tick_ch, XYC_TICKCNT, xyc_tick, xyc);
477 * xy* and xyc* devices, to simplify boot device identification.
500 struct xyc_softc *xyc = device_private(parent);
515 xy->parent = xyc;
519 xy->xyrq = &xyc->reqs[xa->driveno];
522 xyc->sc_drives[xa->driveno] = xy;
539 struct xyc_softc *xyc;
544 xyc = xy->parent;
552 err = xyc_cmd(xyc, XYCMD_RST, 0, xy->xy_drive, 0, 0, 0, fullmode);
553 XYC_DONE(xyc, err);
583 err = xyc_cmd(xyc, XYCMD_RD, 0, xy->xy_drive, 0, 1,
585 XYC_DONE(xyc, err);
629 oxy = xyc->sc_drives[lcv];
637 device_xname(xyc->sc_dev),
649 err = xyc_cmd(xyc, XYCMD_SDS, 0, xy->xy_drive, blk, 0, 0, fullmode);
650 XYC_DONE(xyc, err);
665 err = xyc_cmd(xyc, XYCMD_RD, 0, xy->xy_drive, blk, 1,
667 XYC_DONE(xyc, err);
1124 xyc_rqinit(struct xy_iorq *rq, struct xyc_softc *xyc, struct xy_softc *xy,
1128 rq->xyc = xyc;
1178 dp = dvma_kvtopa(iorq->dbuf, iorq->xyc->bustype);
1187 * xyc_unbusy: wait for the xyc to go unbusy, or timeout.
1191 xyc_unbusy(struct xyc *xyc, int del)
1195 if ((xyc->xyc_csr & XYC_GBSY) == 0)
1367 if ((xycsc->xyc->xyc_csr & XYC_GBSY) != 0) {
1369 printf("%s: XYC not ready (BUSY)\n", __func__);
1382 iopbaddr = xycsc->xyc->xyc_rsetup; /* RESET */
1383 if (xyc_unbusy(xycsc->xyc, XYC_RESETUSEC) ==
1385 panic("%s: stuck xyc", __func__);
1402 XYC_GO(xycsc->xyc, iopbaddr);
1510 res = xyc_unbusy(xycsc->xyc, XYC_MAXTIME);
1552 * xyc_xyreset: reset one drive. NOTE: assumes xyc was just reset.
1568 XYC_GO(xycsc->xyc, addr);
1572 if ((xycsc->xyc->xyc_csr & XYC_GBSY) == 0)
1581 del = xycsc->xyc->xyc_rsetup;
1582 if (xyc_unbusy(xycsc->xyc, XYC_RESETUSEC) == XY_ERR_FAIL)
1585 xycsc->xyc->xyc_csr = XYC_IPND; /* clear IPND */
1606 del = xycsc->xyc->xyc_rsetup;
1607 del = xyc_unbusy(xycsc->xyc, XYC_RESETUSEC);
1700 struct xyc *xyc = xycsc->xyc;
1706 if (xyc->xyc_csr & XYC_DERR) {
1726 if (xyc->xyc_csr & XYC_ERR) {
1727 xyc->xyc_csr = XYC_ERR; /* clear error condition */
1729 if (xyc->xyc_csr & XYC_IPND) {
1730 xyc->xyc_csr = XYC_IPND; /* clear interrupt */
1847 : device_xname(iorq->xyc->sc_dev));
1940 /* reduce ttl for each request if one goes to zero, reset xyc */