tag | line | file | source code |
brdp | 450 | drivers/char/istallion.c | #define EBRDINIT(brdp) \ |
brdp | 451 | drivers/char/istallion.c | if (brdp->init != NULL) \ |
brdp | 452 | drivers/char/istallion.c | (* brdp->init)(brdp) |
brdp | 454 | drivers/char/istallion.c | #define EBRDENABLE(brdp) \ |
brdp | 455 | drivers/char/istallion.c | if (brdp->enable != NULL) \ |
brdp | 456 | drivers/char/istallion.c | (* brdp->enable)(brdp); |
brdp | 458 | drivers/char/istallion.c | #define EBRDDISABLE(brdp) \ |
brdp | 459 | drivers/char/istallion.c | if (brdp->disable != NULL) \ |
brdp | 460 | drivers/char/istallion.c | (* brdp->disable)(brdp); |
brdp | 462 | drivers/char/istallion.c | #define EBRDINTR(brdp) \ |
brdp | 463 | drivers/char/istallion.c | if (brdp->intr != NULL) \ |
brdp | 464 | drivers/char/istallion.c | (* brdp->intr)(brdp); |
brdp | 466 | drivers/char/istallion.c | #define EBRDRESET(brdp) \ |
brdp | 467 | drivers/char/istallion.c | if (brdp->reset != NULL) \ |
brdp | 468 | drivers/char/istallion.c | (* brdp->reset)(brdp); |
brdp | 470 | drivers/char/istallion.c | #define EBRDGETMEMPTR(brdp,offset) \ |
brdp | 471 | drivers/char/istallion.c | (* brdp->getmemptr)(brdp, offset, __LINE__) |
brdp | 534 | drivers/char/istallion.c | static int stli_brdinit(stlibrd_t *brdp); |
brdp | 535 | drivers/char/istallion.c | static int stli_initecp(stlibrd_t *brdp); |
brdp | 536 | drivers/char/istallion.c | static int stli_initonb(stlibrd_t *brdp); |
brdp | 537 | drivers/char/istallion.c | static int stli_eisamemprobe(stlibrd_t *brdp); |
brdp | 539 | drivers/char/istallion.c | static int stli_initports(stlibrd_t *brdp); |
brdp | 540 | drivers/char/istallion.c | static int stli_startbrd(stlibrd_t *brdp); |
brdp | 545 | drivers/char/istallion.c | static int stli_hostcmd(stlibrd_t *brdp, int channr); |
brdp | 546 | drivers/char/istallion.c | static int stli_initopen(stlibrd_t *brdp, stliport_t *portp); |
brdp | 547 | drivers/char/istallion.c | static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); |
brdp | 548 | drivers/char/istallion.c | static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); |
brdp | 549 | drivers/char/istallion.c | static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp); |
brdp | 553 | drivers/char/istallion.c | static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); |
brdp | 554 | drivers/char/istallion.c | static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); |
brdp | 559 | drivers/char/istallion.c | static void stli_read(stlibrd_t *brdp, stliport_t *portp); |
brdp | 569 | drivers/char/istallion.c | static void stli_ecpinit(stlibrd_t *brdp); |
brdp | 570 | drivers/char/istallion.c | static void stli_ecpenable(stlibrd_t *brdp); |
brdp | 571 | drivers/char/istallion.c | static void stli_ecpdisable(stlibrd_t *brdp); |
brdp | 572 | drivers/char/istallion.c | static char *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); |
brdp | 573 | drivers/char/istallion.c | static void stli_ecpreset(stlibrd_t *brdp); |
brdp | 574 | drivers/char/istallion.c | static void stli_ecpintr(stlibrd_t *brdp); |
brdp | 575 | drivers/char/istallion.c | static void stli_ecpeiinit(stlibrd_t *brdp); |
brdp | 576 | drivers/char/istallion.c | static void stli_ecpeienable(stlibrd_t *brdp); |
brdp | 577 | drivers/char/istallion.c | static void stli_ecpeidisable(stlibrd_t *brdp); |
brdp | 578 | drivers/char/istallion.c | static char *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line); |
brdp | 579 | drivers/char/istallion.c | static void stli_ecpeireset(stlibrd_t *brdp); |
brdp | 580 | drivers/char/istallion.c | static void stli_ecpmcenable(stlibrd_t *brdp); |
brdp | 581 | drivers/char/istallion.c | static void stli_ecpmcdisable(stlibrd_t *brdp); |
brdp | 582 | drivers/char/istallion.c | static char *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); |
brdp | 583 | drivers/char/istallion.c | static void stli_ecpmcreset(stlibrd_t *brdp); |
brdp | 585 | drivers/char/istallion.c | static void stli_onbinit(stlibrd_t *brdp); |
brdp | 586 | drivers/char/istallion.c | static void stli_onbenable(stlibrd_t *brdp); |
brdp | 587 | drivers/char/istallion.c | static void stli_onbdisable(stlibrd_t *brdp); |
brdp | 588 | drivers/char/istallion.c | static char *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); |
brdp | 589 | drivers/char/istallion.c | static void stli_onbreset(stlibrd_t *brdp); |
brdp | 590 | drivers/char/istallion.c | static void stli_onbeinit(stlibrd_t *brdp); |
brdp | 591 | drivers/char/istallion.c | static void stli_onbeenable(stlibrd_t *brdp); |
brdp | 592 | drivers/char/istallion.c | static void stli_onbedisable(stlibrd_t *brdp); |
brdp | 593 | drivers/char/istallion.c | static char *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line); |
brdp | 594 | drivers/char/istallion.c | static void stli_onbereset(stlibrd_t *brdp); |
brdp | 595 | drivers/char/istallion.c | static void stli_bbyinit(stlibrd_t *brdp); |
brdp | 596 | drivers/char/istallion.c | static char *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line); |
brdp | 597 | drivers/char/istallion.c | static void stli_bbyreset(stlibrd_t *brdp); |
brdp | 598 | drivers/char/istallion.c | static void stli_stalinit(stlibrd_t *brdp); |
brdp | 599 | drivers/char/istallion.c | static char *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); |
brdp | 600 | drivers/char/istallion.c | static void stli_stalreset(stlibrd_t *brdp); |
brdp | 672 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 711 | drivers/char/istallion.c | brdp = stli_brds[i]; |
brdp | 712 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 715 | drivers/char/istallion.c | portp = brdp->ports[j]; |
brdp | 723 | drivers/char/istallion.c | if (brdp->memaddr >= 0x100000) |
brdp | 724 | drivers/char/istallion.c | vfree(brdp->membase); |
brdp | 725 | drivers/char/istallion.c | if ((brdp->brdtype == BRD_ECP) || (brdp->brdtype == BRD_ECPE) || (brdp->brdtype == BRD_ECPMC)) |
brdp | 726 | drivers/char/istallion.c | release_region(brdp->iobase, ECP_IOSIZE); |
brdp | 728 | drivers/char/istallion.c | release_region(brdp->iobase, ONB_IOSIZE); |
brdp | 729 | drivers/char/istallion.c | kfree_s(brdp, sizeof(stlibrd_t)); |
brdp | 753 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 766 | drivers/char/istallion.c | brdp = stli_brds[brdnr]; |
brdp | 767 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 769 | drivers/char/istallion.c | if ((brdp->state & BST_STARTED) == 0) |
brdp | 772 | drivers/char/istallion.c | if ((portnr < 0) || (portnr > brdp->nrports)) |
brdp | 775 | drivers/char/istallion.c | portp = brdp->ports[portnr]; |
brdp | 812 | drivers/char/istallion.c | if ((rc = stli_initopen(brdp, portp)) >= 0) { |
brdp | 857 | drivers/char/istallion.c | if ((rc = stli_waitcarrier(brdp, portp, filp)) != 0) |
brdp | 880 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 925 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 926 | drivers/char/istallion.c | stli_rawclose(brdp, portp, 0, 0); |
brdp | 932 | drivers/char/istallion.c | stli_sendcmd(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0); |
brdp | 967 | drivers/char/istallion.c | static int stli_initopen(stlibrd_t *brdp, stliport_t *portp) |
brdp | 975 | drivers/char/istallion.c | printk("stli_initopen(brdp=%x,portp=%x)\n", (int) brdp, (int) portp); |
brdp | 978 | drivers/char/istallion.c | if ((rc = stli_rawopen(brdp, portp, 0, 1)) < 0) |
brdp | 984 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_SETNOTIFY, &nt, sizeof(asynotify_t), 0)) < 0) |
brdp | 991 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)) < 0) |
brdp | 995 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0) |
brdp | 1000 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0) |
brdp | 1015 | drivers/char/istallion.c | static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) |
brdp | 1024 | drivers/char/istallion.c | printk("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait); |
brdp | 1052 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 1053 | drivers/char/istallion.c | cp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; |
brdp | 1056 | drivers/char/istallion.c | hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); |
brdp | 1058 | drivers/char/istallion.c | bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; |
brdp | 1060 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 1095 | drivers/char/istallion.c | static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) |
brdp | 1104 | drivers/char/istallion.c | printk("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait); |
brdp | 1127 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 1128 | drivers/char/istallion.c | cp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; |
brdp | 1131 | drivers/char/istallion.c | hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); |
brdp | 1133 | drivers/char/istallion.c | bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; |
brdp | 1135 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 1171 | drivers/char/istallion.c | static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) |
brdp | 1176 | drivers/char/istallion.c | printk("stli_cmdwait(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d,copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, (int) arg, size, copyback); |
brdp | 1189 | drivers/char/istallion.c | stli_sendcmd(brdp, portp, cmd, arg, size, copyback); |
brdp | 1214 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1227 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1228 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1232 | drivers/char/istallion.c | return(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)); |
brdp | 1262 | drivers/char/istallion.c | static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp) |
brdp | 1268 | drivers/char/istallion.c | printk("stli_waitcarrier(brdp=%x,portp=%x,filp=%x)\n", (int) brdp, (int) portp, (int) filp); |
brdp | 1291 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0) |
brdp | 1336 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1353 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1354 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1372 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 1373 | drivers/char/istallion.c | ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); |
brdp | 1380 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 1394 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 1395 | drivers/char/istallion.c | ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); |
brdp | 1411 | drivers/char/istallion.c | shbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset); |
brdp | 1426 | drivers/char/istallion.c | ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); |
brdp | 1432 | drivers/char/istallion.c | hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); |
brdp | 1434 | drivers/char/istallion.c | bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; |
brdp | 1438 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 1488 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1517 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1518 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1523 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 1525 | drivers/char/istallion.c | ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); |
brdp | 1541 | drivers/char/istallion.c | shbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset); |
brdp | 1557 | drivers/char/istallion.c | ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); |
brdp | 1564 | drivers/char/istallion.c | hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); |
brdp | 1566 | drivers/char/istallion.c | bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; |
brdp | 1570 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 1580 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1602 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1603 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1608 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 1609 | drivers/char/istallion.c | rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq; |
brdp | 1616 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 1640 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1657 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1658 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1663 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 1664 | drivers/char/istallion.c | rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq; |
brdp | 1672 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 1687 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1705 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1706 | drivers/char/istallion.c | if (brdp != (stlibrd_t *) NULL) |
brdp | 1707 | drivers/char/istallion.c | sio.port = brdp->iobase; |
brdp | 1753 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1768 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1769 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1780 | drivers/char/istallion.c | rc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0); |
brdp | 1788 | drivers/char/istallion.c | rc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0); |
brdp | 1803 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0) |
brdp | 1813 | drivers/char/istallion.c | rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0); |
brdp | 1820 | drivers/char/istallion.c | rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0); |
brdp | 1827 | drivers/char/istallion.c | rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0); |
brdp | 1881 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1896 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1897 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1905 | drivers/char/istallion.c | stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0); |
brdp | 1907 | drivers/char/istallion.c | stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0); |
brdp | 1977 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 1992 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 1993 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 1999 | drivers/char/istallion.c | stli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t)); |
brdp | 2012 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 2026 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 2027 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 2033 | drivers/char/istallion.c | stli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t)); |
brdp | 2076 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 2090 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 2091 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 2099 | drivers/char/istallion.c | stli_rawclose(brdp, portp, 0, 0); |
brdp | 2107 | drivers/char/istallion.c | stli_sendcmd(brdp, portp, A_SETSIGNALSF, &portp->asig, sizeof(asysigs_t), 0); |
brdp | 2134 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 2148 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 2149 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 2167 | drivers/char/istallion.c | stli_sendcmd(brdp, portp, A_FLUSH, &ftype, sizeof(unsigned long), 0); |
brdp | 2188 | drivers/char/istallion.c | static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) |
brdp | 2196 | drivers/char/istallion.c | printk("stli_sendcmd(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d,copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, (int) arg, size, copyback); |
brdp | 2208 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 2209 | drivers/char/istallion.c | cp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; |
brdp | 2219 | drivers/char/istallion.c | hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); |
brdp | 2221 | drivers/char/istallion.c | bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; |
brdp | 2224 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 2238 | drivers/char/istallion.c | static inline void stli_read(stlibrd_t *brdp, stliport_t *portp) |
brdp | 2247 | drivers/char/istallion.c | printk("stli_read(brdp=%x,portp=%d)\n", (int) brdp, (int) portp); |
brdp | 2256 | drivers/char/istallion.c | rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq; |
brdp | 2271 | drivers/char/istallion.c | shbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset); |
brdp | 2288 | drivers/char/istallion.c | rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq; |
brdp | 2347 | drivers/char/istallion.c | static inline int stli_hostcmd(stlibrd_t *brdp, int channr) |
brdp | 2358 | drivers/char/istallion.c | printk("stli_hostcmd(brdp=%x,channr=%d)\n", (int) brdp, channr); |
brdp | 2361 | drivers/char/istallion.c | portp = brdp->ports[(channr - 1)]; |
brdp | 2362 | drivers/char/istallion.c | ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); |
brdp | 2451 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 2466 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 2476 | drivers/char/istallion.c | stli_read(brdp, portp); |
brdp | 2490 | drivers/char/istallion.c | stli_read(brdp, portp); |
brdp | 2513 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 2524 | drivers/char/istallion.c | brdp = stli_brds[brdnr]; |
brdp | 2525 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 2527 | drivers/char/istallion.c | if ((brdp->state & BST_STARTED) == 0) |
brdp | 2530 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 2531 | drivers/char/istallion.c | hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); |
brdp | 2534 | drivers/char/istallion.c | bitsize = brdp->bitsize; |
brdp | 2535 | drivers/char/istallion.c | nrdevs = brdp->nrdevs; |
brdp | 2545 | drivers/char/istallion.c | memcpy(&bits[0], (((unsigned char *) hdrp) + brdp->hostoffset), bitsize); |
brdp | 2553 | drivers/char/istallion.c | stli_hostcmd(brdp, channr); |
brdp | 2567 | drivers/char/istallion.c | memcpy(&bits[0], (((unsigned char *) hdrp) + brdp->slaveoffset), bitsize); |
brdp | 2575 | drivers/char/istallion.c | portp = brdp->ports[(channr - 1)]; |
brdp | 2590 | drivers/char/istallion.c | memcpy((((unsigned char *) hdrp) + brdp->slaveoffset), &bits[0], bitsize); |
brdp | 2593 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 2768 | drivers/char/istallion.c | static int stli_initports(stlibrd_t *brdp) |
brdp | 2774 | drivers/char/istallion.c | printk("stli_initports(brdp=%x)\n", (int) brdp); |
brdp | 2777 | drivers/char/istallion.c | for (i = 0, panelnr = 0, panelport = 0; (i < brdp->nrports); i++) { |
brdp | 2787 | drivers/char/istallion.c | portp->brdnr = brdp->brdnr; |
brdp | 2797 | drivers/char/istallion.c | if (panelport >= brdp->panels[panelnr]) { |
brdp | 2801 | drivers/char/istallion.c | brdp->ports[i] = portp; |
brdp | 2813 | drivers/char/istallion.c | static void stli_ecpinit(stlibrd_t *brdp) |
brdp | 2818 | drivers/char/istallion.c | printk("stli_ecpinit(brdp=%d)\n", (int) brdp); |
brdp | 2821 | drivers/char/istallion.c | outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR)); |
brdp | 2823 | drivers/char/istallion.c | outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); |
brdp | 2826 | drivers/char/istallion.c | memconf = (brdp->memaddr & ECP_ATADDRMASK) >> ECP_ATADDRSHFT; |
brdp | 2827 | drivers/char/istallion.c | outb(memconf, (brdp->iobase + ECP_ATMEMAR)); |
brdp | 2832 | drivers/char/istallion.c | static void stli_ecpenable(stlibrd_t *brdp) |
brdp | 2835 | drivers/char/istallion.c | printk("stli_ecpenable(brdp=%x)\n", (int) brdp); |
brdp | 2837 | drivers/char/istallion.c | outb(ECP_ATENABLE, (brdp->iobase + ECP_ATCONFR)); |
brdp | 2842 | drivers/char/istallion.c | static void stli_ecpdisable(stlibrd_t *brdp) |
brdp | 2845 | drivers/char/istallion.c | printk("stli_ecpdisable(brdp=%x)\n", (int) brdp); |
brdp | 2847 | drivers/char/istallion.c | outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); |
brdp | 2852 | drivers/char/istallion.c | static char *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) |
brdp | 2858 | drivers/char/istallion.c | printk("stli_ecpgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); |
brdp | 2861 | drivers/char/istallion.c | if (offset > brdp->memsize) { |
brdp | 2862 | drivers/char/istallion.c | printk("STALLION: shared memory pointer=%x out of range at line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); |
brdp | 2866 | drivers/char/istallion.c | ptr = brdp->membase + (offset % ECP_ATPAGESIZE); |
brdp | 2869 | drivers/char/istallion.c | outb(val, (brdp->iobase + ECP_ATMEMPR)); |
brdp | 2875 | drivers/char/istallion.c | static void stli_ecpreset(stlibrd_t *brdp) |
brdp | 2878 | drivers/char/istallion.c | printk("stli_ecpreset(brdp=%x)\n", (int) brdp); |
brdp | 2881 | drivers/char/istallion.c | outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR)); |
brdp | 2883 | drivers/char/istallion.c | outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); |
brdp | 2889 | drivers/char/istallion.c | static void stli_ecpintr(stlibrd_t *brdp) |
brdp | 2892 | drivers/char/istallion.c | printk("stli_ecpintr(brdp=%x)\n", (int) brdp); |
brdp | 2894 | drivers/char/istallion.c | outb(0x1, brdp->iobase); |
brdp | 2903 | drivers/char/istallion.c | static void stli_ecpeiinit(stlibrd_t *brdp) |
brdp | 2908 | drivers/char/istallion.c | printk("stli_ecpeiinit(brdp=%x)\n", (int) brdp); |
brdp | 2911 | drivers/char/istallion.c | outb(0x1, (brdp->iobase + ECP_EIBRDENAB)); |
brdp | 2912 | drivers/char/istallion.c | outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR)); |
brdp | 2914 | drivers/char/istallion.c | outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR)); |
brdp | 2917 | drivers/char/istallion.c | memconf = (brdp->memaddr & ECP_EIADDRMASKL) >> ECP_EIADDRSHFTL; |
brdp | 2918 | drivers/char/istallion.c | outb(memconf, (brdp->iobase + ECP_EIMEMARL)); |
brdp | 2919 | drivers/char/istallion.c | memconf = (brdp->memaddr & ECP_EIADDRMASKH) >> ECP_EIADDRSHFTH; |
brdp | 2920 | drivers/char/istallion.c | outb(memconf, (brdp->iobase + ECP_EIMEMARH)); |
brdp | 2925 | drivers/char/istallion.c | static void stli_ecpeienable(stlibrd_t *brdp) |
brdp | 2927 | drivers/char/istallion.c | outb(ECP_EIENABLE, (brdp->iobase + ECP_EICONFR)); |
brdp | 2932 | drivers/char/istallion.c | static void stli_ecpeidisable(stlibrd_t *brdp) |
brdp | 2934 | drivers/char/istallion.c | outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR)); |
brdp | 2939 | drivers/char/istallion.c | static char *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line) |
brdp | 2945 | drivers/char/istallion.c | printk("stli_ecpeigetmemptr(brdp=%x,offset=%x,line=%d)\n", (int) brdp, (int) offset, line); |
brdp | 2948 | drivers/char/istallion.c | if (offset > brdp->memsize) { |
brdp | 2949 | drivers/char/istallion.c | printk("STALLION: shared memory pointer=%x out of range at line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); |
brdp | 2953 | drivers/char/istallion.c | ptr = brdp->membase + (offset % ECP_EIPAGESIZE); |
brdp | 2959 | drivers/char/istallion.c | outb(val, (brdp->iobase + ECP_EICONFR)); |
brdp | 2965 | drivers/char/istallion.c | static void stli_ecpeireset(stlibrd_t *brdp) |
brdp | 2967 | drivers/char/istallion.c | outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR)); |
brdp | 2969 | drivers/char/istallion.c | outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR)); |
brdp | 2979 | drivers/char/istallion.c | static void stli_ecpmcenable(stlibrd_t *brdp) |
brdp | 2981 | drivers/char/istallion.c | outb(ECP_MCENABLE, (brdp->iobase + ECP_MCCONFR)); |
brdp | 2986 | drivers/char/istallion.c | static void stli_ecpmcdisable(stlibrd_t *brdp) |
brdp | 2988 | drivers/char/istallion.c | outb(ECP_MCDISABLE, (brdp->iobase + ECP_MCCONFR)); |
brdp | 2993 | drivers/char/istallion.c | static char *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) |
brdp | 2998 | drivers/char/istallion.c | if (offset > brdp->memsize) { |
brdp | 2999 | drivers/char/istallion.c | printk("STALLION: shared memory pointer=%x out of range at line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); |
brdp | 3003 | drivers/char/istallion.c | ptr = brdp->membase + (offset % ECP_MCPAGESIZE); |
brdp | 3006 | drivers/char/istallion.c | outb(val, (brdp->iobase + ECP_MCCONFR)); |
brdp | 3012 | drivers/char/istallion.c | static void stli_ecpmcreset(stlibrd_t *brdp) |
brdp | 3014 | drivers/char/istallion.c | outb(ECP_MCSTOP, (brdp->iobase + ECP_MCCONFR)); |
brdp | 3016 | drivers/char/istallion.c | outb(ECP_MCDISABLE, (brdp->iobase + ECP_MCCONFR)); |
brdp | 3026 | drivers/char/istallion.c | static void stli_onbinit(stlibrd_t *brdp) |
brdp | 3032 | drivers/char/istallion.c | printk("stli_onbinit(brdp=%d)\n", (int) brdp); |
brdp | 3035 | drivers/char/istallion.c | outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR)); |
brdp | 3037 | drivers/char/istallion.c | outb(ONB_ATDISABLE, (brdp->iobase + ONB_ATCONFR)); |
brdp | 3041 | drivers/char/istallion.c | memconf = (brdp->memaddr & ONB_ATADDRMASK) >> ONB_ATADDRSHFT; |
brdp | 3042 | drivers/char/istallion.c | outb(memconf, (brdp->iobase + ONB_ATMEMAR)); |
brdp | 3043 | drivers/char/istallion.c | outb(0x1, brdp->iobase); |
brdp | 3049 | drivers/char/istallion.c | static void stli_onbenable(stlibrd_t *brdp) |
brdp | 3052 | drivers/char/istallion.c | printk("stli_onbenable(brdp=%x)\n", (int) brdp); |
brdp | 3054 | drivers/char/istallion.c | outb((brdp->enabval | ONB_ATENABLE), (brdp->iobase + ONB_ATCONFR)); |
brdp | 3059 | drivers/char/istallion.c | static void stli_onbdisable(stlibrd_t *brdp) |
brdp | 3062 | drivers/char/istallion.c | printk("stli_onbdisable(brdp=%x)\n", (int) brdp); |
brdp | 3064 | drivers/char/istallion.c | outb((brdp->enabval | ONB_ATDISABLE), (brdp->iobase + ONB_ATCONFR)); |
brdp | 3069 | drivers/char/istallion.c | static char *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) |
brdp | 3074 | drivers/char/istallion.c | printk("stli_onbgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); |
brdp | 3077 | drivers/char/istallion.c | if (offset > brdp->memsize) { |
brdp | 3078 | drivers/char/istallion.c | printk("STALLION: shared memory pointer=%x out of range at line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); |
brdp | 3081 | drivers/char/istallion.c | ptr = brdp->membase + (offset % ONB_ATPAGESIZE); |
brdp | 3088 | drivers/char/istallion.c | static void stli_onbreset(stlibrd_t *brdp) |
brdp | 3093 | drivers/char/istallion.c | printk("stli_onbreset(brdp=%x)\n", (int) brdp); |
brdp | 3096 | drivers/char/istallion.c | outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR)); |
brdp | 3098 | drivers/char/istallion.c | outb(ONB_ATDISABLE, (brdp->iobase + ONB_ATCONFR)); |
brdp | 3109 | drivers/char/istallion.c | static void stli_onbeinit(stlibrd_t *brdp) |
brdp | 3115 | drivers/char/istallion.c | printk("stli_onbeinit(brdp=%d)\n", (int) brdp); |
brdp | 3118 | drivers/char/istallion.c | outb(0x1, (brdp->iobase + ONB_EIBRDENAB)); |
brdp | 3119 | drivers/char/istallion.c | outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR)); |
brdp | 3121 | drivers/char/istallion.c | outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); |
brdp | 3125 | drivers/char/istallion.c | memconf = (brdp->memaddr & ONB_EIADDRMASKL) >> ONB_EIADDRSHFTL; |
brdp | 3126 | drivers/char/istallion.c | outb(memconf, (brdp->iobase + ONB_EIMEMARL)); |
brdp | 3127 | drivers/char/istallion.c | memconf = (brdp->memaddr & ONB_EIADDRMASKH) >> ONB_EIADDRSHFTH; |
brdp | 3128 | drivers/char/istallion.c | outb(memconf, (brdp->iobase + ONB_EIMEMARH)); |
brdp | 3129 | drivers/char/istallion.c | outb(0x1, brdp->iobase); |
brdp | 3135 | drivers/char/istallion.c | static void stli_onbeenable(stlibrd_t *brdp) |
brdp | 3138 | drivers/char/istallion.c | printk("stli_onbeenable(brdp=%x)\n", (int) brdp); |
brdp | 3140 | drivers/char/istallion.c | outb(ONB_EIENABLE, (brdp->iobase + ONB_EICONFR)); |
brdp | 3145 | drivers/char/istallion.c | static void stli_onbedisable(stlibrd_t *brdp) |
brdp | 3148 | drivers/char/istallion.c | printk("stli_onbedisable(brdp=%x)\n", (int) brdp); |
brdp | 3150 | drivers/char/istallion.c | outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); |
brdp | 3155 | drivers/char/istallion.c | static char *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) |
brdp | 3161 | drivers/char/istallion.c | printk("stli_onbegetmemptr(brdp=%x,offset=%x,line=%d)\n", (int) brdp, (int) offset, line); |
brdp | 3164 | drivers/char/istallion.c | if (offset > brdp->memsize) { |
brdp | 3165 | drivers/char/istallion.c | printk("STALLION: shared memory pointer=%x out of range at line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); |
brdp | 3169 | drivers/char/istallion.c | ptr = brdp->membase + (offset % ONB_EIPAGESIZE); |
brdp | 3175 | drivers/char/istallion.c | outb(val, (brdp->iobase + ONB_EICONFR)); |
brdp | 3181 | drivers/char/istallion.c | static void stli_onbereset(stlibrd_t *brdp) |
brdp | 3186 | drivers/char/istallion.c | printk("stli_onbereset(brdp=%x)\n", (int) brdp); |
brdp | 3189 | drivers/char/istallion.c | outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR)); |
brdp | 3191 | drivers/char/istallion.c | outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); |
brdp | 3202 | drivers/char/istallion.c | static void stli_bbyinit(stlibrd_t *brdp) |
brdp | 3207 | drivers/char/istallion.c | printk("stli_bbyinit(brdp=%d)\n", (int) brdp); |
brdp | 3210 | drivers/char/istallion.c | outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); |
brdp | 3212 | drivers/char/istallion.c | outb(0, (brdp->iobase + BBY_ATCONFR)); |
brdp | 3215 | drivers/char/istallion.c | outb(0x1, brdp->iobase); |
brdp | 3221 | drivers/char/istallion.c | static char *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) |
brdp | 3227 | drivers/char/istallion.c | printk("stli_bbygetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); |
brdp | 3230 | drivers/char/istallion.c | if (offset > brdp->memsize) { |
brdp | 3231 | drivers/char/istallion.c | printk("STALLION: shared memory pointer=%x out of range at line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); |
brdp | 3235 | drivers/char/istallion.c | ptr = brdp->membase + (offset % BBY_PAGESIZE); |
brdp | 3238 | drivers/char/istallion.c | outb(val, (brdp->iobase + BBY_ATCONFR)); |
brdp | 3244 | drivers/char/istallion.c | static void stli_bbyreset(stlibrd_t *brdp) |
brdp | 3249 | drivers/char/istallion.c | printk("stli_bbyreset(brdp=%x)\n", (int) brdp); |
brdp | 3252 | drivers/char/istallion.c | outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); |
brdp | 3254 | drivers/char/istallion.c | outb(0, (brdp->iobase + BBY_ATCONFR)); |
brdp | 3265 | drivers/char/istallion.c | static void stli_stalinit(stlibrd_t *brdp) |
brdp | 3270 | drivers/char/istallion.c | printk("stli_stalinit(brdp=%d)\n", (int) brdp); |
brdp | 3273 | drivers/char/istallion.c | outb(0x1, brdp->iobase); |
brdp | 3280 | drivers/char/istallion.c | static char *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) |
brdp | 3285 | drivers/char/istallion.c | printk("stli_stalgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); |
brdp | 3288 | drivers/char/istallion.c | if (offset > brdp->memsize) { |
brdp | 3289 | drivers/char/istallion.c | printk("STALLION: shared memory pointer=%x out of range at line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); |
brdp | 3292 | drivers/char/istallion.c | ptr = brdp->membase + (offset % STAL_PAGESIZE); |
brdp | 3299 | drivers/char/istallion.c | static void stli_stalreset(stlibrd_t *brdp) |
brdp | 3305 | drivers/char/istallion.c | printk("stli_stalreset(brdp=%x)\n", (int) brdp); |
brdp | 3308 | drivers/char/istallion.c | vecp = (volatile unsigned long *) (brdp->membase + 0x30); |
brdp | 3310 | drivers/char/istallion.c | outb(0, brdp->iobase); |
brdp | 3322 | drivers/char/istallion.c | static int stli_initecp(stlibrd_t *brdp) |
brdp | 3330 | drivers/char/istallion.c | printk("stli_initecp(brdp=%x)\n", (int) brdp); |
brdp | 3336 | drivers/char/istallion.c | if ((brdp->iobase == 0) || (brdp->memaddr == 0)) |
brdp | 3344 | drivers/char/istallion.c | switch (brdp->brdtype) { |
brdp | 3346 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3347 | drivers/char/istallion.c | brdp->memsize = ECP_MEMSIZE; |
brdp | 3348 | drivers/char/istallion.c | brdp->pagesize = ECP_ATPAGESIZE; |
brdp | 3349 | drivers/char/istallion.c | brdp->init = stli_ecpinit; |
brdp | 3350 | drivers/char/istallion.c | brdp->enable = stli_ecpenable; |
brdp | 3351 | drivers/char/istallion.c | brdp->reenable = stli_ecpenable; |
brdp | 3352 | drivers/char/istallion.c | brdp->disable = stli_ecpdisable; |
brdp | 3353 | drivers/char/istallion.c | brdp->getmemptr = stli_ecpgetmemptr; |
brdp | 3354 | drivers/char/istallion.c | brdp->intr = stli_ecpintr; |
brdp | 3355 | drivers/char/istallion.c | brdp->reset = stli_ecpreset; |
brdp | 3359 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3360 | drivers/char/istallion.c | brdp->memsize = ECP_MEMSIZE; |
brdp | 3361 | drivers/char/istallion.c | brdp->pagesize = ECP_EIPAGESIZE; |
brdp | 3362 | drivers/char/istallion.c | brdp->init = stli_ecpeiinit; |
brdp | 3363 | drivers/char/istallion.c | brdp->enable = stli_ecpeienable; |
brdp | 3364 | drivers/char/istallion.c | brdp->reenable = stli_ecpeienable; |
brdp | 3365 | drivers/char/istallion.c | brdp->disable = stli_ecpeidisable; |
brdp | 3366 | drivers/char/istallion.c | brdp->getmemptr = stli_ecpeigetmemptr; |
brdp | 3367 | drivers/char/istallion.c | brdp->intr = stli_ecpintr; |
brdp | 3368 | drivers/char/istallion.c | brdp->reset = stli_ecpeireset; |
brdp | 3372 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3373 | drivers/char/istallion.c | brdp->memsize = ECP_MEMSIZE; |
brdp | 3374 | drivers/char/istallion.c | brdp->pagesize = ECP_MCPAGESIZE; |
brdp | 3375 | drivers/char/istallion.c | brdp->init = NULL; |
brdp | 3376 | drivers/char/istallion.c | brdp->enable = stli_ecpmcenable; |
brdp | 3377 | drivers/char/istallion.c | brdp->reenable = stli_ecpmcenable; |
brdp | 3378 | drivers/char/istallion.c | brdp->disable = stli_ecpmcdisable; |
brdp | 3379 | drivers/char/istallion.c | brdp->getmemptr = stli_ecpmcgetmemptr; |
brdp | 3380 | drivers/char/istallion.c | brdp->intr = stli_ecpintr; |
brdp | 3381 | drivers/char/istallion.c | brdp->reset = stli_ecpmcreset; |
brdp | 3394 | drivers/char/istallion.c | EBRDINIT(brdp); |
brdp | 3396 | drivers/char/istallion.c | if (brdp->memaddr > 0x100000) { |
brdp | 3397 | drivers/char/istallion.c | brdp->membase = vremap(brdp->memaddr, brdp->memsize); |
brdp | 3398 | drivers/char/istallion.c | if (brdp->membase == (void *) NULL) |
brdp | 3407 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 3408 | drivers/char/istallion.c | sigsp = (cdkecpsig_t *) EBRDGETMEMPTR(brdp, CDK_SIGADDR); |
brdp | 3410 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 3432 | drivers/char/istallion.c | brdp->panels[panelnr] = 16; |
brdp | 3433 | drivers/char/istallion.c | brdp->nrports += 16; |
brdp | 3436 | drivers/char/istallion.c | brdp->panels[panelnr] = 8; |
brdp | 3437 | drivers/char/istallion.c | brdp->nrports += 8; |
brdp | 3440 | drivers/char/istallion.c | brdp->panelids[panelnr] = status; |
brdp | 3441 | drivers/char/istallion.c | brdp->nrpanels++; |
brdp | 3444 | drivers/char/istallion.c | request_region(brdp->iobase, ECP_IOSIZE, "serial(ECP)"); |
brdp | 3445 | drivers/char/istallion.c | brdp->state |= BST_FOUND; |
brdp | 3456 | drivers/char/istallion.c | static int stli_initonb(stlibrd_t *brdp) |
brdp | 3463 | drivers/char/istallion.c | printk("stli_initonb(brdp=%x)\n", (int) brdp); |
brdp | 3469 | drivers/char/istallion.c | if ((brdp->iobase == 0) || (brdp->memaddr == 0)) |
brdp | 3477 | drivers/char/istallion.c | switch (brdp->brdtype) { |
brdp | 3483 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3484 | drivers/char/istallion.c | brdp->memsize = ONB_MEMSIZE; |
brdp | 3485 | drivers/char/istallion.c | brdp->pagesize = ONB_ATPAGESIZE; |
brdp | 3486 | drivers/char/istallion.c | brdp->init = stli_onbinit; |
brdp | 3487 | drivers/char/istallion.c | brdp->enable = stli_onbenable; |
brdp | 3488 | drivers/char/istallion.c | brdp->reenable = stli_onbenable; |
brdp | 3489 | drivers/char/istallion.c | brdp->disable = stli_onbdisable; |
brdp | 3490 | drivers/char/istallion.c | brdp->getmemptr = stli_onbgetmemptr; |
brdp | 3491 | drivers/char/istallion.c | brdp->intr = stli_ecpintr; |
brdp | 3492 | drivers/char/istallion.c | brdp->reset = stli_onbreset; |
brdp | 3493 | drivers/char/istallion.c | if (brdp->memaddr > 0x100000) |
brdp | 3494 | drivers/char/istallion.c | brdp->enabval = ONB_MEMENABHI; |
brdp | 3496 | drivers/char/istallion.c | brdp->enabval = ONB_MEMENABLO; |
brdp | 3500 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3501 | drivers/char/istallion.c | brdp->memsize = ONB_EIMEMSIZE; |
brdp | 3502 | drivers/char/istallion.c | brdp->pagesize = ONB_EIPAGESIZE; |
brdp | 3503 | drivers/char/istallion.c | brdp->init = stli_onbeinit; |
brdp | 3504 | drivers/char/istallion.c | brdp->enable = stli_onbeenable; |
brdp | 3505 | drivers/char/istallion.c | brdp->reenable = stli_onbeenable; |
brdp | 3506 | drivers/char/istallion.c | brdp->disable = stli_onbedisable; |
brdp | 3507 | drivers/char/istallion.c | brdp->getmemptr = stli_onbegetmemptr; |
brdp | 3508 | drivers/char/istallion.c | brdp->intr = stli_ecpintr; |
brdp | 3509 | drivers/char/istallion.c | brdp->reset = stli_onbereset; |
brdp | 3515 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3516 | drivers/char/istallion.c | brdp->memsize = BBY_MEMSIZE; |
brdp | 3517 | drivers/char/istallion.c | brdp->pagesize = BBY_PAGESIZE; |
brdp | 3518 | drivers/char/istallion.c | brdp->init = stli_bbyinit; |
brdp | 3519 | drivers/char/istallion.c | brdp->enable = NULL; |
brdp | 3520 | drivers/char/istallion.c | brdp->reenable = NULL; |
brdp | 3521 | drivers/char/istallion.c | brdp->disable = NULL; |
brdp | 3522 | drivers/char/istallion.c | brdp->getmemptr = stli_bbygetmemptr; |
brdp | 3523 | drivers/char/istallion.c | brdp->intr = stli_ecpintr; |
brdp | 3524 | drivers/char/istallion.c | brdp->reset = stli_bbyreset; |
brdp | 3528 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3529 | drivers/char/istallion.c | brdp->memsize = STAL_MEMSIZE; |
brdp | 3530 | drivers/char/istallion.c | brdp->pagesize = STAL_PAGESIZE; |
brdp | 3531 | drivers/char/istallion.c | brdp->init = stli_stalinit; |
brdp | 3532 | drivers/char/istallion.c | brdp->enable = NULL; |
brdp | 3533 | drivers/char/istallion.c | brdp->reenable = NULL; |
brdp | 3534 | drivers/char/istallion.c | brdp->disable = NULL; |
brdp | 3535 | drivers/char/istallion.c | brdp->getmemptr = stli_stalgetmemptr; |
brdp | 3536 | drivers/char/istallion.c | brdp->intr = stli_ecpintr; |
brdp | 3537 | drivers/char/istallion.c | brdp->reset = stli_stalreset; |
brdp | 3550 | drivers/char/istallion.c | EBRDINIT(brdp); |
brdp | 3552 | drivers/char/istallion.c | if (brdp->memaddr > 0x100000) { |
brdp | 3553 | drivers/char/istallion.c | brdp->membase = vremap(brdp->memaddr, brdp->memsize); |
brdp | 3554 | drivers/char/istallion.c | if (brdp->membase == (void *) NULL) |
brdp | 3563 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 3564 | drivers/char/istallion.c | sigsp = (cdkonbsig_t *) EBRDGETMEMPTR(brdp, CDK_SIGADDR); |
brdp | 3566 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 3582 | drivers/char/istallion.c | brdp->nrpanels = 1; |
brdp | 3584 | drivers/char/istallion.c | brdp->nrports = 32; |
brdp | 3590 | drivers/char/istallion.c | brdp->nrports = i; |
brdp | 3592 | drivers/char/istallion.c | brdp->panels[0] = brdp->nrports; |
brdp | 3594 | drivers/char/istallion.c | request_region(brdp->iobase, ONB_IOSIZE, "serial(ONB/BBY)"); |
brdp | 3595 | drivers/char/istallion.c | brdp->state |= BST_FOUND; |
brdp | 3607 | drivers/char/istallion.c | static int stli_startbrd(stlibrd_t *brdp) |
brdp | 3617 | drivers/char/istallion.c | printk("stli_startbrd(brdp=%x)\n", (int) brdp); |
brdp | 3624 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 3625 | drivers/char/istallion.c | hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); |
brdp | 3635 | drivers/char/istallion.c | if (nrdevs < (brdp->nrports + 1)) { |
brdp | 3637 | drivers/char/istallion.c | brdp->nrports = nrdevs - 1; |
brdp | 3639 | drivers/char/istallion.c | brdp->nrdevs = nrdevs; |
brdp | 3640 | drivers/char/istallion.c | brdp->hostoffset = hdrp->hostp - CDK_CDKADDR; |
brdp | 3641 | drivers/char/istallion.c | brdp->slaveoffset = hdrp->slavep - CDK_CDKADDR; |
brdp | 3642 | drivers/char/istallion.c | brdp->bitsize = (nrdevs + 7) / 8; |
brdp | 3644 | drivers/char/istallion.c | if (((unsigned long) memp) > brdp->memsize) { |
brdp | 3649 | drivers/char/istallion.c | memp = (volatile cdkmem_t *) EBRDGETMEMPTR(brdp, (unsigned long) memp); |
brdp | 3664 | drivers/char/istallion.c | portp = brdp->ports[portnr]; |
brdp | 3680 | drivers/char/istallion.c | portp = brdp->ports[portnr]; |
brdp | 3685 | drivers/char/istallion.c | ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); |
brdp | 3695 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 3699 | drivers/char/istallion.c | brdp->state |= BST_STARTED; |
brdp | 3716 | drivers/char/istallion.c | static int stli_brdinit(stlibrd_t *brdp) |
brdp | 3719 | drivers/char/istallion.c | printk("stli_brdinit(brdp=%x)\n", (int) brdp); |
brdp | 3722 | drivers/char/istallion.c | stli_brds[brdp->brdnr] = brdp; |
brdp | 3724 | drivers/char/istallion.c | switch (brdp->brdtype) { |
brdp | 3728 | drivers/char/istallion.c | stli_initecp(brdp); |
brdp | 3740 | drivers/char/istallion.c | stli_initonb(brdp); |
brdp | 3746 | drivers/char/istallion.c | printk("STALLION: %s board type not supported in this driver\n", stli_brdnames[brdp->brdtype]); |
brdp | 3749 | drivers/char/istallion.c | printk("STALLION: unit=%d is unknown board type=%d\n", brdp->brdnr, brdp->brdtype); |
brdp | 3753 | drivers/char/istallion.c | if ((brdp->state & BST_FOUND) == 0) { |
brdp | 3754 | drivers/char/istallion.c | printk("STALLION: %s board not found, unit=%d io=%x mem=%x\n", stli_brdnames[brdp->brdtype], brdp->brdnr, brdp->iobase, (int) brdp->memaddr); |
brdp | 3758 | drivers/char/istallion.c | stli_initports(brdp); |
brdp | 3759 | drivers/char/istallion.c | printk("STALLION: %s found, unit=%d io=%x mem=%x nrpanels=%d nrports=%d\n", stli_brdnames[brdp->brdtype], brdp->brdnr, brdp->iobase, (int) brdp->memaddr, brdp->nrpanels, brdp->nrports); |
brdp | 3770 | drivers/char/istallion.c | static int stli_eisamemprobe(stlibrd_t *brdp) |
brdp | 3777 | drivers/char/istallion.c | printk("stli_eisamemprobe(brdp=%x)\n", (int) brdp); |
brdp | 3786 | drivers/char/istallion.c | if (brdp->brdtype == BRD_ECPE) { |
brdp | 3787 | drivers/char/istallion.c | outb(0x1, (brdp->iobase + ECP_EIBRDENAB)); |
brdp | 3788 | drivers/char/istallion.c | outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR)); |
brdp | 3790 | drivers/char/istallion.c | outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR)); |
brdp | 3792 | drivers/char/istallion.c | stli_ecpeienable(brdp); |
brdp | 3793 | drivers/char/istallion.c | } else if (brdp->brdtype == BRD_ONBOARDE) { |
brdp | 3794 | drivers/char/istallion.c | outb(0x1, (brdp->iobase + ONB_EIBRDENAB)); |
brdp | 3795 | drivers/char/istallion.c | outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR)); |
brdp | 3797 | drivers/char/istallion.c | outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); |
brdp | 3800 | drivers/char/istallion.c | outb(0x1, brdp->iobase); |
brdp | 3802 | drivers/char/istallion.c | stli_onbeenable(brdp); |
brdp | 3808 | drivers/char/istallion.c | brdp->memsize = ECP_MEMSIZE; |
brdp | 3815 | drivers/char/istallion.c | brdp->memaddr = stli_eisamemprobeaddrs[i]; |
brdp | 3816 | drivers/char/istallion.c | brdp->membase = (void *) brdp->memaddr; |
brdp | 3817 | drivers/char/istallion.c | if (brdp->memaddr > 0x100000) { |
brdp | 3818 | drivers/char/istallion.c | brdp->membase = vremap(brdp->memaddr, brdp->memsize); |
brdp | 3819 | drivers/char/istallion.c | if (brdp->membase == (void *) NULL) |
brdp | 3822 | drivers/char/istallion.c | if (brdp->brdtype == BRD_ECPE) { |
brdp | 3823 | drivers/char/istallion.c | ecpsigp = (cdkecpsig_t *) stli_ecpeigetmemptr(brdp, CDK_SIGADDR, __LINE__); |
brdp | 3828 | drivers/char/istallion.c | onbsigp = (cdkonbsig_t *) stli_onbegetmemptr(brdp, CDK_SIGADDR, __LINE__); |
brdp | 3834 | drivers/char/istallion.c | if (brdp->memaddr >= 0x100000) |
brdp | 3835 | drivers/char/istallion.c | vfree(brdp->membase); |
brdp | 3844 | drivers/char/istallion.c | if (brdp->brdtype == BRD_ECPE) |
brdp | 3845 | drivers/char/istallion.c | stli_ecpeidisable(brdp); |
brdp | 3847 | drivers/char/istallion.c | stli_onbedisable(brdp); |
brdp | 3850 | drivers/char/istallion.c | brdp->memaddr = 0; |
brdp | 3851 | drivers/char/istallion.c | brdp->membase = 0; |
brdp | 3852 | drivers/char/istallion.c | printk("STALLION: failed to probe shared memory region for %s in EISA slot=%d\n", stli_brdnames[brdp->brdtype], (brdp->iobase >> 12)); |
brdp | 3872 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 3904 | drivers/char/istallion.c | brdp = stli_brds[i]; |
brdp | 3905 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 3907 | drivers/char/istallion.c | if (brdp->iobase == iobase) |
brdp | 3926 | drivers/char/istallion.c | brdp = (stlibrd_t *) stli_memalloc(sizeof(stlibrd_t)); |
brdp | 3927 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) { |
brdp | 3931 | drivers/char/istallion.c | memset(brdp, 0, sizeof(stlibrd_t)); |
brdp | 3933 | drivers/char/istallion.c | brdp->magic = STLI_BOARDMAGIC; |
brdp | 3934 | drivers/char/istallion.c | brdp->brdnr = stli_nrbrds++; |
brdp | 3937 | drivers/char/istallion.c | brdp->brdtype = BRD_ECPE; |
brdp | 3939 | drivers/char/istallion.c | brdp->brdtype = BRD_ONBOARDE; |
brdp | 3941 | drivers/char/istallion.c | brdp->brdtype = BRD_UNKNOWN; |
brdp | 3942 | drivers/char/istallion.c | brdp->iobase = iobase; |
brdp | 3944 | drivers/char/istallion.c | if (stli_eisamemprobe(brdp)) |
brdp | 3946 | drivers/char/istallion.c | stli_brdinit(brdp); |
brdp | 3961 | drivers/char/istallion.c | stlibrd_t *brdp, *nxtbrdp; |
brdp | 3980 | drivers/char/istallion.c | brdp = (stlibrd_t *) stli_memalloc(sizeof(stlibrd_t)); |
brdp | 3981 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) { |
brdp | 3985 | drivers/char/istallion.c | memset(brdp, 0, sizeof(stlibrd_t)); |
brdp | 3987 | drivers/char/istallion.c | brdp->magic = STLI_BOARDMAGIC; |
brdp | 3988 | drivers/char/istallion.c | brdp->brdnr = i; |
brdp | 3989 | drivers/char/istallion.c | brdp->brdtype = confp->brdtype; |
brdp | 3990 | drivers/char/istallion.c | brdp->iobase = confp->ioaddr1; |
brdp | 3991 | drivers/char/istallion.c | brdp->memaddr = confp->memaddr; |
brdp | 3992 | drivers/char/istallion.c | stli_brdinit(brdp); |
brdp | 4009 | drivers/char/istallion.c | brdp = stli_brds[i]; |
brdp | 4010 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4016 | drivers/char/istallion.c | if ((brdp->membase >= nxtbrdp->membase) && (brdp->membase <= (nxtbrdp->membase + nxtbrdp->memsize - 1))) { |
brdp | 4026 | drivers/char/istallion.c | brdp = stli_brds[i]; |
brdp | 4027 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4029 | drivers/char/istallion.c | if (brdp->state & BST_FOUND) { |
brdp | 4030 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 4031 | drivers/char/istallion.c | brdp->enable = NULL; |
brdp | 4032 | drivers/char/istallion.c | brdp->disable = NULL; |
brdp | 4052 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4062 | drivers/char/istallion.c | brdp = stli_brds[brdnr]; |
brdp | 4063 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4065 | drivers/char/istallion.c | if (brdp->state == 0) |
brdp | 4067 | drivers/char/istallion.c | if (fp->f_pos >= brdp->memsize) |
brdp | 4070 | drivers/char/istallion.c | size = MIN(count, (brdp->memsize - fp->f_pos)); |
brdp | 4074 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 4076 | drivers/char/istallion.c | memptr = (void *) EBRDGETMEMPTR(brdp, fp->f_pos); |
brdp | 4077 | drivers/char/istallion.c | n = MIN(size, (brdp->pagesize - (((unsigned long) fp->f_pos) % brdp->pagesize))); |
brdp | 4083 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 4101 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4112 | drivers/char/istallion.c | brdp = stli_brds[brdnr]; |
brdp | 4113 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4115 | drivers/char/istallion.c | if (brdp->state == 0) |
brdp | 4117 | drivers/char/istallion.c | if (fp->f_pos >= brdp->memsize) |
brdp | 4121 | drivers/char/istallion.c | size = MIN(count, (brdp->memsize - fp->f_pos)); |
brdp | 4125 | drivers/char/istallion.c | EBRDENABLE(brdp); |
brdp | 4127 | drivers/char/istallion.c | memptr = (void *) EBRDGETMEMPTR(brdp, fp->f_pos); |
brdp | 4128 | drivers/char/istallion.c | n = MIN(size, (brdp->pagesize - (((unsigned long) fp->f_pos) % brdp->pagesize))); |
brdp | 4134 | drivers/char/istallion.c | EBRDDISABLE(brdp); |
brdp | 4148 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4154 | drivers/char/istallion.c | brdp = stli_brds[stli_brdstats.brd]; |
brdp | 4155 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4159 | drivers/char/istallion.c | stli_brdstats.brd = brdp->brdnr; |
brdp | 4160 | drivers/char/istallion.c | stli_brdstats.type = brdp->brdtype; |
brdp | 4162 | drivers/char/istallion.c | stli_brdstats.state = brdp->state; |
brdp | 4163 | drivers/char/istallion.c | stli_brdstats.ioaddr = brdp->iobase; |
brdp | 4164 | drivers/char/istallion.c | stli_brdstats.memaddr = brdp->memaddr; |
brdp | 4165 | drivers/char/istallion.c | stli_brdstats.nrpanels = brdp->nrpanels; |
brdp | 4166 | drivers/char/istallion.c | stli_brdstats.nrports = brdp->nrports; |
brdp | 4167 | drivers/char/istallion.c | for (i = 0; (i < brdp->nrpanels); i++) { |
brdp | 4169 | drivers/char/istallion.c | stli_brdstats.panels[i].hwid = brdp->panelids[i]; |
brdp | 4170 | drivers/char/istallion.c | stli_brdstats.panels[i].nrports = brdp->panels[i]; |
brdp | 4185 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4190 | drivers/char/istallion.c | brdp = stli_brds[brdnr]; |
brdp | 4191 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4194 | drivers/char/istallion.c | portnr += brdp->panels[i]; |
brdp | 4195 | drivers/char/istallion.c | if ((portnr < 0) || (portnr >= brdp->nrports)) |
brdp | 4197 | drivers/char/istallion.c | return(brdp->ports[portnr]); |
brdp | 4211 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4221 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 4222 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4225 | drivers/char/istallion.c | if (brdp->state & BST_STARTED) { |
brdp | 4226 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_GETSTATS, &stli_cdkstats, sizeof(asystats_t), 1)) < 0) |
brdp | 4287 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4297 | drivers/char/istallion.c | brdp = stli_brds[portp->brdnr]; |
brdp | 4298 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4301 | drivers/char/istallion.c | if (brdp->state & BST_STARTED) { |
brdp | 4302 | drivers/char/istallion.c | if ((rc = stli_cmdwait(brdp, portp, A_CLEARSTATS, 0, 0, 0)) < 0) |
brdp | 4342 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4347 | drivers/char/istallion.c | brdp = stli_brds[stli_dummybrd.brdnr]; |
brdp | 4348 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4350 | drivers/char/istallion.c | memcpy_tofs((void *) arg, brdp, sizeof(stlibrd_t)); |
brdp | 4364 | drivers/char/istallion.c | stlibrd_t *brdp; |
brdp | 4417 | drivers/char/istallion.c | brdp = stli_brds[brdnr]; |
brdp | 4418 | drivers/char/istallion.c | if (brdp == (stlibrd_t *) NULL) |
brdp | 4420 | drivers/char/istallion.c | if (brdp->state == 0) |
brdp | 4425 | drivers/char/istallion.c | EBRDINTR(brdp); |
brdp | 4428 | drivers/char/istallion.c | rc = stli_startbrd(brdp); |
brdp | 4431 | drivers/char/istallion.c | brdp->state &= ~BST_STARTED; |
brdp | 4434 | drivers/char/istallion.c | brdp->state &= ~BST_STARTED; |
brdp | 4435 | drivers/char/istallion.c | EBRDRESET(brdp); |
brdp | 4437 | drivers/char/istallion.c | if (brdp->reenable != NULL) |
brdp | 4438 | drivers/char/istallion.c | (* brdp->reenable)(brdp); |
brdp | 399 | drivers/char/stallion.c | static int stl_brdinit(stlbrd_t *brdp); |
brdp | 400 | drivers/char/stallion.c | static int stl_initeio(stlbrd_t *brdp); |
brdp | 401 | drivers/char/stallion.c | static int stl_initech(stlbrd_t *brdp); |
brdp | 402 | drivers/char/stallion.c | static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp); |
brdp | 480 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 515 | drivers/char/stallion.c | brdp = stl_brds[i]; |
brdp | 517 | drivers/char/stallion.c | panelp = brdp->panels[j]; |
brdp | 534 | drivers/char/stallion.c | if (brdp->brdtype == BRD_ECH) { |
brdp | 535 | drivers/char/stallion.c | release_region(brdp->ioaddr1, 2); |
brdp | 536 | drivers/char/stallion.c | release_region(brdp->ioaddr2, 32); |
brdp | 537 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_ECHPCI) { |
brdp | 538 | drivers/char/stallion.c | release_region(brdp->ioaddr1, 4); |
brdp | 539 | drivers/char/stallion.c | release_region(brdp->ioaddr2, 8); |
brdp | 540 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_ECHMC) { |
brdp | 541 | drivers/char/stallion.c | release_region(brdp->ioaddr1, 64); |
brdp | 542 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_EASYIO) { |
brdp | 543 | drivers/char/stallion.c | release_region(brdp->ioaddr1, 8); |
brdp | 546 | drivers/char/stallion.c | kfree_s(brdp, sizeof(stlbrd_t)); |
brdp | 574 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 586 | drivers/char/stallion.c | brdp = stl_brds[brdnr]; |
brdp | 587 | drivers/char/stallion.c | if (brdp == (stlbrd_t *) NULL) |
brdp | 591 | drivers/char/stallion.c | if (brdp->panels[panelnr] == (stlpanel_t *) NULL) |
brdp | 593 | drivers/char/stallion.c | if (minordev < brdp->panels[panelnr]->nrports) { |
brdp | 597 | drivers/char/stallion.c | minordev -= brdp->panels[panelnr]->nrports; |
brdp | 602 | drivers/char/stallion.c | portp = brdp->panels[panelnr]->ports[portnr]; |
brdp | 1062 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 1080 | drivers/char/stallion.c | brdp = stl_brds[portp->brdnr]; |
brdp | 1081 | drivers/char/stallion.c | if (brdp != (stlbrd_t *) NULL) |
brdp | 1082 | drivers/char/stallion.c | sio.irq = brdp->irq; |
brdp | 1750 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 1761 | drivers/char/stallion.c | if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) { |
brdp | 1765 | drivers/char/stallion.c | if (brdp->state == 0) { |
brdp | 1774 | drivers/char/stallion.c | if (brdp->brdtype == BRD_EASYIO) { |
brdp | 1775 | drivers/char/stallion.c | if ((inb(brdp->iostatus) & EIO_INTRPEND) == 0) { |
brdp | 1779 | drivers/char/stallion.c | panelp = brdp->panels[0]; |
brdp | 1783 | drivers/char/stallion.c | if (brdp->nrports > 4) { |
brdp | 1787 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_ECH) { |
brdp | 1788 | drivers/char/stallion.c | if ((inb(brdp->iostatus) & ECH_INTRPEND) == 0) { |
brdp | 1792 | drivers/char/stallion.c | outb((brdp->ioctrlval | ECH_BRDENABLE), brdp->ioctrl); |
brdp | 1793 | drivers/char/stallion.c | for (panelnr = 0; (panelnr < brdp->nrpanels); panelnr++) { |
brdp | 1794 | drivers/char/stallion.c | panelp = brdp->panels[panelnr]; |
brdp | 1804 | drivers/char/stallion.c | if (panelnr >= brdp->nrpanels) { |
brdp | 1812 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_ECHPCI) { |
brdp | 1813 | drivers/char/stallion.c | iobase = brdp->ioaddr2; |
brdp | 1814 | drivers/char/stallion.c | for (panelnr = 0; (panelnr < brdp->nrpanels); panelnr++) { |
brdp | 1815 | drivers/char/stallion.c | panelp = brdp->panels[panelnr]; |
brdp | 1816 | drivers/char/stallion.c | outb(panelp->pagenr, brdp->ioctrl); |
brdp | 1820 | drivers/char/stallion.c | outb((panelp->pagenr + 1), brdp->ioctrl); |
brdp | 1825 | drivers/char/stallion.c | if (panelnr >= brdp->nrpanels) { |
brdp | 1833 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_ECHMC) { |
brdp | 1834 | drivers/char/stallion.c | if ((inb(brdp->iostatus) & ECH_INTRPEND) == 0) { |
brdp | 1838 | drivers/char/stallion.c | for (panelnr = 0; (panelnr < brdp->nrpanels); panelnr++) { |
brdp | 1839 | drivers/char/stallion.c | panelp = brdp->panels[panelnr]; |
brdp | 1849 | drivers/char/stallion.c | if (panelnr >= brdp->nrpanels) { |
brdp | 1858 | drivers/char/stallion.c | printk("STALLION: unknown board type=%x\n", brdp->brdtype); |
brdp | 1875 | drivers/char/stallion.c | if (brdp->brdtype == BRD_ECH) |
brdp | 1876 | drivers/char/stallion.c | outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); |
brdp | 1954 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 1977 | drivers/char/stallion.c | brdp = stl_brds[portp->brdnr]; |
brdp | 1978 | drivers/char/stallion.c | if (brdp == (stlbrd_t *) NULL) |
brdp | 2391 | drivers/char/stallion.c | static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp) |
brdp | 2411 | drivers/char/stallion.c | if (brdp->brdtype == BRD_ECHPCI) { |
brdp | 2412 | drivers/char/stallion.c | outb((panelp->pagenr + (i >> 1)), brdp->ioctrl); |
brdp | 2444 | drivers/char/stallion.c | if (brdp->brdtype == BRD_ECHPCI) { |
brdp | 2445 | drivers/char/stallion.c | outb((panelp->pagenr + (i >> 3)), brdp->ioctrl); |
brdp | 2465 | drivers/char/stallion.c | portp->clk = brdp->clk; |
brdp | 2492 | drivers/char/stallion.c | static int stl_initeio(stlbrd_t *brdp) |
brdp | 2499 | drivers/char/stallion.c | printk("stl_initeio(brdp=%x)\n", (int) brdp); |
brdp | 2502 | drivers/char/stallion.c | brdp->ioctrl = brdp->ioaddr1 + 1; |
brdp | 2503 | drivers/char/stallion.c | brdp->iostatus = brdp->ioaddr1 + 2; |
brdp | 2504 | drivers/char/stallion.c | brdp->clk = EIO_CLK; |
brdp | 2506 | drivers/char/stallion.c | status = inb(brdp->iostatus); |
brdp | 2509 | drivers/char/stallion.c | brdp->clk = EIO_CLK8M; |
brdp | 2513 | drivers/char/stallion.c | brdp->nrports = 8; |
brdp | 2516 | drivers/char/stallion.c | brdp->nrports = 4; |
brdp | 2522 | drivers/char/stallion.c | request_region(brdp->ioaddr1, 8, "serial(EIO)"); |
brdp | 2529 | drivers/char/stallion.c | if ((brdp->irq < 0) || (brdp->irq > 15) || |
brdp | 2530 | drivers/char/stallion.c | (stl_vecmap[brdp->irq] == (unsigned char) 0xff)) { |
brdp | 2531 | drivers/char/stallion.c | printk("STALLION: invalid irq=%d for brd=%d\n", brdp->irq, brdp->brdnr); |
brdp | 2534 | drivers/char/stallion.c | outb((stl_vecmap[brdp->irq] | ((brdp->irqtype) ? EIO_INTLEVEL : EIO_INTEDGE)), brdp->ioctrl); |
brdp | 2544 | drivers/char/stallion.c | panelp->brdnr = brdp->brdnr; |
brdp | 2546 | drivers/char/stallion.c | panelp->nrports = brdp->nrports; |
brdp | 2547 | drivers/char/stallion.c | panelp->iobase = brdp->ioaddr1; |
brdp | 2549 | drivers/char/stallion.c | brdp->panels[0] = panelp; |
brdp | 2550 | drivers/char/stallion.c | brdp->nrpanels = 1; |
brdp | 2551 | drivers/char/stallion.c | brdp->state |= BRD_FOUND; |
brdp | 2552 | drivers/char/stallion.c | brdp->hwid = status; |
brdp | 2553 | drivers/char/stallion.c | rc = stl_mapirq(brdp->irq); |
brdp | 2564 | drivers/char/stallion.c | static int stl_initech(stlbrd_t *brdp) |
brdp | 2571 | drivers/char/stallion.c | printk("stl_initech(brdp=%x)\n", (int) brdp); |
brdp | 2581 | drivers/char/stallion.c | if (brdp->brdtype == BRD_ECH) { |
brdp | 2582 | drivers/char/stallion.c | brdp->ioctrl = brdp->ioaddr1 + 1; |
brdp | 2583 | drivers/char/stallion.c | brdp->iostatus = brdp->ioaddr1 + 1; |
brdp | 2584 | drivers/char/stallion.c | status = inb(brdp->iostatus); |
brdp | 2588 | drivers/char/stallion.c | if ((brdp->irq < 0) || (brdp->irq > 15) || |
brdp | 2589 | drivers/char/stallion.c | (stl_vecmap[brdp->irq] == (unsigned char) 0xff)) { |
brdp | 2590 | drivers/char/stallion.c | printk("STALLION: invalid irq=%d for brd=%d\n", brdp->irq, brdp->brdnr); |
brdp | 2593 | drivers/char/stallion.c | status = ((brdp->ioaddr2 & ECH_ADDR2MASK) >> 1); |
brdp | 2594 | drivers/char/stallion.c | status |= (stl_vecmap[brdp->irq] << 1); |
brdp | 2595 | drivers/char/stallion.c | outb((status | ECH_BRDRESET), brdp->ioaddr1); |
brdp | 2596 | drivers/char/stallion.c | brdp->ioctrlval = ECH_INTENABLE | ((brdp->irqtype) ? ECH_INTLEVEL : ECH_INTEDGE); |
brdp | 2597 | drivers/char/stallion.c | outb((brdp->ioctrlval | ECH_BRDENABLE), brdp->ioctrl); |
brdp | 2598 | drivers/char/stallion.c | outb(status, brdp->ioaddr1); |
brdp | 2600 | drivers/char/stallion.c | request_region(brdp->ioaddr1, 2, "serial(EC8/32)"); |
brdp | 2601 | drivers/char/stallion.c | request_region(brdp->ioaddr2, 32, "serial(EC8/32-secondary)"); |
brdp | 2602 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_ECHMC) { |
brdp | 2603 | drivers/char/stallion.c | brdp->ioctrl = brdp->ioaddr1 + 0x20; |
brdp | 2604 | drivers/char/stallion.c | brdp->iostatus = brdp->ioctrl; |
brdp | 2605 | drivers/char/stallion.c | status = inb(brdp->iostatus); |
brdp | 2609 | drivers/char/stallion.c | if ((brdp->irq < 0) || (brdp->irq > 15) || |
brdp | 2610 | drivers/char/stallion.c | (stl_vecmap[brdp->irq] == (unsigned char) 0xff)) { |
brdp | 2611 | drivers/char/stallion.c | printk("STALLION: invalid irq=%d for brd=%d\n", brdp->irq, brdp->brdnr); |
brdp | 2614 | drivers/char/stallion.c | outb(ECHMC_BRDRESET, brdp->ioctrl); |
brdp | 2615 | drivers/char/stallion.c | outb(ECHMC_INTENABLE, brdp->ioctrl); |
brdp | 2617 | drivers/char/stallion.c | request_region(brdp->ioaddr1, 64, "serial(EC8/32-MC)"); |
brdp | 2618 | drivers/char/stallion.c | } else if (brdp->brdtype == BRD_ECHPCI) { |
brdp | 2619 | drivers/char/stallion.c | brdp->ioctrl = brdp->ioaddr1 + 2; |
brdp | 2620 | drivers/char/stallion.c | request_region(brdp->ioaddr1, 4, "serial(EC8/32-PCI)"); |
brdp | 2621 | drivers/char/stallion.c | request_region(brdp->ioaddr2, 8, "serial(EC8/32-PCI-secondary)"); |
brdp | 2624 | drivers/char/stallion.c | brdp->clk = ECH_CLK; |
brdp | 2625 | drivers/char/stallion.c | brdp->hwid = status; |
brdp | 2631 | drivers/char/stallion.c | ioaddr = brdp->ioaddr2; |
brdp | 2636 | drivers/char/stallion.c | if (brdp->brdtype == BRD_ECHPCI) { |
brdp | 2637 | drivers/char/stallion.c | outb(nxtid, brdp->ioctrl); |
brdp | 2638 | drivers/char/stallion.c | ioaddr = brdp->ioaddr2; |
brdp | 2650 | drivers/char/stallion.c | panelp->brdnr = brdp->brdnr; |
brdp | 2656 | drivers/char/stallion.c | if ((brdp->nrports + 16) > 32) |
brdp | 2660 | drivers/char/stallion.c | brdp->nrports += 16; |
brdp | 2666 | drivers/char/stallion.c | brdp->nrports += 8; |
brdp | 2670 | drivers/char/stallion.c | brdp->panels[panelnr++] = panelp; |
brdp | 2671 | drivers/char/stallion.c | brdp->nrpanels++; |
brdp | 2672 | drivers/char/stallion.c | if (ioaddr >= (brdp->ioaddr2 + 0x20)) |
brdp | 2676 | drivers/char/stallion.c | if (brdp->brdtype == BRD_ECH) |
brdp | 2677 | drivers/char/stallion.c | outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); |
brdp | 2679 | drivers/char/stallion.c | brdp->state |= BRD_FOUND; |
brdp | 2680 | drivers/char/stallion.c | i = stl_mapirq(brdp->irq); |
brdp | 2693 | drivers/char/stallion.c | static int stl_brdinit(stlbrd_t *brdp) |
brdp | 2698 | drivers/char/stallion.c | printk("stl_brdinit(brdp=%x)\n", (int) brdp); |
brdp | 2701 | drivers/char/stallion.c | switch (brdp->brdtype) { |
brdp | 2703 | drivers/char/stallion.c | stl_initeio(brdp); |
brdp | 2708 | drivers/char/stallion.c | stl_initech(brdp); |
brdp | 2711 | drivers/char/stallion.c | printk("STALLION: unit=%d is unknown board type=%d\n", brdp->brdnr, brdp->brdtype); |
brdp | 2715 | drivers/char/stallion.c | stl_brds[brdp->brdnr] = brdp; |
brdp | 2716 | drivers/char/stallion.c | if ((brdp->state & BRD_FOUND) == 0) { |
brdp | 2717 | drivers/char/stallion.c | printk("STALLION: %s board not found, unit=%d io=%x irq=%d\n", stl_brdnames[brdp->brdtype], brdp->brdnr, brdp->ioaddr1, brdp->irq); |
brdp | 2722 | drivers/char/stallion.c | if (brdp->panels[i] != (stlpanel_t *) NULL) |
brdp | 2723 | drivers/char/stallion.c | stl_initports(brdp, brdp->panels[i]); |
brdp | 2725 | drivers/char/stallion.c | printk("STALLION: %s found, unit=%d io=%x irq=%d nrpanels=%d nrports=%d\n", stl_brdnames[brdp->brdtype], brdp->brdnr, brdp->ioaddr1, brdp->irq, brdp->nrpanels, brdp->nrports); |
brdp | 2740 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 2776 | drivers/char/stallion.c | brdp = (stlbrd_t *) stl_memalloc(sizeof(stlbrd_t)); |
brdp | 2777 | drivers/char/stallion.c | if (brdp == (stlbrd_t *) NULL) { |
brdp | 2781 | drivers/char/stallion.c | memset(brdp, 0, sizeof(stlbrd_t)); |
brdp | 2782 | drivers/char/stallion.c | brdp->magic = STL_BOARDMAGIC; |
brdp | 2783 | drivers/char/stallion.c | brdp->brdnr = stl_nrbrds++; |
brdp | 2784 | drivers/char/stallion.c | brdp->brdtype = BRD_ECHPCI; |
brdp | 2790 | drivers/char/stallion.c | brdp->ioaddr2 = (ioaddr & PCI_BASE_ADDRESS_IO_MASK); |
brdp | 2796 | drivers/char/stallion.c | brdp->ioaddr1 = (ioaddr & PCI_BASE_ADDRESS_IO_MASK); |
brdp | 2798 | drivers/char/stallion.c | printk("%s(%d): BAR0=%x BAR1=%x\n", __FILE__, __LINE__, brdp->ioaddr2, brdp->ioaddr1); |
brdp | 2805 | drivers/char/stallion.c | brdp->irq = irq; |
brdp | 2807 | drivers/char/stallion.c | stl_brdinit(brdp); |
brdp | 2826 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 2845 | drivers/char/stallion.c | brdp = (stlbrd_t *) stl_memalloc(sizeof(stlbrd_t)); |
brdp | 2846 | drivers/char/stallion.c | if (brdp == (stlbrd_t *) NULL) { |
brdp | 2850 | drivers/char/stallion.c | memset(brdp, 0, sizeof(stlbrd_t)); |
brdp | 2852 | drivers/char/stallion.c | brdp->magic = STL_BOARDMAGIC; |
brdp | 2853 | drivers/char/stallion.c | brdp->brdnr = i; |
brdp | 2854 | drivers/char/stallion.c | brdp->brdtype = confp->brdtype; |
brdp | 2855 | drivers/char/stallion.c | brdp->ioaddr1 = confp->ioaddr1; |
brdp | 2856 | drivers/char/stallion.c | brdp->ioaddr2 = confp->ioaddr2; |
brdp | 2857 | drivers/char/stallion.c | brdp->irq = confp->irq; |
brdp | 2858 | drivers/char/stallion.c | brdp->irqtype = confp->irqtype; |
brdp | 2859 | drivers/char/stallion.c | stl_brdinit(brdp); |
brdp | 2881 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 2888 | drivers/char/stallion.c | brdp = stl_brds[stl_brdstats.brd]; |
brdp | 2889 | drivers/char/stallion.c | if (brdp == (stlbrd_t *) NULL) |
brdp | 2893 | drivers/char/stallion.c | stl_brdstats.brd = brdp->brdnr; |
brdp | 2894 | drivers/char/stallion.c | stl_brdstats.type = brdp->brdtype; |
brdp | 2895 | drivers/char/stallion.c | stl_brdstats.hwid = brdp->hwid; |
brdp | 2896 | drivers/char/stallion.c | stl_brdstats.state = brdp->state; |
brdp | 2897 | drivers/char/stallion.c | stl_brdstats.ioaddr = brdp->ioaddr1; |
brdp | 2898 | drivers/char/stallion.c | stl_brdstats.ioaddr2 = brdp->ioaddr2; |
brdp | 2899 | drivers/char/stallion.c | stl_brdstats.irq = brdp->irq; |
brdp | 2900 | drivers/char/stallion.c | stl_brdstats.nrpanels = brdp->nrpanels; |
brdp | 2901 | drivers/char/stallion.c | stl_brdstats.nrports = brdp->nrports; |
brdp | 2902 | drivers/char/stallion.c | for (i = 0; (i < brdp->nrpanels); i++) { |
brdp | 2903 | drivers/char/stallion.c | panelp = brdp->panels[i]; |
brdp | 2921 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 2926 | drivers/char/stallion.c | brdp = stl_brds[brdnr]; |
brdp | 2927 | drivers/char/stallion.c | if (brdp == (stlbrd_t *) NULL) |
brdp | 2929 | drivers/char/stallion.c | if ((panelnr < 0) || (panelnr >= brdp->nrpanels)) |
brdp | 2931 | drivers/char/stallion.c | panelp = brdp->panels[panelnr]; |
brdp | 3046 | drivers/char/stallion.c | stlbrd_t *brdp; |
brdp | 3051 | drivers/char/stallion.c | brdp = stl_brds[stl_dummybrd.brdnr]; |
brdp | 3052 | drivers/char/stallion.c | if (brdp == (stlbrd_t *) NULL) |
brdp | 3054 | drivers/char/stallion.c | memcpy_tofs((void *) arg, brdp, sizeof(stlbrd_t)); |
brdp | 114 | include/linux/istallion.h | void (*init)(struct stlibrd *brdp); |
brdp | 115 | include/linux/istallion.h | void (*enable)(struct stlibrd *brdp); |
brdp | 116 | include/linux/istallion.h | void (*reenable)(struct stlibrd *brdp); |
brdp | 117 | include/linux/istallion.h | void (*disable)(struct stlibrd *brdp); |
brdp | 118 | include/linux/istallion.h | char *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line); |
brdp | 119 | include/linux/istallion.h | void (*intr)(struct stlibrd *brdp); |
brdp | 120 | include/linux/istallion.h | void (*reset)(struct stlibrd *brdp); |