Lines Matching refs:CHA
239 #define CHA 0x00 /* channel A offset */ macro
338 if (channel == CHA) { in irq_disable()
340 write_reg16(info, CHA + IMR, info->imra_value); in irq_disable()
348 if (channel == CHA) { in irq_enable()
350 write_reg16(info, CHA + IMR, info->imra_value); in irq_enable()
844 issue_command(info, CHA, CMD_RXRESET); in rx_ready_hdlc()
853 fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f); in rx_ready_hdlc()
862 data[0] = read_reg(info, CHA + RXFIFO); in rx_ready_hdlc()
865 *((unsigned short *) data) = read_reg16(info, CHA + RXFIFO); in rx_ready_hdlc()
874 issue_command(info, CHA, CMD_RXRESET); in rx_ready_hdlc()
890 issue_command(info, CHA, CMD_RXFIFO); in rx_ready_hdlc()
903 fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f); in rx_ready_async()
908 if (!fifo_count && (read_reg(info,CHA+STAR) & BIT5)) in rx_ready_async()
916 data = read_reg(info, CHA + RXFIFO); in rx_ready_async()
917 status = read_reg(info, CHA + RXFIFO); in rx_ready_async()
946 issue_command(info, CHA, CMD_RXFIFO); in rx_ready_async()
1025 write_reg(info, CHA + TXFIFO, *(info->tx_buf + info->tx_get)); in tx_ready()
1027 write_reg16(info, CHA + TXFIFO, in tx_ready()
1038 issue_command(info, CHA, CMD_TXFIFO); in tx_ready()
1041 issue_command(info, CHA, CMD_TXFIFO); in tx_ready()
1043 issue_command(info, CHA, CMD_TXFIFO + CMD_TXEOM); in tx_ready()
1175 while ((gis = read_reg(info, CHA + GIS))) { in mgslpc_isr()
1194 isr = read_reg16(info, CHA + ISR); in mgslpc_isr()
1197 irq_disable(info, CHA, IRQ_TIMER); in mgslpc_isr()
1211 issue_command(info, CHA, CMD_RXFIFO_READ); in mgslpc_isr()
1236 pis = read_reg(info, CHA + PIS); in mgslpc_isr()
1992 irq_enable(info, CHA, IRQ_EXITHUNT); in wait_events()
2053 irq_disable(info, CHA, IRQ_EXITHUNT); in wait_events()
2184 set_reg_bits(info, CHA+DAFO, BIT6); in mgslpc_break()
2186 clear_reg_bits(info, CHA+DAFO, BIT6); in mgslpc_break()
2998 val = read_reg(info, CHA + CCR1) | (BIT2 | BIT1 | BIT0); in loopback_enable()
2999 write_reg(info, CHA + CCR1, val); in loopback_enable()
3002 val = read_reg(info, CHA + CCR2) | (BIT4 | BIT5); in loopback_enable()
3003 write_reg(info, CHA + CCR2, val); in loopback_enable()
3007 mgslpc_set_rate(info, CHA, info->params.clock_speed); in loopback_enable()
3009 mgslpc_set_rate(info, CHA, 1843200); in loopback_enable()
3012 val = read_reg(info, CHA + MODE) | BIT0; in loopback_enable()
3013 write_reg(info, CHA + MODE, val); in loopback_enable()
3022 irq_disable(info, CHA, 0xffff); in hdlc_mode()
3070 write_reg(info, CHA + MODE, val); in hdlc_mode()
3098 write_reg(info, CHA + CCR0, val); in hdlc_mode()
3112 write_reg(info, CHA + CCR1, val); in hdlc_mode()
3136 write_reg(info, CHA + CCR2, val); in hdlc_mode()
3167 write_reg(info, CHA + CCR3, val); in hdlc_mode()
3178 write_reg(info, CHA + PRE, val); in hdlc_mode()
3192 write_reg(info, CHA + CCR4, val); in hdlc_mode()
3194 mgslpc_set_rate(info, CHA, info->params.clock_speed * 16); in hdlc_mode()
3196 mgslpc_set_rate(info, CHA, info->params.clock_speed); in hdlc_mode()
3203 write_reg(info, CHA + RLCR, 0); in hdlc_mode()
3218 write_reg(info, CHA + XBCH, val); in hdlc_mode()
3226 set_reg_bits(info, CHA + PVR, BIT3); in hdlc_mode()
3228 clear_reg_bits(info, CHA + PVR, BIT3); in hdlc_mode()
3230 irq_enable(info, CHA, in hdlc_mode()
3233 issue_command(info, CHA, CMD_TXRESET + CMD_RXRESET); in hdlc_mode()
3234 wait_command_complete(info, CHA); in hdlc_mode()
3235 read_reg16(info, CHA + ISR); /* clear pending IRQs */ in hdlc_mode()
3248 clear_reg_bits(info, CHA + CCR0, BIT6); in hdlc_mode()
3263 clear_reg_bits(info, CHA + MODE, BIT3); in rx_stop()
3280 set_reg_bits(info, CHA + MODE, BIT3); in rx_start()
3340 write_reg(info, CHA + CCR0, 0x80); in reset_device()
3342 write_reg(info, CHA + MODE, 0); in reset_device()
3346 irq_disable(info, CHA, 0xffff); in reset_device()
3392 irq_disable(info, CHA, 0xffff); in async_mode()
3416 write_reg(info, CHA + MODE, val); in async_mode()
3428 write_reg(info, CHA + CCR0, 0x83); in async_mode()
3439 write_reg(info, CHA + CCR1, 0x1f); in async_mode()
3453 write_reg(info, CHA + CCR2, 0x10); in async_mode()
3462 write_reg(info, CHA + CCR3, 0); in async_mode()
3474 write_reg(info, CHA + CCR4, 0x50); in async_mode()
3475 mgslpc_set_rate(info, CHA, info->params.data_rate * 16); in async_mode()
3500 write_reg(info, CHA + DAFO, val); in async_mode()
3514 write_reg(info, CHA + RFC, 0x5c); in async_mode()
3520 write_reg(info, CHA + RLCR, 0); in async_mode()
3535 write_reg(info, CHA + XBCH, val); in async_mode()
3537 irq_enable(info, CHA, IRQ_CTS); in async_mode()
3540 set_reg_bits(info, CHA + MODE, BIT3); in async_mode()
3545 set_reg_bits(info, CHA + PVR, BIT3); in async_mode()
3547 clear_reg_bits(info, CHA + PVR, BIT3); in async_mode()
3548 irq_enable(info, CHA, in async_mode()
3551 issue_command(info, CHA, CMD_TXRESET + CMD_RXRESET); in async_mode()
3552 wait_command_complete(info, CHA); in async_mode()
3553 read_reg16(info, CHA + ISR); /* clear pending IRQs */ in async_mode()
3562 set_reg_bits(info, CHA + CCR1, BIT3); in tx_set_idle()
3564 clear_reg_bits(info, CHA + CCR1, BIT3); in tx_set_idle()
3581 status = read_reg(info, CHA + PVR); in get_signals()
3595 val = read_reg(info, CHA + MODE); in set_signals()
3607 write_reg(info, CHA + MODE, val); in set_signals()
3610 clear_reg_bits(info, CHA + PVR, PVR_DTR); in set_signals()
3612 set_reg_bits(info, CHA + PVR, PVR_DTR); in set_signals()
3759 irq_enable(info, CHA, IRQ_TIMER); in irq_test()
3760 write_reg(info, CHA + TIMR, 0); /* 512 cycles */ in irq_test()
3761 issue_command(info, CHA, CMD_START_TIMER); in irq_test()