Lines Matching refs:ipac
1148 mISDNipac_irq(struct ipac_hw *ipac, int maxloop) in mISDNipac_irq() argument
1152 struct isac_hw *isac = &ipac->isac; in mISDNipac_irq()
1154 if (ipac->type & IPAC_TYPE_IPACX) { in mISDNipac_irq()
1155 ista = ReadIPAC(ipac, ISACX_ISTA); in mISDNipac_irq()
1157 pr_debug("%s: ISTA %02x\n", ipac->name, ista); in mISDNipac_irq()
1159 ipac_irq(&ipac->hscx[0], ista); in mISDNipac_irq()
1161 ipac_irq(&ipac->hscx[1], ista); in mISDNipac_irq()
1163 mISDNisac_irq(&ipac->isac, ista); in mISDNipac_irq()
1164 ista = ReadIPAC(ipac, ISACX_ISTA); in mISDNipac_irq()
1166 } else if (ipac->type & IPAC_TYPE_IPAC) { in mISDNipac_irq()
1167 ista = ReadIPAC(ipac, IPAC_ISTA); in mISDNipac_irq()
1169 pr_debug("%s: ISTA %02x\n", ipac->name, ista); in mISDNipac_irq()
1172 pr_debug("%s: ISTAD %02x\n", ipac->name, istad); in mISDNipac_irq()
1174 pr_debug("%s TIN2 irq\n", ipac->name); in mISDNipac_irq()
1180 ipac_irq(&ipac->hscx[0], ista); in mISDNipac_irq()
1182 ipac_irq(&ipac->hscx[1], ista); in mISDNipac_irq()
1183 ista = ReadIPAC(ipac, IPAC_ISTA); in mISDNipac_irq()
1185 } else if (ipac->type & IPAC_TYPE_HSCX) { in mISDNipac_irq()
1187 ista = ReadIPAC(ipac, IPAC_ISTAB + ipac->hscx[1].off); in mISDNipac_irq()
1188 pr_debug("%s: B2 ISTA %02x\n", ipac->name, ista); in mISDNipac_irq()
1190 ipac_irq(&ipac->hscx[1], ista); in mISDNipac_irq()
1192 pr_debug("%s: ISTAD %02x\n", ipac->name, istad); in mISDNipac_irq()
1202 pr_debug("%s: %d irqloops cpu%d\n", ipac->name, in mISDNipac_irq()
1205 pr_notice("%s: %d IRQ LOOP cpu%d\n", ipac->name, in mISDNipac_irq()
1418 free_ipac(struct ipac_hw *ipac) in free_ipac() argument
1420 isac_release(&ipac->isac); in free_ipac()
1453 ipac_init(struct ipac_hw *ipac) in ipac_init() argument
1457 if (ipac->type & IPAC_TYPE_HSCX) { in ipac_init()
1458 hscx_init(&ipac->hscx[0]); in ipac_init()
1459 hscx_init(&ipac->hscx[1]); in ipac_init()
1460 val = ReadIPAC(ipac, IPAC_ID); in ipac_init()
1461 } else if (ipac->type & IPAC_TYPE_IPAC) { in ipac_init()
1462 hscx_init(&ipac->hscx[0]); in ipac_init()
1463 hscx_init(&ipac->hscx[1]); in ipac_init()
1464 WriteIPAC(ipac, IPAC_MASK, IPAC__ON); in ipac_init()
1465 val = ReadIPAC(ipac, IPAC_CONF); in ipac_init()
1467 pr_debug("%s: IPAC CONF %02x/%02x\n", ipac->name, in ipac_init()
1468 val, ipac->conf); in ipac_init()
1469 WriteIPAC(ipac, IPAC_CONF, ipac->conf); in ipac_init()
1470 val = ReadIPAC(ipac, IPAC_ID); in ipac_init()
1471 if (ipac->hscx[0].bch.debug & DEBUG_HW) in ipac_init()
1472 pr_notice("%s: IPAC Design ID %02x\n", ipac->name, val); in ipac_init()
1475 return isac_init(&ipac->isac); in ipac_init()
1479 open_bchannel(struct ipac_hw *ipac, struct channel_req *rq) in open_bchannel() argument
1487 bch = &ipac->hscx[rq->adr.channel - 1].bch; in open_bchannel()
1497 channel_ctrl(struct ipac_hw *ipac, struct mISDN_ctrl_req *cq) in channel_ctrl() argument
1511 ret = ipac->ctrl(ipac, HW_TESTLOOP, cq->channel); in channel_ctrl()
1514 ret = ipac->isac.ctrl(&ipac->isac, HW_TIMER3_VALUE, cq->p1); in channel_ctrl()
1517 pr_info("%s: unknown CTRL OP %x\n", ipac->name, cq->op); in channel_ctrl()
1530 struct ipac_hw *ipac = container_of(isac, struct ipac_hw, isac); in ipac_dctrl() local
1534 pr_debug("%s: DCTRL: %x %p\n", ipac->name, cmd, arg); in ipac_dctrl()
1541 err = open_bchannel(ipac, rq); in ipac_dctrl()
1544 if (!try_module_get(ipac->owner)) in ipac_dctrl()
1545 pr_info("%s: cannot get module\n", ipac->name); in ipac_dctrl()
1548 pr_debug("%s: dev(%d) close from %p\n", ipac->name, in ipac_dctrl()
1550 module_put(ipac->owner); in ipac_dctrl()
1553 err = channel_ctrl(ipac, arg); in ipac_dctrl()
1556 pr_debug("%s: unknown DCTRL command %x\n", ipac->name, cmd); in ipac_dctrl()
1563 mISDNipac_init(struct ipac_hw *ipac, void *hw) in mISDNipac_init() argument
1568 ipac->hw = hw; in mISDNipac_init()
1569 if (ipac->isac.dch.debug & DEBUG_HW) in mISDNipac_init()
1570 pr_notice("%s: ipac type %x\n", ipac->name, ipac->type); in mISDNipac_init()
1571 if (ipac->type & IPAC_TYPE_HSCX) { in mISDNipac_init()
1572 ipac->isac.type = IPAC_TYPE_ISAC; in mISDNipac_init()
1573 ipac->hscx[0].off = 0; in mISDNipac_init()
1574 ipac->hscx[1].off = 0x40; in mISDNipac_init()
1575 ipac->hscx[0].fifo_size = 32; in mISDNipac_init()
1576 ipac->hscx[1].fifo_size = 32; in mISDNipac_init()
1577 } else if (ipac->type & IPAC_TYPE_IPAC) { in mISDNipac_init()
1578 ipac->isac.type = IPAC_TYPE_IPAC | IPAC_TYPE_ISAC; in mISDNipac_init()
1579 ipac->hscx[0].off = 0; in mISDNipac_init()
1580 ipac->hscx[1].off = 0x40; in mISDNipac_init()
1581 ipac->hscx[0].fifo_size = 64; in mISDNipac_init()
1582 ipac->hscx[1].fifo_size = 64; in mISDNipac_init()
1583 } else if (ipac->type & IPAC_TYPE_IPACX) { in mISDNipac_init()
1584 ipac->isac.type = IPAC_TYPE_IPACX | IPAC_TYPE_ISACX; in mISDNipac_init()
1585 ipac->hscx[0].off = IPACX_OFF_ICA; in mISDNipac_init()
1586 ipac->hscx[1].off = IPACX_OFF_ICB; in mISDNipac_init()
1587 ipac->hscx[0].fifo_size = 64; in mISDNipac_init()
1588 ipac->hscx[1].fifo_size = 64; in mISDNipac_init()
1592 mISDNisac_init(&ipac->isac, hw); in mISDNipac_init()
1594 ipac->isac.dch.dev.D.ctrl = ipac_dctrl; in mISDNipac_init()
1597 ipac->hscx[i].bch.nr = i + 1; in mISDNipac_init()
1598 set_channelmap(i + 1, ipac->isac.dch.dev.channelmap); in mISDNipac_init()
1599 list_add(&ipac->hscx[i].bch.ch.list, in mISDNipac_init()
1600 &ipac->isac.dch.dev.bchannels); in mISDNipac_init()
1601 mISDN_initbchannel(&ipac->hscx[i].bch, MAX_DATA_MEM, in mISDNipac_init()
1602 ipac->hscx[i].fifo_size); in mISDNipac_init()
1603 ipac->hscx[i].bch.ch.nr = i + 1; in mISDNipac_init()
1604 ipac->hscx[i].bch.ch.send = &hscx_l2l1; in mISDNipac_init()
1605 ipac->hscx[i].bch.ch.ctrl = hscx_bctrl; in mISDNipac_init()
1606 ipac->hscx[i].bch.hw = hw; in mISDNipac_init()
1607 ipac->hscx[i].ip = ipac; in mISDNipac_init()
1610 ipac->hscx[i].slot = (i == 0) ? 0x2f : 0x03; in mISDNipac_init()
1613 ipac->init = ipac_init; in mISDNipac_init()
1614 ipac->release = free_ipac; in mISDNipac_init()