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