Lines Matching refs:CtlP

235 static int sInitChan(CONTROLLER_T * CtlP, CHANNEL_T * ChP, int AiopNum,
242 static void sModemReset(CONTROLLER_T * CtlP, int chan, int on);
243 static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on);
245 static int sInitController(CONTROLLER_T * CtlP, int CtlNum, ByteIO_t MudbacIO,
840 if (cp->CtlP->boardType == ROCKET_TYPE_PC104) { in configure_r_port()
1138 CONTROLLER_t *CtlP = ChP->CtlP; in sGetChanRI() local
1142 if (CtlP->UPCIRingInd) in sGetChanRI()
1143 RingInd = !(sInB(CtlP->UPCIRingInd) & sBitMapSetTbl[ChanNum]); in sGetChanRI()
1144 else if (CtlP->AltChanRingIndicator) in sGetChanRI()
1146 else if (CtlP->boardType == ROCKET_TYPE_PC104) in sGetChanRI()
1147 RingInd = !(sInB(CtlP->AiopIO[3]) & sBitMapSetTbl[ChanNum]); in sGetChanRI()
1775 static void rmSpeakerReset(CONTROLLER_T * CtlP, unsigned long model) in rmSpeakerReset() argument
1781 addr = CtlP->AiopIO[0] + 0x4F; in rmSpeakerReset()
1788 addr = CtlP->AiopIO[0] + 0x88; in rmSpeakerReset()
1862 static int sPCIInitController(CONTROLLER_T * CtlP, int CtlNum, in sPCIInitController() argument
1871 CtlP->AltChanRingIndicator = altChanRingIndicator; in sPCIInitController()
1872 CtlP->UPCIRingInd = UPCIRingInd; in sPCIInitController()
1873 CtlP->CtlNum = CtlNum; in sPCIInitController()
1874 CtlP->CtlID = CTLID_0001; /* controller release 1 */ in sPCIInitController()
1875 CtlP->BusType = isPCI; /* controller release 1 */ in sPCIInitController()
1878 CtlP->isUPCI = 1; in sPCIInitController()
1879 CtlP->PCIIO = ConfigIO + _PCI_9030_INT_CTRL; in sPCIInitController()
1880 CtlP->PCIIO2 = ConfigIO + _PCI_9030_GPIO_CTRL; in sPCIInitController()
1881 CtlP->AiopIntrBits = upci_aiop_intr_bits; in sPCIInitController()
1883 CtlP->isUPCI = 0; in sPCIInitController()
1884 CtlP->PCIIO = in sPCIInitController()
1886 CtlP->AiopIntrBits = aiop_intr_bits; in sPCIInitController()
1889 sPCIControllerEOI(CtlP); /* clear EOI if warm init */ in sPCIInitController()
1891 CtlP->NumAiop = 0; in sPCIInitController()
1894 CtlP->AiopIO[i] = (WordIO_t) io; in sPCIInitController()
1895 CtlP->AiopIntChanIO[i] = io + _INT_CHAN; in sPCIInitController()
1897 CtlP->AiopID[i] = sReadAiopID(io); /* read AIOP ID */ in sPCIInitController()
1898 if (CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */ in sPCIInitController()
1901 CtlP->AiopNumChan[i] = sReadAiopNumChan((WordIO_t) io); /* num channels in AIOP */ in sPCIInitController()
1904 CtlP->NumAiop++; /* bump count of AIOPs */ in sPCIInitController()
1907 if (CtlP->NumAiop == 0) in sPCIInitController()
1910 return (CtlP->NumAiop); in sPCIInitController()
2593 static int sInitController(CONTROLLER_T * CtlP, int CtlNum, ByteIO_t MudbacIO, in sInitController() argument
2601 CtlP->AiopIntrBits = aiop_intr_bits; in sInitController()
2602 CtlP->AltChanRingIndicator = 0; in sInitController()
2603 CtlP->CtlNum = CtlNum; in sInitController()
2604 CtlP->CtlID = CTLID_0001; /* controller release 1 */ in sInitController()
2605 CtlP->BusType = isISA; in sInitController()
2606 CtlP->MBaseIO = MudbacIO; in sInitController()
2607 CtlP->MReg1IO = MudbacIO + 1; in sInitController()
2608 CtlP->MReg2IO = MudbacIO + 2; in sInitController()
2609 CtlP->MReg3IO = MudbacIO + 3; in sInitController()
2611 CtlP->MReg2 = 0; /* interrupt disable */ in sInitController()
2612 CtlP->MReg3 = 0; /* no periodic interrupts */ in sInitController()
2615 CtlP->MReg2 = 0; /* interrupt disable */ in sInitController()
2616 CtlP->MReg3 = 0; /* no periodic interrupts */ in sInitController()
2618 CtlP->MReg2 = sIRQMap[IRQNum]; /* set IRQ number */ in sInitController()
2619 CtlP->MReg3 = Frequency; /* set frequency */ in sInitController()
2621 CtlP->MReg3 |= PERIODIC_ONLY; in sInitController()
2625 sOutB(CtlP->MReg2IO, CtlP->MReg2); in sInitController()
2626 sOutB(CtlP->MReg3IO, CtlP->MReg3); in sInitController()
2627 sControllerEOI(CtlP); /* clear EOI if warm init */ in sInitController()
2629 CtlP->NumAiop = 0; in sInitController()
2632 CtlP->AiopIO[i] = (WordIO_t) io; in sInitController()
2633 CtlP->AiopIntChanIO[i] = io + _INT_CHAN; in sInitController()
2634 sOutB(CtlP->MReg2IO, CtlP->MReg2 | (i & 0x03)); /* AIOP index */ in sInitController()
2638 sEnAiop(CtlP, i); /* enable the AIOP */ in sInitController()
2639 CtlP->AiopID[i] = sReadAiopID(io); /* read AIOP ID */ in sInitController()
2640 if (CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */ in sInitController()
2643 CtlP->AiopNumChan[i] = sReadAiopNumChan((WordIO_t) io); /* num channels in AIOP */ in sInitController()
2646 CtlP->NumAiop++; /* bump count of AIOPs */ in sInitController()
2648 sDisAiop(CtlP, i); /* disable AIOP */ in sInitController()
2651 if (CtlP->NumAiop == 0) in sInitController()
2654 return (CtlP->NumAiop); in sInitController()
2725 static int sInitChan(CONTROLLER_T * CtlP, CHANNEL_T * ChP, int AiopNum, in sInitChan() argument
2736 if (ChanNum >= CtlP->AiopNumChan[AiopNum]) in sInitChan()
2740 ChP->CtlP = CtlP; in sInitChan()
2741 ChP->ChanID = CtlP->AiopID[AiopNum]; in sInitChan()
2746 AiopIO = CtlP->AiopIO[AiopNum]; in sInitChan()
3104 sOutB(ChP->CtlP->AiopIO[2], (mode & 0x18) | ChP->ChanNum); in sSetInterfaceMode()
3111 static void sModemReset(CONTROLLER_T * CtlP, int chan, int on) in sModemReset() argument
3116 addr = CtlP->AiopIO[0] + 0x400; in sModemReset()
3117 val = sInB(CtlP->MReg3IO); in sModemReset()
3120 val = sInB(CtlP->MReg2IO); in sModemReset()
3121 sOutB(CtlP->MReg2IO, (val & 0xfc) | (1 & 0x03)); in sModemReset()
3122 sOutB(CtlP->MBaseIO, (unsigned char) (addr >> 6)); in sModemReset()
3125 sEnAiop(CtlP, 1); in sModemReset()
3129 sDisAiop(CtlP, 1); in sModemReset()
3136 static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on) in sPCIModemReset() argument
3140 addr = CtlP->AiopIO[0] + 0x40; /* 2nd AIOP */ in sPCIModemReset()