18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * ipac.h Defines for the Infineon (former Siemens) ISDN 58c2ecf20Sopenharmony_ci * chip series 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Author Karsten Keil <keil@isdn4linux.de> 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Copyright 2009 by Karsten Keil <keil@isdn4linux.de> 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include "iohelper.h" 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistruct isac_hw { 158c2ecf20Sopenharmony_ci struct dchannel dch; 168c2ecf20Sopenharmony_ci u32 type; 178c2ecf20Sopenharmony_ci u32 off; /* offset to isac regs */ 188c2ecf20Sopenharmony_ci char *name; 198c2ecf20Sopenharmony_ci spinlock_t *hwlock; /* lock HW access */ 208c2ecf20Sopenharmony_ci read_reg_func *read_reg; 218c2ecf20Sopenharmony_ci write_reg_func *write_reg; 228c2ecf20Sopenharmony_ci fifo_func *read_fifo; 238c2ecf20Sopenharmony_ci fifo_func *write_fifo; 248c2ecf20Sopenharmony_ci int (*monitor)(void *, u32, u8 *, int); 258c2ecf20Sopenharmony_ci void (*release)(struct isac_hw *); 268c2ecf20Sopenharmony_ci int (*init)(struct isac_hw *); 278c2ecf20Sopenharmony_ci int (*ctrl)(struct isac_hw *, u32, u_long); 288c2ecf20Sopenharmony_ci int (*open)(struct isac_hw *, struct channel_req *); 298c2ecf20Sopenharmony_ci u8 *mon_tx; 308c2ecf20Sopenharmony_ci u8 *mon_rx; 318c2ecf20Sopenharmony_ci int mon_txp; 328c2ecf20Sopenharmony_ci int mon_txc; 338c2ecf20Sopenharmony_ci int mon_rxp; 348c2ecf20Sopenharmony_ci struct arcofi_msg *arcofi_list; 358c2ecf20Sopenharmony_ci struct timer_list arcofitimer; 368c2ecf20Sopenharmony_ci wait_queue_head_t arcofi_wait; 378c2ecf20Sopenharmony_ci u8 arcofi_bc; 388c2ecf20Sopenharmony_ci u8 arcofi_state; 398c2ecf20Sopenharmony_ci u8 mocr; 408c2ecf20Sopenharmony_ci u8 adf2; 418c2ecf20Sopenharmony_ci u8 state; 428c2ecf20Sopenharmony_ci}; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_cistruct ipac_hw; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cistruct hscx_hw { 478c2ecf20Sopenharmony_ci struct bchannel bch; 488c2ecf20Sopenharmony_ci struct ipac_hw *ip; 498c2ecf20Sopenharmony_ci u8 fifo_size; 508c2ecf20Sopenharmony_ci u8 off; /* offset to ICA or ICB */ 518c2ecf20Sopenharmony_ci u8 slot; 528c2ecf20Sopenharmony_ci char log[64]; 538c2ecf20Sopenharmony_ci}; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_cistruct ipac_hw { 568c2ecf20Sopenharmony_ci struct isac_hw isac; 578c2ecf20Sopenharmony_ci struct hscx_hw hscx[2]; 588c2ecf20Sopenharmony_ci char *name; 598c2ecf20Sopenharmony_ci void *hw; 608c2ecf20Sopenharmony_ci spinlock_t *hwlock; /* lock HW access */ 618c2ecf20Sopenharmony_ci struct module *owner; 628c2ecf20Sopenharmony_ci u32 type; 638c2ecf20Sopenharmony_ci read_reg_func *read_reg; 648c2ecf20Sopenharmony_ci write_reg_func *write_reg; 658c2ecf20Sopenharmony_ci fifo_func *read_fifo; 668c2ecf20Sopenharmony_ci fifo_func *write_fifo; 678c2ecf20Sopenharmony_ci void (*release)(struct ipac_hw *); 688c2ecf20Sopenharmony_ci int (*init)(struct ipac_hw *); 698c2ecf20Sopenharmony_ci int (*ctrl)(struct ipac_hw *, u32, u_long); 708c2ecf20Sopenharmony_ci u8 conf; 718c2ecf20Sopenharmony_ci}; 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define IPAC_TYPE_ISAC 0x0010 748c2ecf20Sopenharmony_ci#define IPAC_TYPE_IPAC 0x0020 758c2ecf20Sopenharmony_ci#define IPAC_TYPE_ISACX 0x0040 768c2ecf20Sopenharmony_ci#define IPAC_TYPE_IPACX 0x0080 778c2ecf20Sopenharmony_ci#define IPAC_TYPE_HSCX 0x0100 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci#define ISAC_USE_ARCOFI 0x1000 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci/* Monitor functions */ 828c2ecf20Sopenharmony_ci#define MONITOR_RX_0 0x1000 838c2ecf20Sopenharmony_ci#define MONITOR_RX_1 0x1001 848c2ecf20Sopenharmony_ci#define MONITOR_TX_0 0x2000 858c2ecf20Sopenharmony_ci#define MONITOR_TX_1 0x2001 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci/* All registers original Siemens Spec */ 888c2ecf20Sopenharmony_ci/* IPAC/ISAC registers */ 898c2ecf20Sopenharmony_ci#define ISAC_ISTA 0x20 908c2ecf20Sopenharmony_ci#define ISAC_MASK 0x20 918c2ecf20Sopenharmony_ci#define ISAC_CMDR 0x21 928c2ecf20Sopenharmony_ci#define ISAC_STAR 0x21 938c2ecf20Sopenharmony_ci#define ISAC_MODE 0x22 948c2ecf20Sopenharmony_ci#define ISAC_TIMR 0x23 958c2ecf20Sopenharmony_ci#define ISAC_EXIR 0x24 968c2ecf20Sopenharmony_ci#define ISAC_RBCL 0x25 978c2ecf20Sopenharmony_ci#define ISAC_RSTA 0x27 988c2ecf20Sopenharmony_ci#define ISAC_RBCH 0x2A 998c2ecf20Sopenharmony_ci#define ISAC_SPCR 0x30 1008c2ecf20Sopenharmony_ci#define ISAC_CIR0 0x31 1018c2ecf20Sopenharmony_ci#define ISAC_CIX0 0x31 1028c2ecf20Sopenharmony_ci#define ISAC_MOR0 0x32 1038c2ecf20Sopenharmony_ci#define ISAC_MOX0 0x32 1048c2ecf20Sopenharmony_ci#define ISAC_CIR1 0x33 1058c2ecf20Sopenharmony_ci#define ISAC_CIX1 0x33 1068c2ecf20Sopenharmony_ci#define ISAC_MOR1 0x34 1078c2ecf20Sopenharmony_ci#define ISAC_MOX1 0x34 1088c2ecf20Sopenharmony_ci#define ISAC_STCR 0x37 1098c2ecf20Sopenharmony_ci#define ISAC_ADF1 0x38 1108c2ecf20Sopenharmony_ci#define ISAC_ADF2 0x39 1118c2ecf20Sopenharmony_ci#define ISAC_MOCR 0x3a 1128c2ecf20Sopenharmony_ci#define ISAC_MOSR 0x3a 1138c2ecf20Sopenharmony_ci#define ISAC_SQRR 0x3b 1148c2ecf20Sopenharmony_ci#define ISAC_SQXR 0x3b 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci#define ISAC_RBCH_XAC 0x80 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define IPAC_D_TIN2 0x01 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci/* IPAC/HSCX */ 1218c2ecf20Sopenharmony_ci#define IPAC_ISTAB 0x20 /* RD */ 1228c2ecf20Sopenharmony_ci#define IPAC_MASKB 0x20 /* WR */ 1238c2ecf20Sopenharmony_ci#define IPAC_STARB 0x21 /* RD */ 1248c2ecf20Sopenharmony_ci#define IPAC_CMDRB 0x21 /* WR */ 1258c2ecf20Sopenharmony_ci#define IPAC_MODEB 0x22 /* R/W */ 1268c2ecf20Sopenharmony_ci#define IPAC_EXIRB 0x24 /* RD */ 1278c2ecf20Sopenharmony_ci#define IPAC_RBCLB 0x25 /* RD */ 1288c2ecf20Sopenharmony_ci#define IPAC_RAH1 0x26 /* WR */ 1298c2ecf20Sopenharmony_ci#define IPAC_RAH2 0x27 /* WR */ 1308c2ecf20Sopenharmony_ci#define IPAC_RSTAB 0x27 /* RD */ 1318c2ecf20Sopenharmony_ci#define IPAC_RAL1 0x28 /* R/W */ 1328c2ecf20Sopenharmony_ci#define IPAC_RAL2 0x29 /* WR */ 1338c2ecf20Sopenharmony_ci#define IPAC_RHCRB 0x29 /* RD */ 1348c2ecf20Sopenharmony_ci#define IPAC_XBCL 0x2A /* WR */ 1358c2ecf20Sopenharmony_ci#define IPAC_CCR2 0x2C /* R/W */ 1368c2ecf20Sopenharmony_ci#define IPAC_RBCHB 0x2D /* RD */ 1378c2ecf20Sopenharmony_ci#define IPAC_XBCH 0x2D /* WR */ 1388c2ecf20Sopenharmony_ci#define HSCX_VSTR 0x2E /* RD */ 1398c2ecf20Sopenharmony_ci#define IPAC_RLCR 0x2E /* WR */ 1408c2ecf20Sopenharmony_ci#define IPAC_CCR1 0x2F /* R/W */ 1418c2ecf20Sopenharmony_ci#define IPAC_TSAX 0x30 /* WR */ 1428c2ecf20Sopenharmony_ci#define IPAC_TSAR 0x31 /* WR */ 1438c2ecf20Sopenharmony_ci#define IPAC_XCCR 0x32 /* WR */ 1448c2ecf20Sopenharmony_ci#define IPAC_RCCR 0x33 /* WR */ 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci/* IPAC_ISTAB/IPAC_MASKB bits */ 1478c2ecf20Sopenharmony_ci#define IPAC_B_XPR 0x10 1488c2ecf20Sopenharmony_ci#define IPAC_B_RPF 0x40 1498c2ecf20Sopenharmony_ci#define IPAC_B_RME 0x80 1508c2ecf20Sopenharmony_ci#define IPAC_B_ON 0x2F 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci/* IPAC_EXIRB bits */ 1538c2ecf20Sopenharmony_ci#define IPAC_B_RFS 0x04 1548c2ecf20Sopenharmony_ci#define IPAC_B_RFO 0x10 1558c2ecf20Sopenharmony_ci#define IPAC_B_XDU 0x40 1568c2ecf20Sopenharmony_ci#define IPAC_B_XMR 0x80 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci/* IPAC special registers */ 1598c2ecf20Sopenharmony_ci#define IPAC_CONF 0xC0 /* R/W */ 1608c2ecf20Sopenharmony_ci#define IPAC_ISTA 0xC1 /* RD */ 1618c2ecf20Sopenharmony_ci#define IPAC_MASK 0xC1 /* WR */ 1628c2ecf20Sopenharmony_ci#define IPAC_ID 0xC2 /* RD */ 1638c2ecf20Sopenharmony_ci#define IPAC_ACFG 0xC3 /* R/W */ 1648c2ecf20Sopenharmony_ci#define IPAC_AOE 0xC4 /* R/W */ 1658c2ecf20Sopenharmony_ci#define IPAC_ARX 0xC5 /* RD */ 1668c2ecf20Sopenharmony_ci#define IPAC_ATX 0xC5 /* WR */ 1678c2ecf20Sopenharmony_ci#define IPAC_PITA1 0xC6 /* R/W */ 1688c2ecf20Sopenharmony_ci#define IPAC_PITA2 0xC7 /* R/W */ 1698c2ecf20Sopenharmony_ci#define IPAC_POTA1 0xC8 /* R/W */ 1708c2ecf20Sopenharmony_ci#define IPAC_POTA2 0xC9 /* R/W */ 1718c2ecf20Sopenharmony_ci#define IPAC_PCFG 0xCA /* R/W */ 1728c2ecf20Sopenharmony_ci#define IPAC_SCFG 0xCB /* R/W */ 1738c2ecf20Sopenharmony_ci#define IPAC_TIMR2 0xCC /* R/W */ 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci/* IPAC_ISTA/_MASK bits */ 1768c2ecf20Sopenharmony_ci#define IPAC__EXB 0x01 1778c2ecf20Sopenharmony_ci#define IPAC__ICB 0x02 1788c2ecf20Sopenharmony_ci#define IPAC__EXA 0x04 1798c2ecf20Sopenharmony_ci#define IPAC__ICA 0x08 1808c2ecf20Sopenharmony_ci#define IPAC__EXD 0x10 1818c2ecf20Sopenharmony_ci#define IPAC__ICD 0x20 1828c2ecf20Sopenharmony_ci#define IPAC__INT0 0x40 1838c2ecf20Sopenharmony_ci#define IPAC__INT1 0x80 1848c2ecf20Sopenharmony_ci#define IPAC__ON 0xC0 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci/* HSCX ISTA/MASK bits */ 1878c2ecf20Sopenharmony_ci#define HSCX__EXB 0x01 1888c2ecf20Sopenharmony_ci#define HSCX__EXA 0x02 1898c2ecf20Sopenharmony_ci#define HSCX__ICA 0x04 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci/* ISAC/ISACX/IPAC/IPACX L1 commands */ 1928c2ecf20Sopenharmony_ci#define ISAC_CMD_TIM 0x0 1938c2ecf20Sopenharmony_ci#define ISAC_CMD_RS 0x1 1948c2ecf20Sopenharmony_ci#define ISAC_CMD_SCZ 0x4 1958c2ecf20Sopenharmony_ci#define ISAC_CMD_SSZ 0x2 1968c2ecf20Sopenharmony_ci#define ISAC_CMD_AR8 0x8 1978c2ecf20Sopenharmony_ci#define ISAC_CMD_AR10 0x9 1988c2ecf20Sopenharmony_ci#define ISAC_CMD_ARL 0xA 1998c2ecf20Sopenharmony_ci#define ISAC_CMD_DUI 0xF 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci/* ISAC/ISACX/IPAC/IPACX L1 indications */ 2028c2ecf20Sopenharmony_ci#define ISAC_IND_DR 0x0 2038c2ecf20Sopenharmony_ci#define ISAC_IND_RS 0x1 2048c2ecf20Sopenharmony_ci#define ISAC_IND_SD 0x2 2058c2ecf20Sopenharmony_ci#define ISAC_IND_DIS 0x3 2068c2ecf20Sopenharmony_ci#define ISAC_IND_RSY 0x4 2078c2ecf20Sopenharmony_ci#define ISAC_IND_DR6 0x5 2088c2ecf20Sopenharmony_ci#define ISAC_IND_EI 0x6 2098c2ecf20Sopenharmony_ci#define ISAC_IND_PU 0x7 2108c2ecf20Sopenharmony_ci#define ISAC_IND_ARD 0x8 2118c2ecf20Sopenharmony_ci#define ISAC_IND_TI 0xA 2128c2ecf20Sopenharmony_ci#define ISAC_IND_ATI 0xB 2138c2ecf20Sopenharmony_ci#define ISAC_IND_AI8 0xC 2148c2ecf20Sopenharmony_ci#define ISAC_IND_AI10 0xD 2158c2ecf20Sopenharmony_ci#define ISAC_IND_DID 0xF 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ci/* the new ISACX / IPACX */ 2188c2ecf20Sopenharmony_ci/* D-channel registers */ 2198c2ecf20Sopenharmony_ci#define ISACX_RFIFOD 0x00 /* RD */ 2208c2ecf20Sopenharmony_ci#define ISACX_XFIFOD 0x00 /* WR */ 2218c2ecf20Sopenharmony_ci#define ISACX_ISTAD 0x20 /* RD */ 2228c2ecf20Sopenharmony_ci#define ISACX_MASKD 0x20 /* WR */ 2238c2ecf20Sopenharmony_ci#define ISACX_STARD 0x21 /* RD */ 2248c2ecf20Sopenharmony_ci#define ISACX_CMDRD 0x21 /* WR */ 2258c2ecf20Sopenharmony_ci#define ISACX_MODED 0x22 /* R/W */ 2268c2ecf20Sopenharmony_ci#define ISACX_EXMD1 0x23 /* R/W */ 2278c2ecf20Sopenharmony_ci#define ISACX_TIMR1 0x24 /* R/W */ 2288c2ecf20Sopenharmony_ci#define ISACX_SAP1 0x25 /* WR */ 2298c2ecf20Sopenharmony_ci#define ISACX_SAP2 0x26 /* WR */ 2308c2ecf20Sopenharmony_ci#define ISACX_RBCLD 0x26 /* RD */ 2318c2ecf20Sopenharmony_ci#define ISACX_RBCHD 0x27 /* RD */ 2328c2ecf20Sopenharmony_ci#define ISACX_TEI1 0x27 /* WR */ 2338c2ecf20Sopenharmony_ci#define ISACX_TEI2 0x28 /* WR */ 2348c2ecf20Sopenharmony_ci#define ISACX_RSTAD 0x28 /* RD */ 2358c2ecf20Sopenharmony_ci#define ISACX_TMD 0x29 /* R/W */ 2368c2ecf20Sopenharmony_ci#define ISACX_CIR0 0x2E /* RD */ 2378c2ecf20Sopenharmony_ci#define ISACX_CIX0 0x2E /* WR */ 2388c2ecf20Sopenharmony_ci#define ISACX_CIR1 0x2F /* RD */ 2398c2ecf20Sopenharmony_ci#define ISACX_CIX1 0x2F /* WR */ 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci/* Transceiver registers */ 2428c2ecf20Sopenharmony_ci#define ISACX_TR_CONF0 0x30 /* R/W */ 2438c2ecf20Sopenharmony_ci#define ISACX_TR_CONF1 0x31 /* R/W */ 2448c2ecf20Sopenharmony_ci#define ISACX_TR_CONF2 0x32 /* R/W */ 2458c2ecf20Sopenharmony_ci#define ISACX_TR_STA 0x33 /* RD */ 2468c2ecf20Sopenharmony_ci#define ISACX_TR_CMD 0x34 /* R/W */ 2478c2ecf20Sopenharmony_ci#define ISACX_SQRR1 0x35 /* RD */ 2488c2ecf20Sopenharmony_ci#define ISACX_SQXR1 0x35 /* WR */ 2498c2ecf20Sopenharmony_ci#define ISACX_SQRR2 0x36 /* RD */ 2508c2ecf20Sopenharmony_ci#define ISACX_SQXR2 0x36 /* WR */ 2518c2ecf20Sopenharmony_ci#define ISACX_SQRR3 0x37 /* RD */ 2528c2ecf20Sopenharmony_ci#define ISACX_SQXR3 0x37 /* WR */ 2538c2ecf20Sopenharmony_ci#define ISACX_ISTATR 0x38 /* RD */ 2548c2ecf20Sopenharmony_ci#define ISACX_MASKTR 0x39 /* R/W */ 2558c2ecf20Sopenharmony_ci#define ISACX_TR_MODE 0x3A /* R/W */ 2568c2ecf20Sopenharmony_ci#define ISACX_ACFG1 0x3C /* R/W */ 2578c2ecf20Sopenharmony_ci#define ISACX_ACFG2 0x3D /* R/W */ 2588c2ecf20Sopenharmony_ci#define ISACX_AOE 0x3E /* R/W */ 2598c2ecf20Sopenharmony_ci#define ISACX_ARX 0x3F /* RD */ 2608c2ecf20Sopenharmony_ci#define ISACX_ATX 0x3F /* WR */ 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci/* IOM: Timeslot, DPS, CDA */ 2638c2ecf20Sopenharmony_ci#define ISACX_CDA10 0x40 /* R/W */ 2648c2ecf20Sopenharmony_ci#define ISACX_CDA11 0x41 /* R/W */ 2658c2ecf20Sopenharmony_ci#define ISACX_CDA20 0x42 /* R/W */ 2668c2ecf20Sopenharmony_ci#define ISACX_CDA21 0x43 /* R/W */ 2678c2ecf20Sopenharmony_ci#define ISACX_CDA_TSDP10 0x44 /* R/W */ 2688c2ecf20Sopenharmony_ci#define ISACX_CDA_TSDP11 0x45 /* R/W */ 2698c2ecf20Sopenharmony_ci#define ISACX_CDA_TSDP20 0x46 /* R/W */ 2708c2ecf20Sopenharmony_ci#define ISACX_CDA_TSDP21 0x47 /* R/W */ 2718c2ecf20Sopenharmony_ci#define ISACX_BCHA_TSDP_BC1 0x48 /* R/W */ 2728c2ecf20Sopenharmony_ci#define ISACX_BCHA_TSDP_BC2 0x49 /* R/W */ 2738c2ecf20Sopenharmony_ci#define ISACX_BCHB_TSDP_BC1 0x4A /* R/W */ 2748c2ecf20Sopenharmony_ci#define ISACX_BCHB_TSDP_BC2 0x4B /* R/W */ 2758c2ecf20Sopenharmony_ci#define ISACX_TR_TSDP_BC1 0x4C /* R/W */ 2768c2ecf20Sopenharmony_ci#define ISACX_TR_TSDP_BC2 0x4D /* R/W */ 2778c2ecf20Sopenharmony_ci#define ISACX_CDA1_CR 0x4E /* R/W */ 2788c2ecf20Sopenharmony_ci#define ISACX_CDA2_CR 0x4F /* R/W */ 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci/* IOM: Contol, Sync transfer, Monitor */ 2818c2ecf20Sopenharmony_ci#define ISACX_TR_CR 0x50 /* R/W */ 2828c2ecf20Sopenharmony_ci#define ISACX_TRC_CR 0x50 /* R/W */ 2838c2ecf20Sopenharmony_ci#define ISACX_BCHA_CR 0x51 /* R/W */ 2848c2ecf20Sopenharmony_ci#define ISACX_BCHB_CR 0x52 /* R/W */ 2858c2ecf20Sopenharmony_ci#define ISACX_DCI_CR 0x53 /* R/W */ 2868c2ecf20Sopenharmony_ci#define ISACX_DCIC_CR 0x53 /* R/W */ 2878c2ecf20Sopenharmony_ci#define ISACX_MON_CR 0x54 /* R/W */ 2888c2ecf20Sopenharmony_ci#define ISACX_SDS1_CR 0x55 /* R/W */ 2898c2ecf20Sopenharmony_ci#define ISACX_SDS2_CR 0x56 /* R/W */ 2908c2ecf20Sopenharmony_ci#define ISACX_IOM_CR 0x57 /* R/W */ 2918c2ecf20Sopenharmony_ci#define ISACX_STI 0x58 /* RD */ 2928c2ecf20Sopenharmony_ci#define ISACX_ASTI 0x58 /* WR */ 2938c2ecf20Sopenharmony_ci#define ISACX_MSTI 0x59 /* R/W */ 2948c2ecf20Sopenharmony_ci#define ISACX_SDS_CONF 0x5A /* R/W */ 2958c2ecf20Sopenharmony_ci#define ISACX_MCDA 0x5B /* RD */ 2968c2ecf20Sopenharmony_ci#define ISACX_MOR 0x5C /* RD */ 2978c2ecf20Sopenharmony_ci#define ISACX_MOX 0x5C /* WR */ 2988c2ecf20Sopenharmony_ci#define ISACX_MOSR 0x5D /* RD */ 2998c2ecf20Sopenharmony_ci#define ISACX_MOCR 0x5E /* R/W */ 3008c2ecf20Sopenharmony_ci#define ISACX_MSTA 0x5F /* RD */ 3018c2ecf20Sopenharmony_ci#define ISACX_MCONF 0x5F /* WR */ 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci/* Interrupt and general registers */ 3048c2ecf20Sopenharmony_ci#define ISACX_ISTA 0x60 /* RD */ 3058c2ecf20Sopenharmony_ci#define ISACX_MASK 0x60 /* WR */ 3068c2ecf20Sopenharmony_ci#define ISACX_AUXI 0x61 /* RD */ 3078c2ecf20Sopenharmony_ci#define ISACX_AUXM 0x61 /* WR */ 3088c2ecf20Sopenharmony_ci#define ISACX_MODE1 0x62 /* R/W */ 3098c2ecf20Sopenharmony_ci#define ISACX_MODE2 0x63 /* R/W */ 3108c2ecf20Sopenharmony_ci#define ISACX_ID 0x64 /* RD */ 3118c2ecf20Sopenharmony_ci#define ISACX_SRES 0x64 /* WR */ 3128c2ecf20Sopenharmony_ci#define ISACX_TIMR2 0x65 /* R/W */ 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci/* Register Bits */ 3158c2ecf20Sopenharmony_ci/* ISACX/IPACX _ISTAD (R) and _MASKD (W) */ 3168c2ecf20Sopenharmony_ci#define ISACX_D_XDU 0x04 3178c2ecf20Sopenharmony_ci#define ISACX_D_XMR 0x08 3188c2ecf20Sopenharmony_ci#define ISACX_D_XPR 0x10 3198c2ecf20Sopenharmony_ci#define ISACX_D_RFO 0x20 3208c2ecf20Sopenharmony_ci#define ISACX_D_RPF 0x40 3218c2ecf20Sopenharmony_ci#define ISACX_D_RME 0x80 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_ci/* ISACX/IPACX _ISTA (R) and _MASK (W) */ 3248c2ecf20Sopenharmony_ci#define ISACX__ICD 0x01 3258c2ecf20Sopenharmony_ci#define ISACX__MOS 0x02 3268c2ecf20Sopenharmony_ci#define ISACX__TRAN 0x04 3278c2ecf20Sopenharmony_ci#define ISACX__AUX 0x08 3288c2ecf20Sopenharmony_ci#define ISACX__CIC 0x10 3298c2ecf20Sopenharmony_ci#define ISACX__ST 0x20 3308c2ecf20Sopenharmony_ci#define IPACX__ON 0x2C 3318c2ecf20Sopenharmony_ci#define IPACX__ICB 0x40 3328c2ecf20Sopenharmony_ci#define IPACX__ICA 0x80 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci/* ISACX/IPACX _CMDRD (W) */ 3358c2ecf20Sopenharmony_ci#define ISACX_CMDRD_XRES 0x01 3368c2ecf20Sopenharmony_ci#define ISACX_CMDRD_XME 0x02 3378c2ecf20Sopenharmony_ci#define ISACX_CMDRD_XTF 0x08 3388c2ecf20Sopenharmony_ci#define ISACX_CMDRD_STI 0x10 3398c2ecf20Sopenharmony_ci#define ISACX_CMDRD_RRES 0x40 3408c2ecf20Sopenharmony_ci#define ISACX_CMDRD_RMC 0x80 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci/* ISACX/IPACX _RSTAD (R) */ 3438c2ecf20Sopenharmony_ci#define ISACX_RSTAD_TA 0x01 3448c2ecf20Sopenharmony_ci#define ISACX_RSTAD_CR 0x02 3458c2ecf20Sopenharmony_ci#define ISACX_RSTAD_SA0 0x04 3468c2ecf20Sopenharmony_ci#define ISACX_RSTAD_SA1 0x08 3478c2ecf20Sopenharmony_ci#define ISACX_RSTAD_RAB 0x10 3488c2ecf20Sopenharmony_ci#define ISACX_RSTAD_CRC 0x20 3498c2ecf20Sopenharmony_ci#define ISACX_RSTAD_RDO 0x40 3508c2ecf20Sopenharmony_ci#define ISACX_RSTAD_VFR 0x80 3518c2ecf20Sopenharmony_ci 3528c2ecf20Sopenharmony_ci/* ISACX/IPACX _CIR0 (R) */ 3538c2ecf20Sopenharmony_ci#define ISACX_CIR0_BAS 0x01 3548c2ecf20Sopenharmony_ci#define ISACX_CIR0_SG 0x08 3558c2ecf20Sopenharmony_ci#define ISACX_CIR0_CIC1 0x08 3568c2ecf20Sopenharmony_ci#define ISACX_CIR0_CIC0 0x08 3578c2ecf20Sopenharmony_ci 3588c2ecf20Sopenharmony_ci/* B-channel registers */ 3598c2ecf20Sopenharmony_ci#define IPACX_OFF_ICA 0x70 3608c2ecf20Sopenharmony_ci#define IPACX_OFF_ICB 0x80 3618c2ecf20Sopenharmony_ci 3628c2ecf20Sopenharmony_ci/* ICA: IPACX_OFF_ICA + Reg ICB: IPACX_OFF_ICB + Reg */ 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci#define IPACX_ISTAB 0x00 /* RD */ 3658c2ecf20Sopenharmony_ci#define IPACX_MASKB 0x00 /* WR */ 3668c2ecf20Sopenharmony_ci#define IPACX_STARB 0x01 /* RD */ 3678c2ecf20Sopenharmony_ci#define IPACX_CMDRB 0x01 /* WR */ 3688c2ecf20Sopenharmony_ci#define IPACX_MODEB 0x02 /* R/W */ 3698c2ecf20Sopenharmony_ci#define IPACX_EXMB 0x03 /* R/W */ 3708c2ecf20Sopenharmony_ci#define IPACX_RAH1 0x05 /* WR */ 3718c2ecf20Sopenharmony_ci#define IPACX_RAH2 0x06 /* WR */ 3728c2ecf20Sopenharmony_ci#define IPACX_RBCLB 0x06 /* RD */ 3738c2ecf20Sopenharmony_ci#define IPACX_RBCHB 0x07 /* RD */ 3748c2ecf20Sopenharmony_ci#define IPACX_RAL1 0x07 /* WR */ 3758c2ecf20Sopenharmony_ci#define IPACX_RAL2 0x08 /* WR */ 3768c2ecf20Sopenharmony_ci#define IPACX_RSTAB 0x08 /* RD */ 3778c2ecf20Sopenharmony_ci#define IPACX_TMB 0x09 /* R/W */ 3788c2ecf20Sopenharmony_ci#define IPACX_RFIFOB 0x0A /* RD */ 3798c2ecf20Sopenharmony_ci#define IPACX_XFIFOB 0x0A /* WR */ 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_ci/* IPACX_ISTAB / IPACX_MASKB bits */ 3828c2ecf20Sopenharmony_ci#define IPACX_B_XDU 0x04 3838c2ecf20Sopenharmony_ci#define IPACX_B_XPR 0x10 3848c2ecf20Sopenharmony_ci#define IPACX_B_RFO 0x20 3858c2ecf20Sopenharmony_ci#define IPACX_B_RPF 0x40 3868c2ecf20Sopenharmony_ci#define IPACX_B_RME 0x80 3878c2ecf20Sopenharmony_ci 3888c2ecf20Sopenharmony_ci#define IPACX_B_ON 0x0B 3898c2ecf20Sopenharmony_ci 3908c2ecf20Sopenharmony_ciextern int mISDNisac_init(struct isac_hw *, void *); 3918c2ecf20Sopenharmony_ciextern irqreturn_t mISDNisac_irq(struct isac_hw *, u8); 3928c2ecf20Sopenharmony_ciextern u32 mISDNipac_init(struct ipac_hw *, void *); 3938c2ecf20Sopenharmony_ciextern irqreturn_t mISDNipac_irq(struct ipac_hw *, int); 394