Lines Matching refs:ofsAddr
1663 unsigned long ofsAddr; in MoxaPortFlushData() local
1666 ofsAddr = moxaTableAddr[port]; in MoxaPortFlushData()
1667 moxafunc(ofsAddr, FC_FlushQueue, mode); in MoxaPortFlushData()
1670 low_water_check(ofsAddr); in MoxaPortFlushData()
1793 unsigned long ip, ofsAddr; in MoxaDriverPoll() local
1808 ofsAddr = moxaTableAddr[p]; in MoxaDriverPoll()
1810 writew(readw(ofsAddr + HostStat) & ~WakeupTx, ofsAddr + HostStat); in MoxaDriverPoll()
1815 if (readb(ofsAddr + FlagStat) & DCD_state) { in MoxaDriverPoll()
1833 ofsAddr = moxaTableAddr[p]; in MoxaDriverPoll()
1834 low_water_check(ofsAddr); in MoxaDriverPoll()
2226 unsigned long ofsAddr; in MoxaPortEnable() local
2230 ofsAddr = moxaTableAddr[port]; in MoxaPortEnable()
2231 writew(lowwater, ofsAddr + Low_water); in MoxaPortEnable()
2235 moxafunc(ofsAddr, FC_SetBreakIrq, 0); in MoxaPortEnable()
2237 writew(readw(ofsAddr + HostStat) | WakeupBreak, ofsAddr + HostStat); in MoxaPortEnable()
2240 moxafunc(ofsAddr, FC_SetLineIrq, Magic_code); in MoxaPortEnable()
2241 moxafunc(ofsAddr, FC_FlushQueue, 2); in MoxaPortEnable()
2243 moxafunc(ofsAddr, FC_EnableCH, Magic_code); in MoxaPortEnable()
2249 unsigned long ofsAddr; in MoxaPortDisable() local
2251 ofsAddr = moxaTableAddr[port]; in MoxaPortDisable()
2252 moxafunc(ofsAddr, FC_SetFlowCtl, 0); /* disable flow control */ in MoxaPortDisable()
2253 moxafunc(ofsAddr, FC_ClrLineIrq, Magic_code); in MoxaPortDisable()
2254 writew(0, ofsAddr + HostStat); in MoxaPortDisable()
2255 moxafunc(ofsAddr, FC_DisableCH, Magic_code); in MoxaPortDisable()
2270 unsigned long ofsAddr; in MoxaPortSetBaud() local
2276 ofsAddr = moxaTableAddr[port]; in MoxaPortSetBaud()
2286 moxafunc(ofsAddr, FC_SetBaud, val); in MoxaPortSetBaud()
2294 unsigned long ofsAddr; in MoxaPortSetTermio() local
2301 ofsAddr = moxaTableAddr[port]; in MoxaPortSetTermio()
2330 moxafunc(ofsAddr, FC_SetDataMode, (ushort) mode); in MoxaPortSetTermio()
2408 writeb(termio->c_cc[VSTART], ofsAddr + FuncArg); in MoxaPortSetTermio()
2409 writeb(termio->c_cc[VSTOP], ofsAddr + FuncArg1); in MoxaPortSetTermio()
2410 writeb(FC_SetXonXoff, ofsAddr + FuncCode); in MoxaPortSetTermio()
2411 wait_finish(ofsAddr); in MoxaPortSetTermio()
2439 unsigned long ofsAddr; in MoxaPortLineCtrl() local
2442 ofsAddr = moxaTableAddr[port]; in MoxaPortLineCtrl()
2449 moxafunc(ofsAddr, FC_LineControl, mode); in MoxaPortLineCtrl()
2454 unsigned long ofsAddr; in MoxaPortFlowCtrl() local
2457 ofsAddr = moxaTableAddr[port]; in MoxaPortFlowCtrl()
2469 moxafunc(ofsAddr, FC_SetFlowCtl, mode); in MoxaPortFlowCtrl()
2474 unsigned long ofsAddr; in MoxaPortLineStatus() local
2477 ofsAddr = moxaTableAddr[port]; in MoxaPortLineStatus()
2480 moxafunc(ofsAddr, FC_LineStatus, 0); in MoxaPortLineStatus()
2481 val = readw(ofsAddr + FuncArg); in MoxaPortLineStatus()
2483 val = readw(ofsAddr + FlagStat) >> 4; in MoxaPortLineStatus()
2547 unsigned long baseAddr, ofsAddr, ofs; in MoxaPortWriteData() local
2549 ofsAddr = moxaTableAddr[port]; in MoxaPortWriteData()
2551 tx_mask = readw(ofsAddr + TX_mask); in MoxaPortWriteData()
2552 spage = readw(ofsAddr + Page_txb); in MoxaPortWriteData()
2553 epage = readw(ofsAddr + EndPage_txb); in MoxaPortWriteData()
2554 tail = readw(ofsAddr + TXwptr); in MoxaPortWriteData()
2555 head = readw(ofsAddr + TXrptr); in MoxaPortWriteData()
2563 bufhead = readw(ofsAddr + Ofs_txb); in MoxaPortWriteData()
2577 writew(tail, ofsAddr + TXwptr); in MoxaPortWriteData()
2592 writew((tail + len) & tx_mask, ofsAddr + TXwptr); in MoxaPortWriteData()
2600 writeb(1, ofsAddr + CD180TXirq); /* start to send */ in MoxaPortWriteData()
2610 unsigned long baseAddr, ofsAddr, ofs; in MoxaPortReadData() local
2612 ofsAddr = moxaTableAddr[port]; in MoxaPortReadData()
2614 head = readw(ofsAddr + RXrptr); in MoxaPortReadData()
2615 tail = readw(ofsAddr + RXwptr); in MoxaPortReadData()
2616 rx_mask = readw(ofsAddr + RX_mask); in MoxaPortReadData()
2617 spage = readw(ofsAddr + Page_rxb); in MoxaPortReadData()
2618 epage = readw(ofsAddr + EndPage_rxb); in MoxaPortReadData()
2629 bufhead = readw(ofsAddr + Ofs_rxb); in MoxaPortReadData()
2643 writew(head, ofsAddr + RXrptr); in MoxaPortReadData()
2658 writew((head + len) & rx_mask, ofsAddr + RXrptr); in MoxaPortReadData()
2666 if ((readb(ofsAddr + FlagStat) & Xoff_state) && (remain < LowWater)) { in MoxaPortReadData()
2676 unsigned long ofsAddr; in MoxaPortTxQueue() local
2680 ofsAddr = moxaTableAddr[port]; in MoxaPortTxQueue()
2681 rptr = readw(ofsAddr + TXrptr); in MoxaPortTxQueue()
2682 wptr = readw(ofsAddr + TXwptr); in MoxaPortTxQueue()
2683 mask = readw(ofsAddr + TX_mask); in MoxaPortTxQueue()
2690 unsigned long ofsAddr; in MoxaPortTxFree() local
2694 ofsAddr = moxaTableAddr[port]; in MoxaPortTxFree()
2695 rptr = readw(ofsAddr + TXrptr); in MoxaPortTxFree()
2696 wptr = readw(ofsAddr + TXwptr); in MoxaPortTxFree()
2697 mask = readw(ofsAddr + TX_mask); in MoxaPortTxFree()
2704 unsigned long ofsAddr; in MoxaPortRxQueue() local
2708 ofsAddr = moxaTableAddr[port]; in MoxaPortRxQueue()
2709 rptr = readw(ofsAddr + RXrptr); in MoxaPortRxQueue()
2710 wptr = readw(ofsAddr + RXwptr); in MoxaPortRxQueue()
2711 mask = readw(ofsAddr + RX_mask); in MoxaPortRxQueue()
2719 unsigned long ofsAddr; in MoxaPortTxDisable() local
2721 ofsAddr = moxaTableAddr[port]; in MoxaPortTxDisable()
2722 moxafunc(ofsAddr, FC_SetXoffState, Magic_code); in MoxaPortTxDisable()
2727 unsigned long ofsAddr; in MoxaPortTxEnable() local
2729 ofsAddr = moxaTableAddr[port]; in MoxaPortTxEnable()
2730 moxafunc(ofsAddr, FC_SetXonState, Magic_code); in MoxaPortTxEnable()
2745 unsigned long ofsAddr; in MoxaPortSendBreak() local
2747 ofsAddr = moxaTableAddr[port]; in MoxaPortSendBreak()
2749 moxafunc(ofsAddr, FC_SendBreak, Magic_code); in MoxaPortSendBreak()
2752 moxafunc(ofsAddr, FC_SendBreak, Magic_code); in MoxaPortSendBreak()
2755 moxafunc(ofsAddr, FC_StopBreak, Magic_code); in MoxaPortSendBreak()
2836 static void moxafunc(unsigned long ofsAddr, int cmd, ushort arg) in moxafunc() argument
2839 writew(arg, ofsAddr + FuncArg); in moxafunc()
2840 writew(cmd, ofsAddr + FuncCode); in moxafunc()
2841 wait_finish(ofsAddr); in moxafunc()
2844 static void wait_finish(unsigned long ofsAddr) in wait_finish() argument
2849 while (readw(ofsAddr + FuncCode) != 0) { in wait_finish()
2857 static void low_water_check(unsigned long ofsAddr) in low_water_check() argument
2862 if (readb(ofsAddr + FlagStat) & Xoff_state) { in low_water_check()
2863 rptr = readw(ofsAddr + RXrptr); in low_water_check()
2864 wptr = readw(ofsAddr + RXwptr); in low_water_check()
2865 mask = readw(ofsAddr + RX_mask); in low_water_check()
2868 moxafunc(ofsAddr, FC_SendXon, 0); in low_water_check()
2943 unsigned long baseAddr, ofsAddr; in moxaloadcode() local
2964 ofsAddr = moxaTableAddr[port]; in moxaloadcode()
2965 writew(C218rx_mask, ofsAddr + RX_mask); in moxaloadcode()
2966 writew(C218tx_mask, ofsAddr + TX_mask); in moxaloadcode()
2967 writew(C218rx_spage + i * C218buf_pageno, ofsAddr + Page_rxb); in moxaloadcode()
2968 writew(readw(ofsAddr + Page_rxb) + C218rx_pageno, ofsAddr + EndPage_rxb); in moxaloadcode()
2970 writew(C218tx_spage + i * C218buf_pageno, ofsAddr + Page_txb); in moxaloadcode()
2971 writew(readw(ofsAddr + Page_txb) + C218tx_pageno, ofsAddr + EndPage_txb); in moxaloadcode()
2986 ofsAddr = moxaTableAddr[port]; in moxaloadcode()
2988 writew(C320p8rx_mask, ofsAddr + RX_mask); in moxaloadcode()
2989 writew(C320p8tx_mask, ofsAddr + TX_mask); in moxaloadcode()
2990 writew(C320p8rx_spage + i * C320p8buf_pgno, ofsAddr + Page_rxb); in moxaloadcode()
2991 writew(readw(ofsAddr + Page_rxb) + C320p8rx_pgno, ofsAddr + EndPage_rxb); in moxaloadcode()
2992 writew(C320p8tx_spage + i * C320p8buf_pgno, ofsAddr + Page_txb); in moxaloadcode()
2993 writew(readw(ofsAddr + Page_txb) + C320p8tx_pgno, ofsAddr + EndPage_txb); in moxaloadcode()
2996 writew(C320p16rx_mask, ofsAddr + RX_mask); in moxaloadcode()
2997 writew(C320p16tx_mask, ofsAddr + TX_mask); in moxaloadcode()
2998 writew(C320p16rx_spage + i * C320p16buf_pgno, ofsAddr + Page_rxb); in moxaloadcode()
2999 writew(readw(ofsAddr + Page_rxb) + C320p16rx_pgno, ofsAddr + EndPage_rxb); in moxaloadcode()
3000 writew(C320p16tx_spage + i * C320p16buf_pgno, ofsAddr + Page_txb); in moxaloadcode()
3001 writew(readw(ofsAddr + Page_txb) + C320p16tx_pgno, ofsAddr + EndPage_txb); in moxaloadcode()
3004 writew(C320p24rx_mask, ofsAddr + RX_mask); in moxaloadcode()
3005 writew(C320p24tx_mask, ofsAddr + TX_mask); in moxaloadcode()
3006 writew(C320p24rx_spage + i * C320p24buf_pgno, ofsAddr + Page_rxb); in moxaloadcode()
3007 writew(readw(ofsAddr + Page_rxb) + C320p24rx_pgno, ofsAddr + EndPage_rxb); in moxaloadcode()
3008 writew(C320p24tx_spage + i * C320p24buf_pgno, ofsAddr + Page_txb); in moxaloadcode()
3009 writew(readw(ofsAddr + Page_txb), ofsAddr + EndPage_txb); in moxaloadcode()
3011 writew(C320p32rx_mask, ofsAddr + RX_mask); in moxaloadcode()
3012 writew(C320p32tx_mask, ofsAddr + TX_mask); in moxaloadcode()
3013 writew(C320p32tx_ofs, ofsAddr + Ofs_txb); in moxaloadcode()
3014 writew(C320p32rx_spage + i * C320p32buf_pgno, ofsAddr + Page_rxb); in moxaloadcode()
3015 writew(readb(ofsAddr + Page_rxb), ofsAddr + EndPage_rxb); in moxaloadcode()
3016 writew(C320p32tx_spage + i * C320p32buf_pgno, ofsAddr + Page_txb); in moxaloadcode()
3017 writew(readw(ofsAddr + Page_txb), ofsAddr + EndPage_txb); in moxaloadcode()
3206 unsigned long ofsAddr = moxaTableAddr[port]; in MoxaSetFifo() local
3209 moxafunc(ofsAddr, FC_SetRxFIFOTrig, 0); in MoxaSetFifo()
3210 moxafunc(ofsAddr, FC_SetTxFIFOCnt, 1); in MoxaSetFifo()
3212 moxafunc(ofsAddr, FC_SetRxFIFOTrig, 3); in MoxaSetFifo()
3213 moxafunc(ofsAddr, FC_SetTxFIFOCnt, 16); in MoxaSetFifo()
3220 unsigned long ofsAddr;
3272 ofsAddr = moxaTableAddr[port];
3273 moxafunc(ofsAddr, FC_SetMode, val);
3279 unsigned long ofsAddr;
3282 ofsAddr = moxaTableAddr[port];
3283 size = readw(ofsAddr + TX_mask);
3289 unsigned long ofsAddr;
3292 ofsAddr = moxaTableAddr[port];
3293 size = readw(ofsAddr + RX_mask);
3299 unsigned long ofsAddr;
3303 ofsAddr = moxaTableAddr[port];
3304 rptr = readw(ofsAddr + RXrptr);
3305 wptr = readw(ofsAddr + RXwptr);
3306 mask = readw(ofsAddr + RX_mask);
3317 unsigned long ofsAddr;
3319 ofsAddr = moxaTableAddr[port];
3320 writew(xonValue, ofsAddr + FuncArg);
3321 writew(xoffValue, ofsAddr + FuncArg1);
3322 writew(FC_SetXonXoff, ofsAddr + FuncCode);
3323 wait_finish(ofsAddr);
3328 unsigned long ofsAddr;
3331 ofsAddr = moxaTableAddr[port];
3334 moxafunc(ofsAddr, FC_GetCCSR, 0);
3335 val = readw(ofsAddr + FuncArg);
3339 if (readw(ofsAddr + FlagStat) & Tx_flowOff)