Lines Matching refs:hw
170 return (readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset)); in ReadISAC()
176 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset, value); in WriteISAC()
182 readfifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0, data, size); in ReadISACfifo()
188 writefifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0, data, size); in WriteISACfifo()
194 return (readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80)); in ReadISAC_IPAC()
200 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80, value); in WriteISAC_IPAC()
206 readfifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size); in ReadISACfifo_IPAC()
212 writefifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size); in WriteISACfifo_IPAC()
218 return (readreg(cs->hw.sedl.adr, in ReadHSCX()
219 cs->hw.sedl.hscx, offset + (hscx ? 0x40 : 0))); in ReadHSCX()
225 writereg(cs->hw.sedl.adr, in WriteHSCX()
226 cs->hw.sedl.hscx, offset + (hscx ? 0x40 : 0), value); in WriteHSCX()
239 return (readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, offset)); in ReadISAR()
241 byteout(cs->hw.sedl.adr, offset); in ReadISAR()
242 return(bytein(cs->hw.sedl.hscx)); in ReadISAR()
249 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, offset, value); in WriteISAR()
252 byteout(cs->hw.sedl.adr, offset); in WriteISAR()
253 byteout(cs->hw.sedl.hscx, value); in WriteISAR()
261 #define READHSCX(cs, nr, reg) readreg(cs->hw.sedl.adr, \
262 cs->hw.sedl.hscx, reg + (nr ? 0x40 : 0))
263 #define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.sedl.adr, \
264 cs->hw.sedl.hscx, reg + (nr ? 0x40 : 0), data)
266 #define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.sedl.adr, \
267 cs->hw.sedl.hscx, (nr ? 0x40 : 0), ptr, cnt)
269 #define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.sedl.adr, \
270 cs->hw.sedl.hscx, (nr ? 0x40 : 0), ptr, cnt)
285 if ((cs->hw.sedl.bus == SEDL_BUS_PCMCIA) && (*cs->busy_flag == 1)) { in sedlbauer_interrupt()
292 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40); in sedlbauer_interrupt()
296 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA); in sedlbauer_interrupt()
300 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40); in sedlbauer_interrupt()
306 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA); in sedlbauer_interrupt()
312 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK, 0xFF); in sedlbauer_interrupt()
313 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK + 0x40, 0xFF); in sedlbauer_interrupt()
314 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0xFF); in sedlbauer_interrupt()
315 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0x0); in sedlbauer_interrupt()
316 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK, 0x0); in sedlbauer_interrupt()
317 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK + 0x40, 0x0); in sedlbauer_interrupt()
330 ista = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ISTA); in sedlbauer_interrupt_ipac()
335 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40); in sedlbauer_interrupt_ipac()
346 val = 0xfe & readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA | 0x80); in sedlbauer_interrupt_ipac()
355 ista = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ISTA); in sedlbauer_interrupt_ipac()
363 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xFF); in sedlbauer_interrupt_ipac()
364 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xC0); in sedlbauer_interrupt_ipac()
379 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT); in sedlbauer_interrupt_isar()
383 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA); in sedlbauer_interrupt_isar()
387 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT); in sedlbauer_interrupt_isar()
393 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA); in sedlbauer_interrupt_isar()
403 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT, 0); in sedlbauer_interrupt_isar()
404 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0xFF); in sedlbauer_interrupt_isar()
405 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0x0); in sedlbauer_interrupt_isar()
406 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT, ISAR_IRQMSK); in sedlbauer_interrupt_isar()
416 } else if (cs->hw.sedl.bus == SEDL_BUS_PCI) { in release_io_sedlbauer()
419 if (cs->hw.sedl.cfg_reg) in release_io_sedlbauer()
420 release_region(cs->hw.sedl.cfg_reg, bytecnt); in release_io_sedlbauer()
430 if (!((cs->hw.sedl.bus == SEDL_BUS_PCMCIA) && in reset_sedlbauer()
431 (cs->hw.sedl.chip == SEDL_CHIP_ISAC_HSCX))) { in reset_sedlbauer()
432 if (cs->hw.sedl.chip == SEDL_CHIP_IPAC) { in reset_sedlbauer()
433 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_POTA2, 0x20); in reset_sedlbauer()
438 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_POTA2, 0x0); in reset_sedlbauer()
441 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_CONF, 0x0); in reset_sedlbauer()
442 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ACFG, 0xff); in reset_sedlbauer()
443 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_AOE, 0x0); in reset_sedlbauer()
444 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xc0); in reset_sedlbauer()
445 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_PCFG, 0x12); in reset_sedlbauer()
447 } else if ((cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) && in reset_sedlbauer()
448 (cs->hw.sedl.bus == SEDL_BUS_PCI)) { in reset_sedlbauer()
449 byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on); in reset_sedlbauer()
454 byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off); in reset_sedlbauer()
459 byteout(cs->hw.sedl.reset_on, SEDL_RESET); /* Reset On */ in reset_sedlbauer()
464 byteout(cs->hw.sedl.reset_off, 0); /* Reset Off */ in reset_sedlbauer()
480 if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) { in Sedl_card_msg()
481 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, in Sedl_card_msg()
483 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, in Sedl_card_msg()
486 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, in Sedl_card_msg()
488 writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, in Sedl_card_msg()
494 if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) { in Sedl_card_msg()
496 writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, in Sedl_card_msg()
514 cs->hw.sedl.reset_off &= ~SEDL_ISAR_PCI_LED2; in Sedl_card_msg()
516 cs->hw.sedl.reset_off &= ~SEDL_ISAR_PCI_LED1; in Sedl_card_msg()
517 byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off); in Sedl_card_msg()
523 cs->hw.sedl.reset_off |= SEDL_ISAR_PCI_LED2; in Sedl_card_msg()
525 cs->hw.sedl.reset_off |= SEDL_ISAR_PCI_LED1; in Sedl_card_msg()
526 byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off); in Sedl_card_msg()
563 cs->hw.sedl.bus = SEDL_BUS_ISA; in setup_sedlbauer()
564 cs->hw.sedl.chip = SEDL_CHIP_TEST; in setup_sedlbauer()
567 cs->hw.sedl.bus = SEDL_BUS_PCMCIA; in setup_sedlbauer()
568 cs->hw.sedl.chip = SEDL_CHIP_TEST; in setup_sedlbauer()
571 cs->hw.sedl.bus = SEDL_BUS_ISA; in setup_sedlbauer()
572 cs->hw.sedl.chip = SEDL_CHIP_ISAC_ISAR; in setup_sedlbauer()
578 cs->hw.sedl.cfg_reg = card->para[1]; in setup_sedlbauer()
580 if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) { in setup_sedlbauer()
611 cs->hw.sedl.cfg_reg = card->para[1]; in setup_sedlbauer()
615 cs->hw.sedl.chip = SEDL_CHIP_ISAC_ISAR; in setup_sedlbauer()
619 cs->hw.sedl.chip = SEDL_CHIP_TEST; in setup_sedlbauer()
650 cs->hw.sedl.cfg_reg = pci_resource_start(dev_sedl, 0); in setup_sedlbauer()
656 cs->hw.sedl.bus = SEDL_BUS_PCI; in setup_sedlbauer()
662 cs->hw.sedl.cfg_reg); in setup_sedlbauer()
668 cs->hw.sedl.chip = SEDL_CHIP_ISAC_ISAR; in setup_sedlbauer()
671 cs->hw.sedl.chip = SEDL_CHIP_ISAC_ISAR; in setup_sedlbauer()
674 cs->hw.sedl.chip = SEDL_CHIP_IPAC; in setup_sedlbauer()
682 cs->hw.sedl.reset_on = SEDL_ISAR_PCI_ISAR_RESET_ON; in setup_sedlbauer()
683 cs->hw.sedl.reset_off = SEDL_ISAR_PCI_ISAR_RESET_OFF; in setup_sedlbauer()
684 byteout(cs->hw.sedl.cfg_reg, 0xff); in setup_sedlbauer()
685 byteout(cs->hw.sedl.cfg_reg, 0x00); in setup_sedlbauer()
686 byteout(cs->hw.sedl.cfg_reg+ 2, 0xdd); in setup_sedlbauer()
687 byteout(cs->hw.sedl.cfg_reg+ 5, 0x02); in setup_sedlbauer()
688 byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on); in setup_sedlbauer()
693 byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off); in setup_sedlbauer()
705 if (cs->hw.sedl.bus != SEDL_BUS_PCMCIA && in setup_sedlbauer()
706 check_region((cs->hw.sedl.cfg_reg), bytecnt)) { in setup_sedlbauer()
710 cs->hw.sedl.cfg_reg, in setup_sedlbauer()
711 cs->hw.sedl.cfg_reg + bytecnt); in setup_sedlbauer()
714 request_region(cs->hw.sedl.cfg_reg, bytecnt, "sedlbauer isdn"); in setup_sedlbauer()
719 cs->hw.sedl.cfg_reg, in setup_sedlbauer()
720 cs->hw.sedl.cfg_reg + bytecnt, in setup_sedlbauer()
733 if (cs->hw.sedl.bus != SEDL_BUS_PCI) { in setup_sedlbauer()
734 val = readreg(cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR, in setup_sedlbauer()
735 cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC, IPAC_ID); in setup_sedlbauer()
740 if (cs->hw.sedl.bus == SEDL_BUS_PCMCIA) { in setup_sedlbauer()
743 cs->hw.sedl.chip = SEDL_CHIP_IPAC; in setup_sedlbauer()
746 if (cs->hw.sedl.chip == SEDL_CHIP_TEST) { in setup_sedlbauer()
747 cs->hw.sedl.chip = SEDL_CHIP_ISAC_HSCX; in setup_sedlbauer()
759 if (cs->hw.sedl.chip == SEDL_CHIP_IPAC) { in setup_sedlbauer()
760 if (cs->hw.sedl.bus == SEDL_BUS_PCI) { in setup_sedlbauer()
761 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_ADR; in setup_sedlbauer()
762 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC; in setup_sedlbauer()
763 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_PCI_IPAC; in setup_sedlbauer()
765 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR; in setup_sedlbauer()
766 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC; in setup_sedlbauer()
767 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC; in setup_sedlbauer()
776 val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ID); in setup_sedlbauer()
785 if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) { in setup_sedlbauer()
786 if (cs->hw.sedl.bus == SEDL_BUS_PCI) { in setup_sedlbauer()
787 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
789 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
791 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
794 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
796 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
798 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
800 cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
802 cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + in setup_sedlbauer()
805 cs->bcs[0].hw.isar.reg = &cs->hw.sedl.isar; in setup_sedlbauer()
806 cs->bcs[1].hw.isar.reg = &cs->hw.sedl.isar; in setup_sedlbauer()
822 if (cs->hw.sedl.bus == SEDL_BUS_PCMCIA) { in setup_sedlbauer()
823 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_ADR; in setup_sedlbauer()
824 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_ISAC; in setup_sedlbauer()
825 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_HSCX; in setup_sedlbauer()
826 cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; in setup_sedlbauer()
827 cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; in setup_sedlbauer()
829 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ADR; in setup_sedlbauer()
830 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ISAC; in setup_sedlbauer()
831 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_HSCX; in setup_sedlbauer()
832 cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_RESET_ON; in setup_sedlbauer()
833 cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_RESET_OFF; in setup_sedlbauer()