Lines Matching refs:iobase

112 static int  ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len);
129 static void SIR2FIR(int iobase);
130 static void FIR2SIR(int iobase);
392 int iobase; in ali_ircc_close() local
398 iobase = self->io.fir_base; in ali_ircc_close()
532 int iobase = info->fir_base; in ali_ircc_setup() local
537 SIR2FIR(iobase); in ali_ircc_setup()
540 outb(0x40, iobase+FIR_MCR); // benjamin 2000/11/30 11:45AM in ali_ircc_setup()
543 switch_bank(iobase, BANK3); in ali_ircc_setup()
544 version = inb(iobase+FIR_ID_VR); in ali_ircc_setup()
556 switch_bank(iobase, BANK1); in ali_ircc_setup()
557 outb(RX_FIFO_Threshold, iobase+FIR_FIFO_TR); in ali_ircc_setup()
560 outb(RX_DMA_Threshold, iobase+FIR_DMA_TR); in ali_ircc_setup()
563 switch_bank(iobase, BANK2); in ali_ircc_setup()
564 outb(inb(iobase+FIR_IRDA_CR) | IRDA_CR_CRC, iobase+FIR_IRDA_CR); in ali_ircc_setup()
569 switch_bank(iobase, BANK0); in ali_ircc_setup()
571 tmp = inb(iobase+FIR_LCR_B); in ali_ircc_setup()
575 outb(tmp, iobase+FIR_LCR_B); in ali_ircc_setup()
578 outb(0x00, iobase+FIR_IER); in ali_ircc_setup()
582 FIR2SIR(iobase); in ali_ircc_setup()
673 int iobase, tmp; in ali_ircc_fir_interrupt() local
677 iobase = self->io.fir_base; in ali_ircc_fir_interrupt()
679 switch_bank(iobase, BANK0); in ali_ircc_fir_interrupt()
680 self->InterruptID = inb(iobase+FIR_IIR); in ali_ircc_fir_interrupt()
681 self->BusStatus = inb(iobase+FIR_BSR); in ali_ircc_fir_interrupt()
684 self->LineStatus = inb(iobase+FIR_LSR); in ali_ircc_fir_interrupt()
753 switch_bank(iobase, BANK1); in ali_ircc_fir_interrupt()
754 tmp = inb(iobase+FIR_CR); in ali_ircc_fir_interrupt()
755 outb( tmp& ~CR_TIMER_EN, iobase+FIR_CR); in ali_ircc_fir_interrupt()
793 int iobase; in ali_ircc_sir_interrupt() local
798 iobase = self->io.sir_base; in ali_ircc_sir_interrupt()
800 iir = inb(iobase+UART_IIR) & UART_IIR_ID; in ali_ircc_sir_interrupt()
803 lsr = inb(iobase+UART_LSR); in ali_ircc_sir_interrupt()
806 __FUNCTION__, iir, lsr, iobase); in ali_ircc_sir_interrupt()
845 int iobase; in ali_ircc_sir_receive() local
850 iobase = self->io.sir_base; in ali_ircc_sir_receive()
858 inb(iobase+UART_RX)); in ali_ircc_sir_receive()
865 } while (inb(iobase+UART_LSR) & UART_LSR_DR); in ali_ircc_sir_receive()
880 int iobase; in ali_ircc_sir_write_wakeup() local
886 iobase = self->io.sir_base; in ali_ircc_sir_write_wakeup()
892 actual = ali_ircc_sir_write(iobase, self->io.fifo_size, in ali_ircc_sir_write_wakeup()
902 while(!(inb(iobase+UART_LSR) & UART_LSR_TEMT)) in ali_ircc_sir_write_wakeup()
927 outb(UART_IER_RDI, iobase+UART_IER); in ali_ircc_sir_write_wakeup()
936 int iobase; in ali_ircc_change_speed() local
942 iobase = self->io.fir_base; in ali_ircc_change_speed()
982 int iobase; in ali_ircc_fir_change_speed() local
991 iobase = self->io.fir_base; in ali_ircc_fir_change_speed()
998 SIR2FIR(iobase); in ali_ircc_fir_change_speed()
1020 int iobase; in ali_ircc_sir_change_speed() local
1031 iobase = self->io.sir_base; in ali_ircc_sir_change_speed()
1039 FIR2SIR(iobase); in ali_ircc_sir_change_speed()
1044 inb(iobase+UART_LSR); in ali_ircc_sir_change_speed()
1045 inb(iobase+UART_SCR); in ali_ircc_sir_change_speed()
1069 outb(UART_LCR_DLAB | lcr, iobase+UART_LCR); /* Set DLAB */ in ali_ircc_sir_change_speed()
1070 outb(divisor & 0xff, iobase+UART_DLL); /* Set speed */ in ali_ircc_sir_change_speed()
1071 outb(divisor >> 8, iobase+UART_DLM); in ali_ircc_sir_change_speed()
1072 outb(lcr, iobase+UART_LCR); /* Set 8N1 */ in ali_ircc_sir_change_speed()
1073 outb(fcr, iobase+UART_FCR); /* Enable FIFO's */ in ali_ircc_sir_change_speed()
1077 outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR); in ali_ircc_sir_change_speed()
1088 int iobase,dongle_id; in ali_ircc_change_dongle_speed() local
1094 iobase = self->io.fir_base; /* or iobase = self->io.sir_base; */ in ali_ircc_change_dongle_speed()
1102 switch_bank(iobase, BANK2); in ali_ircc_change_dongle_speed()
1103 tmp = inb(iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1119 switch_bank(iobase, BANK2); in ali_ircc_change_dongle_speed()
1120 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1125 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1131 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1136 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1142 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1148 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1152 outb(tmp & ~0x02, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1175 switch_bank(iobase, BANK2); in ali_ircc_change_dongle_speed()
1176 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1184 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1190 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1195 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1199 outb(tmp & ~0x02, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1222 switch_bank(iobase, BANK2); in ali_ircc_change_dongle_speed()
1223 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1232 switch_bank(iobase, BANK2); in ali_ircc_change_dongle_speed()
1233 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1257 switch_bank(iobase, BANK2); in ali_ircc_change_dongle_speed()
1258 outb(tmp, iobase+FIR_IRDA_CR); in ali_ircc_change_dongle_speed()
1262 switch_bank(iobase, BANK0); in ali_ircc_change_dongle_speed()
1275 static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len) in ali_ircc_sir_write() argument
1282 if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { in ali_ircc_sir_write()
1290 outb(buf[actual], iobase+UART_TX); in ali_ircc_sir_write()
1328 int iobase; in ali_ircc_net_open() local
1339 iobase = self->io.fir_base; in ali_ircc_net_open()
1361 outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, iobase+UART_IER); in ali_ircc_net_open()
1434 int iobase; in ali_ircc_fir_hard_xmit() local
1441 iobase = self->io.fir_base; in ali_ircc_fir_hard_xmit()
1513 switch_bank(iobase, BANK1); in ali_ircc_fir_hard_xmit()
1514 outb(TIMER_IIR_500, iobase+FIR_TIMER_IIR); in ali_ircc_fir_hard_xmit()
1518 switch_bank(iobase, BANK1); in ali_ircc_fir_hard_xmit()
1519 outb(TIMER_IIR_1ms, iobase+FIR_TIMER_IIR); in ali_ircc_fir_hard_xmit()
1523 switch_bank(iobase, BANK1); in ali_ircc_fir_hard_xmit()
1524 outb(TIMER_IIR_2ms, iobase+FIR_TIMER_IIR); in ali_ircc_fir_hard_xmit()
1529 outb(inb(iobase+FIR_CR) | CR_TIMER_EN, iobase+FIR_CR); in ali_ircc_fir_hard_xmit()
1559 switch_bank(iobase, BANK0); in ali_ircc_fir_hard_xmit()
1571 int iobase, tmp; in ali_ircc_dma_xmit() local
1577 iobase = self->io.fir_base; in ali_ircc_dma_xmit()
1587 switch_bank(iobase, BANK1); in ali_ircc_dma_xmit()
1588 outb(inb(iobase+FIR_CR) & ~CR_DMA_EN, iobase+FIR_CR); in ali_ircc_dma_xmit()
1598 switch_bank(iobase, BANK0); in ali_ircc_dma_xmit()
1599 outb(LCR_A_FIFO_RESET, iobase+FIR_LCR_A); in ali_ircc_dma_xmit()
1604 switch_bank(iobase, BANK1); in ali_ircc_dma_xmit()
1605 outb(FIFO_OPTI, iobase+FIR_FIFO_TR) ; in ali_ircc_dma_xmit()
1610 switch_bank(iobase, BANK1); in ali_ircc_dma_xmit()
1611 outb(TX_DMA_Threshold, iobase+FIR_DMA_TR); in ali_ircc_dma_xmit()
1616 switch_bank(iobase, BANK2); in ali_ircc_dma_xmit()
1617 outb(Hi, iobase+FIR_TX_DSR_HI); in ali_ircc_dma_xmit()
1618 outb(Lo, iobase+FIR_TX_DSR_LO); in ali_ircc_dma_xmit()
1621 switch_bank(iobase, BANK0); in ali_ircc_dma_xmit()
1622 tmp = inb(iobase+FIR_LCR_B); in ali_ircc_dma_xmit()
1624 outb(((unsigned char)(tmp & 0x3f) | LCR_B_TX_MODE) & ~LCR_B_BW, iobase+FIR_LCR_B); in ali_ircc_dma_xmit()
1625 …s(), ******* Change to TX mode: FIR_LCR_B = 0x%x ******* \n", __FUNCTION__, inb(iobase+FIR_LCR_B)); in ali_ircc_dma_xmit()
1627 outb(0, iobase+FIR_LSR); in ali_ircc_dma_xmit()
1630 switch_bank(iobase, BANK1); in ali_ircc_dma_xmit()
1631 outb(inb(iobase+FIR_CR) | CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR); in ali_ircc_dma_xmit()
1633 switch_bank(iobase, BANK0); in ali_ircc_dma_xmit()
1640 int iobase; in ali_ircc_dma_xmit_complete() local
1645 iobase = self->io.fir_base; in ali_ircc_dma_xmit_complete()
1648 switch_bank(iobase, BANK1); in ali_ircc_dma_xmit_complete()
1649 outb(inb(iobase+FIR_CR) & ~CR_DMA_EN, iobase+FIR_CR); in ali_ircc_dma_xmit_complete()
1652 switch_bank(iobase, BANK0); in ali_ircc_dma_xmit_complete()
1653 if((inb(iobase+FIR_LSR) & LSR_FRAME_ABORT) == LSR_FRAME_ABORT) in ali_ircc_dma_xmit_complete()
1697 switch_bank(iobase, BANK0); in ali_ircc_dma_xmit_complete()
1712 int iobase, tmp; in ali_ircc_dma_receive() local
1716 iobase = self->io.fir_base; in ali_ircc_dma_receive()
1723 switch_bank(iobase, BANK1); in ali_ircc_dma_receive()
1724 outb(inb(iobase+FIR_CR) & ~CR_DMA_EN, iobase+FIR_CR); in ali_ircc_dma_receive()
1727 switch_bank(iobase, BANK0); in ali_ircc_dma_receive()
1728 outb(0x07, iobase+FIR_LSR); in ali_ircc_dma_receive()
1732 self->LineStatus = inb(iobase+FIR_LSR) ; in ali_ircc_dma_receive()
1740 outb(LCR_A_FIFO_RESET, iobase+FIR_LCR_A); in ali_ircc_dma_receive()
1750 tmp = inb(iobase+FIR_LCR_B); in ali_ircc_dma_receive()
1751 …outb((unsigned char)(tmp &0x3f) | LCR_B_RX_MODE | LCR_B_BW , iobase + FIR_LCR_B); // 2000/12/1 05:… in ali_ircc_dma_receive()
1752 …IRDA_DEBUG(1, "%s(), *** Change To RX mode: FIR_LCR_B = 0x%x *** \n", __FUNCTION__, inb(iobase+FIR… in ali_ircc_dma_receive()
1755 switch_bank(iobase, BANK1); in ali_ircc_dma_receive()
1756 outb(RX_FIFO_Threshold, iobase+FIR_FIFO_TR); in ali_ircc_dma_receive()
1757 outb(RX_DMA_Threshold, iobase+FIR_DMA_TR); in ali_ircc_dma_receive()
1761 outb(CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR); in ali_ircc_dma_receive()
1763 switch_bank(iobase, BANK0); in ali_ircc_dma_receive()
1773 int len, i, iobase, val; in ali_ircc_dma_receive_complete() local
1778 iobase = self->io.fir_base; in ali_ircc_dma_receive_complete()
1780 switch_bank(iobase, BANK0); in ali_ircc_dma_receive_complete()
1781 MessageCount = inb(iobase+ FIR_LSR)&0x07; in ali_ircc_dma_receive_complete()
1789 switch_bank(iobase, BANK0); in ali_ircc_dma_receive_complete()
1790 status = inb(iobase+FIR_LSR); in ali_ircc_dma_receive_complete()
1792 switch_bank(iobase, BANK2); in ali_ircc_dma_receive_complete()
1793 len = inb(iobase+FIR_RX_DSR_HI) & 0x0f; in ali_ircc_dma_receive_complete()
1795 len |= inb(iobase+FIR_RX_DSR_LO); in ali_ircc_dma_receive_complete()
1864 switch_bank(iobase, BANK0); in ali_ircc_dma_receive_complete()
1865 val = inb(iobase+FIR_BSR); in ali_ircc_dma_receive_complete()
1883 switch_bank(iobase, BANK1); in ali_ircc_dma_receive_complete()
1884 outb(TIMER_IIR_500, iobase+FIR_TIMER_IIR); // 2001/1/2 05:07PM in ali_ircc_dma_receive_complete()
1887 outb(inb(iobase+FIR_CR) | CR_TIMER_EN, iobase+FIR_CR); in ali_ircc_dma_receive_complete()
1929 switch_bank(iobase, BANK0); in ali_ircc_dma_receive_complete()
1947 int iobase; in ali_ircc_sir_hard_xmit() local
1957 iobase = self->io.sir_base; in ali_ircc_sir_hard_xmit()
1985 outb(UART_IER_THRI, iobase+UART_IER); in ali_ircc_sir_hard_xmit()
2068 int iobase; in ali_ircc_is_receiving() local
2078 iobase = self->io.fir_base; in ali_ircc_is_receiving()
2080 switch_bank(iobase, BANK1); in ali_ircc_is_receiving()
2081 if((inb(iobase+FIR_FIFO_FR) & 0x3f) != 0) in ali_ircc_is_receiving()
2087 switch_bank(iobase, BANK0); in ali_ircc_is_receiving()
2174 int iobase = self->io.fir_base; /* or sir_base */ in SetCOMInterrupts() local
2211 switch_bank(iobase, BANK0); in SetCOMInterrupts()
2212 outb(newMask, iobase+FIR_IER); in SetCOMInterrupts()
2215 outb(newMask, iobase+UART_IER); in SetCOMInterrupts()
2220 static void SIR2FIR(int iobase) in SIR2FIR() argument
2230 outb(0x28, iobase+UART_MCR); in SIR2FIR()
2231 outb(0x68, iobase+UART_MCR); in SIR2FIR()
2232 outb(0x88, iobase+UART_MCR); in SIR2FIR()
2236 outb(0x60, iobase+FIR_MCR); /* Master Reset */ in SIR2FIR()
2237 outb(0x20, iobase+FIR_MCR); /* Master Interrupt Enable */ in SIR2FIR()
2246 static void FIR2SIR(int iobase) in FIR2SIR() argument
2256 outb(0x20, iobase+FIR_MCR); /* IRQ to low */ in FIR2SIR()
2257 outb(0x00, iobase+UART_IER); in FIR2SIR()
2259 outb(0xA0, iobase+FIR_MCR); /* Don't set master reset */ in FIR2SIR()
2260 outb(0x00, iobase+UART_FCR); in FIR2SIR()
2261 outb(0x07, iobase+UART_FCR); in FIR2SIR()
2263 val = inb(iobase+UART_RX); in FIR2SIR()
2264 val = inb(iobase+UART_LSR); in FIR2SIR()
2265 val = inb(iobase+UART_MSR); in FIR2SIR()