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()
1129 CONTROLLER_t *CtlP = ChP->CtlP; in sGetChanRI() local
1133 if (CtlP->UPCIRingInd) in sGetChanRI()
1134 RingInd = !(sInB(CtlP->UPCIRingInd) & sBitMapSetTbl[ChanNum]); in sGetChanRI()
1135 else if (CtlP->AltChanRingIndicator) in sGetChanRI()
1137 else if (CtlP->boardType == ROCKET_TYPE_PC104) in sGetChanRI()
1138 RingInd = !(sInB(CtlP->AiopIO[3]) & sBitMapSetTbl[ChanNum]); in sGetChanRI()
1762 static void rmSpeakerReset(CONTROLLER_T * CtlP, unsigned long model) in rmSpeakerReset() argument
1768 addr = CtlP->AiopIO[0] + 0x4F; in rmSpeakerReset()
1775 addr = CtlP->AiopIO[0] + 0x88; in rmSpeakerReset()
1849 static int sPCIInitController(CONTROLLER_T * CtlP, int CtlNum, in sPCIInitController() argument
1858 CtlP->AltChanRingIndicator = altChanRingIndicator; in sPCIInitController()
1859 CtlP->UPCIRingInd = UPCIRingInd; in sPCIInitController()
1860 CtlP->CtlNum = CtlNum; in sPCIInitController()
1861 CtlP->CtlID = CTLID_0001; /* controller release 1 */ in sPCIInitController()
1862 CtlP->BusType = isPCI; /* controller release 1 */ in sPCIInitController()
1865 CtlP->isUPCI = 1; in sPCIInitController()
1866 CtlP->PCIIO = ConfigIO + _PCI_9030_INT_CTRL; in sPCIInitController()
1867 CtlP->PCIIO2 = ConfigIO + _PCI_9030_GPIO_CTRL; in sPCIInitController()
1868 CtlP->AiopIntrBits = upci_aiop_intr_bits; in sPCIInitController()
1870 CtlP->isUPCI = 0; in sPCIInitController()
1871 CtlP->PCIIO = in sPCIInitController()
1873 CtlP->AiopIntrBits = aiop_intr_bits; in sPCIInitController()
1876 sPCIControllerEOI(CtlP); /* clear EOI if warm init */ in sPCIInitController()
1878 CtlP->NumAiop = 0; in sPCIInitController()
1881 CtlP->AiopIO[i] = (WordIO_t) io; in sPCIInitController()
1882 CtlP->AiopIntChanIO[i] = io + _INT_CHAN; in sPCIInitController()
1884 CtlP->AiopID[i] = sReadAiopID(io); /* read AIOP ID */ in sPCIInitController()
1885 if (CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */ in sPCIInitController()
1888 CtlP->AiopNumChan[i] = sReadAiopNumChan((WordIO_t) io); /* num channels in AIOP */ in sPCIInitController()
1891 CtlP->NumAiop++; /* bump count of AIOPs */ in sPCIInitController()
1894 if (CtlP->NumAiop == 0) in sPCIInitController()
1897 return (CtlP->NumAiop); in sPCIInitController()
2580 static int sInitController(CONTROLLER_T * CtlP, int CtlNum, ByteIO_t MudbacIO, in sInitController() argument
2588 CtlP->AiopIntrBits = aiop_intr_bits; in sInitController()
2589 CtlP->AltChanRingIndicator = 0; in sInitController()
2590 CtlP->CtlNum = CtlNum; in sInitController()
2591 CtlP->CtlID = CTLID_0001; /* controller release 1 */ in sInitController()
2592 CtlP->BusType = isISA; in sInitController()
2593 CtlP->MBaseIO = MudbacIO; in sInitController()
2594 CtlP->MReg1IO = MudbacIO + 1; in sInitController()
2595 CtlP->MReg2IO = MudbacIO + 2; in sInitController()
2596 CtlP->MReg3IO = MudbacIO + 3; in sInitController()
2598 CtlP->MReg2 = 0; /* interrupt disable */ in sInitController()
2599 CtlP->MReg3 = 0; /* no periodic interrupts */ in sInitController()
2602 CtlP->MReg2 = 0; /* interrupt disable */ in sInitController()
2603 CtlP->MReg3 = 0; /* no periodic interrupts */ in sInitController()
2605 CtlP->MReg2 = sIRQMap[IRQNum]; /* set IRQ number */ in sInitController()
2606 CtlP->MReg3 = Frequency; /* set frequency */ in sInitController()
2608 CtlP->MReg3 |= PERIODIC_ONLY; in sInitController()
2612 sOutB(CtlP->MReg2IO, CtlP->MReg2); in sInitController()
2613 sOutB(CtlP->MReg3IO, CtlP->MReg3); in sInitController()
2614 sControllerEOI(CtlP); /* clear EOI if warm init */ in sInitController()
2616 CtlP->NumAiop = 0; in sInitController()
2619 CtlP->AiopIO[i] = (WordIO_t) io; in sInitController()
2620 CtlP->AiopIntChanIO[i] = io + _INT_CHAN; in sInitController()
2621 sOutB(CtlP->MReg2IO, CtlP->MReg2 | (i & 0x03)); /* AIOP index */ in sInitController()
2625 sEnAiop(CtlP, i); /* enable the AIOP */ in sInitController()
2626 CtlP->AiopID[i] = sReadAiopID(io); /* read AIOP ID */ in sInitController()
2627 if (CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */ in sInitController()
2630 CtlP->AiopNumChan[i] = sReadAiopNumChan((WordIO_t) io); /* num channels in AIOP */ in sInitController()
2633 CtlP->NumAiop++; /* bump count of AIOPs */ in sInitController()
2635 sDisAiop(CtlP, i); /* disable AIOP */ in sInitController()
2638 if (CtlP->NumAiop == 0) in sInitController()
2641 return (CtlP->NumAiop); in sInitController()
2712 static int sInitChan(CONTROLLER_T * CtlP, CHANNEL_T * ChP, int AiopNum, in sInitChan() argument
2723 if (ChanNum >= CtlP->AiopNumChan[AiopNum]) in sInitChan()
2727 ChP->CtlP = CtlP; in sInitChan()
2728 ChP->ChanID = CtlP->AiopID[AiopNum]; in sInitChan()
2733 AiopIO = CtlP->AiopIO[AiopNum]; in sInitChan()
3091 sOutB(ChP->CtlP->AiopIO[2], (mode & 0x18) | ChP->ChanNum); in sSetInterfaceMode()
3098 static void sModemReset(CONTROLLER_T * CtlP, int chan, int on) in sModemReset() argument
3103 addr = CtlP->AiopIO[0] + 0x400; in sModemReset()
3104 val = sInB(CtlP->MReg3IO); in sModemReset()
3107 val = sInB(CtlP->MReg2IO); in sModemReset()
3108 sOutB(CtlP->MReg2IO, (val & 0xfc) | (1 & 0x03)); in sModemReset()
3109 sOutB(CtlP->MBaseIO, (unsigned char) (addr >> 6)); in sModemReset()
3112 sEnAiop(CtlP, 1); in sModemReset()
3116 sDisAiop(CtlP, 1); in sModemReset()
3123 static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on) in sPCIModemReset() argument
3127 addr = CtlP->AiopIO[0] + 0x40; /* 2nd AIOP */ in sPCIModemReset()