Lines Matching refs:CtlP

222 static int sInitChan(CONTROLLER_T * CtlP, CHANNEL_T * ChP, int AiopNum,
229 static void sModemReset(CONTROLLER_T * CtlP, int chan, int on);
230 static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on);
232 static int sInitController(CONTROLLER_T * CtlP, int CtlNum, ByteIO_t MudbacIO,
830 if (cp->CtlP->boardType == ROCKET_TYPE_PC104) {
1107 CONTROLLER_t *CtlP = ChP->CtlP;
1111 if (CtlP->UPCIRingInd)
1112 RingInd = !(sInB(CtlP->UPCIRingInd) & sBitMapSetTbl[ChanNum]);
1113 else if (CtlP->AltChanRingIndicator)
1115 else if (CtlP->boardType == ROCKET_TYPE_PC104)
1116 RingInd = !(sInB(CtlP->AiopIO[3]) & sBitMapSetTbl[ChanNum]);
1743 static void rmSpeakerReset(CONTROLLER_T * CtlP, unsigned long model)
1749 addr = CtlP->AiopIO[0] + 0x4F;
1756 addr = CtlP->AiopIO[0] + 0x88;
1765 Call: sPCIInitController(CtlP,CtlNum,AiopIOList,AiopIOListSize,
1767 CONTROLLER_T *CtlP; Ptr to controller structure
1830 static int sPCIInitController(CONTROLLER_T * CtlP, int CtlNum,
1839 CtlP->AltChanRingIndicator = altChanRingIndicator;
1840 CtlP->UPCIRingInd = UPCIRingInd;
1841 CtlP->CtlNum = CtlNum;
1842 CtlP->CtlID = CTLID_0001; /* controller release 1 */
1843 CtlP->BusType = isPCI; /* controller release 1 */
1846 CtlP->isUPCI = 1;
1847 CtlP->PCIIO = ConfigIO + _PCI_9030_INT_CTRL;
1848 CtlP->PCIIO2 = ConfigIO + _PCI_9030_GPIO_CTRL;
1849 CtlP->AiopIntrBits = upci_aiop_intr_bits;
1851 CtlP->isUPCI = 0;
1852 CtlP->PCIIO =
1854 CtlP->AiopIntrBits = aiop_intr_bits;
1857 sPCIControllerEOI(CtlP); /* clear EOI if warm init */
1859 CtlP->NumAiop = 0;
1862 CtlP->AiopIO[i] = (WordIO_t) io;
1863 CtlP->AiopIntChanIO[i] = io + _INT_CHAN;
1865 CtlP->AiopID[i] = sReadAiopID(io); /* read AIOP ID */
1866 if (CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */
1869 CtlP->AiopNumChan[i] = sReadAiopNumChan((WordIO_t) io); /* num channels in AIOP */
1872 CtlP->NumAiop++; /* bump count of AIOPs */
1875 if (CtlP->NumAiop == 0)
1878 return (CtlP->NumAiop);
2493 Call: sInitController(CtlP,CtlNum,MudbacIO,AiopIOList,AiopIOListSize,
2495 CONTROLLER_T *CtlP; Ptr to controller structure
2559 static int sInitController(CONTROLLER_T * CtlP, int CtlNum, ByteIO_t MudbacIO,
2567 CtlP->AiopIntrBits = aiop_intr_bits;
2568 CtlP->AltChanRingIndicator = 0;
2569 CtlP->CtlNum = CtlNum;
2570 CtlP->CtlID = CTLID_0001; /* controller release 1 */
2571 CtlP->BusType = isISA;
2572 CtlP->MBaseIO = MudbacIO;
2573 CtlP->MReg1IO = MudbacIO + 1;
2574 CtlP->MReg2IO = MudbacIO + 2;
2575 CtlP->MReg3IO = MudbacIO + 3;
2577 CtlP->MReg2 = 0; /* interrupt disable */
2578 CtlP->MReg3 = 0; /* no periodic interrupts */
2581 CtlP->MReg2 = 0; /* interrupt disable */
2582 CtlP->MReg3 = 0; /* no periodic interrupts */
2584 CtlP->MReg2 = sIRQMap[IRQNum]; /* set IRQ number */
2585 CtlP->MReg3 = Frequency; /* set frequency */
2587 CtlP->MReg3 |= PERIODIC_ONLY;
2591 sOutB(CtlP->MReg2IO, CtlP->MReg2);
2592 sOutB(CtlP->MReg3IO, CtlP->MReg3);
2593 sControllerEOI(CtlP); /* clear EOI if warm init */
2595 CtlP->NumAiop = 0;
2598 CtlP->AiopIO[i] = (WordIO_t) io;
2599 CtlP->AiopIntChanIO[i] = io + _INT_CHAN;
2600 sOutB(CtlP->MReg2IO, CtlP->MReg2 | (i & 0x03)); /* AIOP index */
2604 sEnAiop(CtlP, i); /* enable the AIOP */
2605 CtlP->AiopID[i] = sReadAiopID(io); /* read AIOP ID */
2606 if (CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */
2609 CtlP->AiopNumChan[i] = sReadAiopNumChan((WordIO_t) io); /* num channels in AIOP */
2612 CtlP->NumAiop++; /* bump count of AIOPs */
2614 sDisAiop(CtlP, i); /* disable AIOP */
2617 if (CtlP->NumAiop == 0)
2620 return (CtlP->NumAiop);
2679 Call: sInitChan(CtlP,ChP,AiopNum,ChanNum)
2680 CONTROLLER_T *CtlP; Ptr to controller structure
2691 static int sInitChan(CONTROLLER_T * CtlP, CHANNEL_T * ChP, int AiopNum,
2702 if (ChanNum >= CtlP->AiopNumChan[AiopNum])
2706 ChP->CtlP = CtlP;
2707 ChP->ChanID = CtlP->AiopID[AiopNum];
2712 AiopIO = CtlP->AiopIO[AiopNum];
3070 sOutB(ChP->CtlP->AiopIO[2], (mode & 0x18) | ChP->ChanNum);
3077 static void sModemReset(CONTROLLER_T * CtlP, int chan, int on)
3082 addr = CtlP->AiopIO[0] + 0x400;
3083 val = sInB(CtlP->MReg3IO);
3086 val = sInB(CtlP->MReg2IO);
3087 sOutB(CtlP->MReg2IO, (val & 0xfc) | (1 & 0x03));
3088 sOutB(CtlP->MBaseIO, (unsigned char) (addr >> 6));
3091 sEnAiop(CtlP, 1);
3095 sDisAiop(CtlP, 1);
3102 static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on)
3106 addr = CtlP->AiopIO[0] + 0x40; /* 2nd AIOP */