he_dev             88 drivers/atm/he.c #define hprintk(fmt,args...)	printk(KERN_ERR DEV_LABEL "%d: " fmt, he_dev->number , ##args)
he_dev             91 drivers/atm/he.c #define HPRINTK(fmt,args...)	printk(KERN_DEBUG DEV_LABEL "%d: " fmt, he_dev->number , ##args)
he_dev            106 drivers/atm/he.c static void he_stop(struct he_dev *dev);
he_dev            110 drivers/atm/he.c static u8 read_prom_byte(struct he_dev *he_dev, int addr);
he_dev            114 drivers/atm/he.c static struct he_dev *he_devs;
he_dev            182 drivers/atm/he.c he_writel_internal(struct he_dev *he_dev, unsigned val, unsigned addr,
he_dev            185 drivers/atm/he.c 	he_writel(he_dev, val, CON_DAT);
he_dev            186 drivers/atm/he.c 	(void) he_readl(he_dev, CON_DAT);		/* flush posted writes */
he_dev            187 drivers/atm/he.c 	he_writel(he_dev, flags | CON_CTL_WRITE | CON_CTL_ADDR(addr), CON_CTL);
he_dev            188 drivers/atm/he.c 	while (he_readl(he_dev, CON_CTL) & CON_CTL_BUSY);
he_dev            201 drivers/atm/he.c he_readl_internal(struct he_dev *he_dev, unsigned addr, unsigned flags)
he_dev            203 drivers/atm/he.c 	he_writel(he_dev, flags | CON_CTL_READ | CON_CTL_ADDR(addr), CON_CTL);
he_dev            204 drivers/atm/he.c 	while (he_readl(he_dev, CON_CTL) & CON_CTL_BUSY);
he_dev            205 drivers/atm/he.c 	return he_readl(he_dev, CON_DAT);
he_dev            328 drivers/atm/he.c __find_vcc(struct he_dev *he_dev, unsigned cid)
he_dev            336 drivers/atm/he.c 	vpi = cid >> he_dev->vcibits;
he_dev            337 drivers/atm/he.c 	vci = cid & ((1 << he_dev->vcibits) - 1);
he_dev            342 drivers/atm/he.c 		if (vcc->dev == he_dev->atm_dev &&
he_dev            355 drivers/atm/he.c 	struct he_dev *he_dev = NULL;
he_dev            375 drivers/atm/he.c 	he_dev = kzalloc(sizeof(struct he_dev),
he_dev            377 drivers/atm/he.c 	if (!he_dev) {
he_dev            381 drivers/atm/he.c 	he_dev->pci_dev = pci_dev;
he_dev            382 drivers/atm/he.c 	he_dev->atm_dev = atm_dev;
he_dev            383 drivers/atm/he.c 	he_dev->atm_dev->dev_data = he_dev;
he_dev            384 drivers/atm/he.c 	atm_dev->dev_data = he_dev;
he_dev            385 drivers/atm/he.c 	he_dev->number = atm_dev->number;
he_dev            386 drivers/atm/he.c 	tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev);
he_dev            387 drivers/atm/he.c 	spin_lock_init(&he_dev->global_lock);
he_dev            390 drivers/atm/he.c 		he_stop(he_dev);
he_dev            394 drivers/atm/he.c 	he_dev->next = NULL;
he_dev            396 drivers/atm/he.c 		he_dev->next = he_devs;
he_dev            397 drivers/atm/he.c 	he_devs = he_dev;
he_dev            403 drivers/atm/he.c 	kfree(he_dev);
he_dev            411 drivers/atm/he.c 	struct he_dev *he_dev;
he_dev            414 drivers/atm/he.c 	he_dev = HE_DEV(atm_dev);
he_dev            418 drivers/atm/he.c 	he_stop(he_dev);
he_dev            420 drivers/atm/he.c 	kfree(he_dev);
he_dev            445 drivers/atm/he.c static void he_init_rx_lbfp0(struct he_dev *he_dev)
he_dev            448 drivers/atm/he.c 	unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf;
he_dev            449 drivers/atm/he.c 	unsigned lbuf_bufsize = he_dev->cells_per_lbuf * ATM_CELL_PAYLOAD;
he_dev            450 drivers/atm/he.c 	unsigned row_offset = he_dev->r0_startrow * he_dev->bytes_per_row;
he_dev            453 drivers/atm/he.c 	lbm_offset = he_readl(he_dev, RCMLBM_BA);
he_dev            455 drivers/atm/he.c 	he_writel(he_dev, lbufd_index, RLBF0_H);
he_dev            457 drivers/atm/he.c 	for (i = 0, lbuf_count = 0; i < he_dev->r0_numbuffs; ++i) {
he_dev            461 drivers/atm/he.c 		he_writel_rcm(he_dev, lbuf_addr, lbm_offset);
he_dev            462 drivers/atm/he.c 		he_writel_rcm(he_dev, lbufd_index, lbm_offset + 1);
he_dev            466 drivers/atm/he.c 			row_offset += he_dev->bytes_per_row;
he_dev            471 drivers/atm/he.c 	he_writel(he_dev, lbufd_index - 2, RLBF0_T);
he_dev            472 drivers/atm/he.c 	he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C);
he_dev            475 drivers/atm/he.c static void he_init_rx_lbfp1(struct he_dev *he_dev)
he_dev            478 drivers/atm/he.c 	unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf;
he_dev            479 drivers/atm/he.c 	unsigned lbuf_bufsize = he_dev->cells_per_lbuf * ATM_CELL_PAYLOAD;
he_dev            480 drivers/atm/he.c 	unsigned row_offset = he_dev->r1_startrow * he_dev->bytes_per_row;
he_dev            483 drivers/atm/he.c 	lbm_offset = he_readl(he_dev, RCMLBM_BA) + (2 * lbufd_index);
he_dev            485 drivers/atm/he.c 	he_writel(he_dev, lbufd_index, RLBF1_H);
he_dev            487 drivers/atm/he.c 	for (i = 0, lbuf_count = 0; i < he_dev->r1_numbuffs; ++i) {
he_dev            491 drivers/atm/he.c 		he_writel_rcm(he_dev, lbuf_addr, lbm_offset);
he_dev            492 drivers/atm/he.c 		he_writel_rcm(he_dev, lbufd_index, lbm_offset + 1);
he_dev            496 drivers/atm/he.c 			row_offset += he_dev->bytes_per_row;
he_dev            501 drivers/atm/he.c 	he_writel(he_dev, lbufd_index - 2, RLBF1_T);
he_dev            502 drivers/atm/he.c 	he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C);
he_dev            505 drivers/atm/he.c static void he_init_tx_lbfp(struct he_dev *he_dev)
he_dev            508 drivers/atm/he.c 	unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf;
he_dev            509 drivers/atm/he.c 	unsigned lbuf_bufsize = he_dev->cells_per_lbuf * ATM_CELL_PAYLOAD;
he_dev            510 drivers/atm/he.c 	unsigned row_offset = he_dev->tx_startrow * he_dev->bytes_per_row;
he_dev            512 drivers/atm/he.c 	lbufd_index = he_dev->r0_numbuffs + he_dev->r1_numbuffs;
he_dev            513 drivers/atm/he.c 	lbm_offset = he_readl(he_dev, RCMLBM_BA) + (2 * lbufd_index);
he_dev            515 drivers/atm/he.c 	he_writel(he_dev, lbufd_index, TLBF_H);
he_dev            517 drivers/atm/he.c 	for (i = 0, lbuf_count = 0; i < he_dev->tx_numbuffs; ++i) {
he_dev            521 drivers/atm/he.c 		he_writel_rcm(he_dev, lbuf_addr, lbm_offset);
he_dev            522 drivers/atm/he.c 		he_writel_rcm(he_dev, lbufd_index, lbm_offset + 1);
he_dev            526 drivers/atm/he.c 			row_offset += he_dev->bytes_per_row;
he_dev            531 drivers/atm/he.c 	he_writel(he_dev, lbufd_index - 1, TLBF_T);
he_dev            534 drivers/atm/he.c static int he_init_tpdrq(struct he_dev *he_dev)
he_dev            536 drivers/atm/he.c 	he_dev->tpdrq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
he_dev            538 drivers/atm/he.c 						&he_dev->tpdrq_phys,
he_dev            540 drivers/atm/he.c 	if (he_dev->tpdrq_base == NULL) {
he_dev            545 drivers/atm/he.c 	he_dev->tpdrq_tail = he_dev->tpdrq_base;
he_dev            546 drivers/atm/he.c 	he_dev->tpdrq_head = he_dev->tpdrq_base;
he_dev            548 drivers/atm/he.c 	he_writel(he_dev, he_dev->tpdrq_phys, TPDRQ_B_H);
he_dev            549 drivers/atm/he.c 	he_writel(he_dev, 0, TPDRQ_T);	
he_dev            550 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TPDRQ_SIZE - 1, TPDRQ_S);
he_dev            555 drivers/atm/he.c static void he_init_cs_block(struct he_dev *he_dev)
he_dev            563 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x0, CS_STTIM0 + reg);
he_dev            567 drivers/atm/he.c 	clock = he_is622(he_dev) ? 66667000 : 50000000;
he_dev            568 drivers/atm/he.c 	rate = he_dev->atm_dev->link_rate;
he_dev            579 drivers/atm/he.c 		he_writel_mbox(he_dev, period, CS_TGRLD0 + reg);
he_dev            583 drivers/atm/he.c 	if (he_is622(he_dev)) {
he_dev            585 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x000800fa, CS_ERTHR0);
he_dev            586 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x000c33cb, CS_ERTHR1);
he_dev            587 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x0010101b, CS_ERTHR2);
he_dev            588 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x00181dac, CS_ERTHR3);
he_dev            589 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x00280600, CS_ERTHR4);
he_dev            592 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x023de8b3, CS_ERCTL0);
he_dev            593 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x1801, CS_ERCTL1);
he_dev            594 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x68b3, CS_ERCTL2);
he_dev            595 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x1280, CS_ERSTAT0);
he_dev            596 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x68b3, CS_ERSTAT1);
he_dev            597 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x14585, CS_RTFWR);
he_dev            599 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x4680, CS_RTATR);
he_dev            602 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x00159ece, CS_TFBSET);
he_dev            603 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x68b3, CS_WCRMAX);
he_dev            604 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x5eb3, CS_WCRMIN);
he_dev            605 drivers/atm/he.c 		he_writel_mbox(he_dev, 0xe8b3, CS_WCRINC);
he_dev            606 drivers/atm/he.c 		he_writel_mbox(he_dev, 0xdeb3, CS_WCRDEC);
he_dev            607 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x68b3, CS_WCRCEIL);
he_dev            610 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x5, CS_OTPPER);
he_dev            611 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x14, CS_OTWPER);
he_dev            614 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x000400ea, CS_ERTHR0);
he_dev            615 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x00063388, CS_ERTHR1);
he_dev            616 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x00081018, CS_ERTHR2);
he_dev            617 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x000c1dac, CS_ERTHR3);
he_dev            618 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x0014051a, CS_ERTHR4);
he_dev            621 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x0235e4b1, CS_ERCTL0);
he_dev            622 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x4701, CS_ERCTL1);
he_dev            623 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x64b1, CS_ERCTL2);
he_dev            624 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x1280, CS_ERSTAT0);
he_dev            625 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x64b1, CS_ERSTAT1);
he_dev            626 drivers/atm/he.c 		he_writel_mbox(he_dev, 0xf424, CS_RTFWR);
he_dev            628 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x4680, CS_RTATR);
he_dev            631 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x000563b7, CS_TFBSET);
he_dev            632 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x64b1, CS_WCRMAX);
he_dev            633 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x5ab1, CS_WCRMIN);
he_dev            634 drivers/atm/he.c 		he_writel_mbox(he_dev, 0xe4b1, CS_WCRINC);
he_dev            635 drivers/atm/he.c 		he_writel_mbox(he_dev, 0xdab1, CS_WCRDEC);
he_dev            636 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x64b1, CS_WCRCEIL);
he_dev            639 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x6, CS_OTPPER);
he_dev            640 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x1e, CS_OTWPER);
he_dev            643 drivers/atm/he.c 	he_writel_mbox(he_dev, 0x8, CS_OTTLIM);
he_dev            646 drivers/atm/he.c 		he_writel_mbox(he_dev, 0x0, CS_HGRRT0 + reg);
he_dev            650 drivers/atm/he.c static int he_init_cs_block_rcm(struct he_dev *he_dev)
he_dev            667 drivers/atm/he.c 		he_writel_rcm(he_dev, 0x0, CONFIG_RCMABR + reg);
he_dev            672 drivers/atm/he.c 		he_writel_rcm(he_dev, 0x0, CONFIG_RCMABR + reg);
he_dev            682 drivers/atm/he.c 	rate = he_dev->atm_dev->link_rate;
he_dev            737 drivers/atm/he.c 		buf = rate_cps * he_dev->tx_numbuffs /
he_dev            738 drivers/atm/he.c 				(he_dev->atm_dev->link_rate * 2);
he_dev            741 drivers/atm/he.c 		mult = he_dev->atm_dev->link_rate / ATM_OC3_PCR;
he_dev            760 drivers/atm/he.c 			he_writel_rcm(he_dev, reg,
he_dev            770 drivers/atm/he.c static int he_init_group(struct he_dev *he_dev, int group)
he_dev            776 drivers/atm/he.c 	he_writel(he_dev, 0x0, G0_RBPS_S + (group * 32));
he_dev            777 drivers/atm/he.c 	he_writel(he_dev, 0x0, G0_RBPS_T + (group * 32));
he_dev            778 drivers/atm/he.c 	he_writel(he_dev, 0x0, G0_RBPS_QI + (group * 32));
he_dev            779 drivers/atm/he.c 	he_writel(he_dev, RBP_THRESH(0x1) | RBP_QSIZE(0x0),
he_dev            783 drivers/atm/he.c 	he_dev->rbpl_table = kmalloc_array(BITS_TO_LONGS(RBPL_TABLE_SIZE),
he_dev            784 drivers/atm/he.c 					   sizeof(*he_dev->rbpl_table),
he_dev            786 drivers/atm/he.c 	if (!he_dev->rbpl_table) {
he_dev            790 drivers/atm/he.c 	bitmap_zero(he_dev->rbpl_table, RBPL_TABLE_SIZE);
he_dev            793 drivers/atm/he.c 	he_dev->rbpl_virt = kmalloc_array(RBPL_TABLE_SIZE,
he_dev            794 drivers/atm/he.c 					  sizeof(*he_dev->rbpl_virt),
he_dev            796 drivers/atm/he.c 	if (!he_dev->rbpl_virt) {
he_dev            802 drivers/atm/he.c 	he_dev->rbpl_pool = dma_pool_create("rbpl", &he_dev->pci_dev->dev,
he_dev            804 drivers/atm/he.c 	if (he_dev->rbpl_pool == NULL) {
he_dev            809 drivers/atm/he.c 	he_dev->rbpl_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
he_dev            811 drivers/atm/he.c 					       &he_dev->rbpl_phys, GFP_KERNEL);
he_dev            812 drivers/atm/he.c 	if (he_dev->rbpl_base == NULL) {
he_dev            817 drivers/atm/he.c 	INIT_LIST_HEAD(&he_dev->rbpl_outstanding);
he_dev            821 drivers/atm/he.c 		heb = dma_pool_alloc(he_dev->rbpl_pool, GFP_KERNEL, &mapping);
he_dev            825 drivers/atm/he.c 		list_add(&heb->entry, &he_dev->rbpl_outstanding);
he_dev            827 drivers/atm/he.c 		set_bit(i, he_dev->rbpl_table);
he_dev            828 drivers/atm/he.c 		he_dev->rbpl_virt[i] = heb;
he_dev            829 drivers/atm/he.c 		he_dev->rbpl_hint = i + 1;
he_dev            830 drivers/atm/he.c 		he_dev->rbpl_base[i].idx =  i << RBP_IDX_OFFSET;
he_dev            831 drivers/atm/he.c 		he_dev->rbpl_base[i].phys = mapping + offsetof(struct he_buff, data);
he_dev            833 drivers/atm/he.c 	he_dev->rbpl_tail = &he_dev->rbpl_base[CONFIG_RBPL_SIZE - 1];
he_dev            835 drivers/atm/he.c 	he_writel(he_dev, he_dev->rbpl_phys, G0_RBPL_S + (group * 32));
he_dev            836 drivers/atm/he.c 	he_writel(he_dev, RBPL_MASK(he_dev->rbpl_tail),
he_dev            838 drivers/atm/he.c 	he_writel(he_dev, (CONFIG_RBPL_BUFSIZE - sizeof(struct he_buff))/4,
he_dev            840 drivers/atm/he.c 	he_writel(he_dev,
he_dev            848 drivers/atm/he.c 	he_dev->rbrq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
he_dev            850 drivers/atm/he.c 					       &he_dev->rbrq_phys, GFP_KERNEL);
he_dev            851 drivers/atm/he.c 	if (he_dev->rbrq_base == NULL) {
he_dev            856 drivers/atm/he.c 	he_dev->rbrq_head = he_dev->rbrq_base;
he_dev            857 drivers/atm/he.c 	he_writel(he_dev, he_dev->rbrq_phys, G0_RBRQ_ST + (group * 16));
he_dev            858 drivers/atm/he.c 	he_writel(he_dev, 0, G0_RBRQ_H + (group * 16));
he_dev            859 drivers/atm/he.c 	he_writel(he_dev,
he_dev            864 drivers/atm/he.c 		he_writel(he_dev, RBRQ_TIME(768) | RBRQ_COUNT(7),
he_dev            867 drivers/atm/he.c 		he_writel(he_dev, RBRQ_TIME(0) | RBRQ_COUNT(1),
he_dev            872 drivers/atm/he.c 	he_dev->tbrq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
he_dev            874 drivers/atm/he.c 					       &he_dev->tbrq_phys, GFP_KERNEL);
he_dev            875 drivers/atm/he.c 	if (he_dev->tbrq_base == NULL) {
he_dev            880 drivers/atm/he.c 	he_dev->tbrq_head = he_dev->tbrq_base;
he_dev            882 drivers/atm/he.c 	he_writel(he_dev, he_dev->tbrq_phys, G0_TBRQ_B_T + (group * 16));
he_dev            883 drivers/atm/he.c 	he_writel(he_dev, 0, G0_TBRQ_H + (group * 16));
he_dev            884 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TBRQ_SIZE - 1, G0_TBRQ_S + (group * 16));
he_dev            885 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TBRQ_THRESH, G0_TBRQ_THRESH + (group * 16));
he_dev            890 drivers/atm/he.c 	dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_RBRQ_SIZE *
he_dev            891 drivers/atm/he.c 			  sizeof(struct he_rbrq), he_dev->rbrq_base,
he_dev            892 drivers/atm/he.c 			  he_dev->rbrq_phys);
he_dev            894 drivers/atm/he.c 	list_for_each_entry_safe(heb, next, &he_dev->rbpl_outstanding, entry)
he_dev            895 drivers/atm/he.c 		dma_pool_free(he_dev->rbpl_pool, heb, heb->mapping);
he_dev            897 drivers/atm/he.c 	dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_RBPL_SIZE *
he_dev            898 drivers/atm/he.c 			  sizeof(struct he_rbp), he_dev->rbpl_base,
he_dev            899 drivers/atm/he.c 			  he_dev->rbpl_phys);
he_dev            901 drivers/atm/he.c 	dma_pool_destroy(he_dev->rbpl_pool);
he_dev            903 drivers/atm/he.c 	kfree(he_dev->rbpl_virt);
he_dev            905 drivers/atm/he.c 	kfree(he_dev->rbpl_table);
he_dev            910 drivers/atm/he.c static int he_init_irq(struct he_dev *he_dev)
he_dev            917 drivers/atm/he.c 	he_dev->irq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
he_dev            919 drivers/atm/he.c 					      &he_dev->irq_phys, GFP_KERNEL);
he_dev            920 drivers/atm/he.c 	if (he_dev->irq_base == NULL) {
he_dev            924 drivers/atm/he.c 	he_dev->irq_tailoffset = (unsigned *)
he_dev            925 drivers/atm/he.c 					&he_dev->irq_base[CONFIG_IRQ_SIZE];
he_dev            926 drivers/atm/he.c 	*he_dev->irq_tailoffset = 0;
he_dev            927 drivers/atm/he.c 	he_dev->irq_head = he_dev->irq_base;
he_dev            928 drivers/atm/he.c 	he_dev->irq_tail = he_dev->irq_base;
he_dev            931 drivers/atm/he.c 		he_dev->irq_base[i].isw = ITYPE_INVALID;
he_dev            933 drivers/atm/he.c 	he_writel(he_dev, he_dev->irq_phys, IRQ0_BASE);
he_dev            934 drivers/atm/he.c 	he_writel(he_dev,
he_dev            937 drivers/atm/he.c 	he_writel(he_dev, IRQ_INT_A | IRQ_TYPE_LINE, IRQ0_CNTL);
he_dev            938 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ0_DATA);
he_dev            940 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ1_BASE);
he_dev            941 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ1_HEAD);
he_dev            942 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ1_CNTL);
he_dev            943 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ1_DATA);
he_dev            945 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ2_BASE);
he_dev            946 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ2_HEAD);
he_dev            947 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ2_CNTL);
he_dev            948 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ2_DATA);
he_dev            950 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ3_BASE);
he_dev            951 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ3_HEAD);
he_dev            952 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ3_CNTL);
he_dev            953 drivers/atm/he.c 	he_writel(he_dev, 0x0, IRQ3_DATA);
he_dev            957 drivers/atm/he.c 	he_writel(he_dev, 0x0, GRP_10_MAP);
he_dev            958 drivers/atm/he.c 	he_writel(he_dev, 0x0, GRP_32_MAP);
he_dev            959 drivers/atm/he.c 	he_writel(he_dev, 0x0, GRP_54_MAP);
he_dev            960 drivers/atm/he.c 	he_writel(he_dev, 0x0, GRP_76_MAP);
he_dev            962 drivers/atm/he.c 	if (request_irq(he_dev->pci_dev->irq,
he_dev            963 drivers/atm/he.c 			he_irq_handler, IRQF_SHARED, DEV_LABEL, he_dev)) {
he_dev            964 drivers/atm/he.c 		hprintk("irq %d already in use\n", he_dev->pci_dev->irq);
he_dev            968 drivers/atm/he.c 	he_dev->irq = he_dev->pci_dev->irq;
he_dev            975 drivers/atm/he.c 	struct he_dev *he_dev;
he_dev            987 drivers/atm/he.c 	he_dev = HE_DEV(dev);
he_dev            988 drivers/atm/he.c 	pci_dev = he_dev->pci_dev;
he_dev           1051 drivers/atm/he.c 	if (!(he_dev->membase = ioremap(membase, HE_REGMAP_SIZE))) {
he_dev           1057 drivers/atm/he.c 	he_writel(he_dev, 0x0, RESET_CNTL);
he_dev           1058 drivers/atm/he.c 	he_writel(he_dev, 0xff, RESET_CNTL);
he_dev           1061 drivers/atm/he.c 	status = he_readl(he_dev, RESET_CNTL);
he_dev           1068 drivers/atm/he.c 	host_cntl = he_readl(he_dev, HOST_CNTL);
he_dev           1086 drivers/atm/he.c 		he_dev->prod_id[i] = read_prom_byte(he_dev, PROD_ID + i);
he_dev           1088 drivers/atm/he.c 	he_dev->media = read_prom_byte(he_dev, MEDIA);
he_dev           1091 drivers/atm/he.c 		dev->esi[i] = read_prom_byte(he_dev, MAC_ADDR + i);
he_dev           1093 drivers/atm/he.c 	hprintk("%s%s, %pM\n", he_dev->prod_id,
he_dev           1094 drivers/atm/he.c 		he_dev->media & 0x40 ? "SM" : "MM", dev->esi);
he_dev           1095 drivers/atm/he.c 	he_dev->atm_dev->link_rate = he_is622(he_dev) ?
he_dev           1099 drivers/atm/he.c 	lb_swap = he_readl(he_dev, LB_SWAP);
he_dev           1100 drivers/atm/he.c 	if (he_is622(he_dev))
he_dev           1110 drivers/atm/he.c 	he_writel(he_dev, lb_swap, LB_SWAP);
he_dev           1113 drivers/atm/he.c 	he_writel(he_dev, he_is622(he_dev) ? LB_64_ENB : 0x0, SDRAM_CTL);
he_dev           1117 drivers/atm/he.c 	he_writel(he_dev, lb_swap, LB_SWAP);
he_dev           1120 drivers/atm/he.c 	if ((err = he_init_irq(he_dev)) != 0)
he_dev           1126 drivers/atm/he.c 	he_writel(he_dev, host_cntl, HOST_CNTL);
he_dev           1166 drivers/atm/he.c 	he_dev->vcibits = CONFIG_DEFAULT_VCIBITS;
he_dev           1167 drivers/atm/he.c 	he_dev->vpibits = CONFIG_DEFAULT_VPIBITS;
he_dev           1175 drivers/atm/he.c 		he_dev->vpibits = nvpibits;
he_dev           1176 drivers/atm/he.c 		he_dev->vcibits = HE_MAXCIDBITS - nvpibits;
he_dev           1180 drivers/atm/he.c 		he_dev->vcibits = nvcibits;
he_dev           1181 drivers/atm/he.c 		he_dev->vpibits = HE_MAXCIDBITS - nvcibits;
he_dev           1185 drivers/atm/he.c 	if (he_is622(he_dev)) {
he_dev           1186 drivers/atm/he.c 		he_dev->cells_per_row = 40;
he_dev           1187 drivers/atm/he.c 		he_dev->bytes_per_row = 2048;
he_dev           1188 drivers/atm/he.c 		he_dev->r0_numrows = 256;
he_dev           1189 drivers/atm/he.c 		he_dev->tx_numrows = 512;
he_dev           1190 drivers/atm/he.c 		he_dev->r1_numrows = 256;
he_dev           1191 drivers/atm/he.c 		he_dev->r0_startrow = 0;
he_dev           1192 drivers/atm/he.c 		he_dev->tx_startrow = 256;
he_dev           1193 drivers/atm/he.c 		he_dev->r1_startrow = 768;
he_dev           1195 drivers/atm/he.c 		he_dev->cells_per_row = 20;
he_dev           1196 drivers/atm/he.c 		he_dev->bytes_per_row = 1024;
he_dev           1197 drivers/atm/he.c 		he_dev->r0_numrows = 512;
he_dev           1198 drivers/atm/he.c 		he_dev->tx_numrows = 1018;
he_dev           1199 drivers/atm/he.c 		he_dev->r1_numrows = 512;
he_dev           1200 drivers/atm/he.c 		he_dev->r0_startrow = 6;
he_dev           1201 drivers/atm/he.c 		he_dev->tx_startrow = 518;
he_dev           1202 drivers/atm/he.c 		he_dev->r1_startrow = 1536;
he_dev           1205 drivers/atm/he.c 	he_dev->cells_per_lbuf = 4;
he_dev           1206 drivers/atm/he.c 	he_dev->buffer_limit = 4;
he_dev           1207 drivers/atm/he.c 	he_dev->r0_numbuffs = he_dev->r0_numrows *
he_dev           1208 drivers/atm/he.c 				he_dev->cells_per_row / he_dev->cells_per_lbuf;
he_dev           1209 drivers/atm/he.c 	if (he_dev->r0_numbuffs > 2560)
he_dev           1210 drivers/atm/he.c 		he_dev->r0_numbuffs = 2560;
he_dev           1212 drivers/atm/he.c 	he_dev->r1_numbuffs = he_dev->r1_numrows *
he_dev           1213 drivers/atm/he.c 				he_dev->cells_per_row / he_dev->cells_per_lbuf;
he_dev           1214 drivers/atm/he.c 	if (he_dev->r1_numbuffs > 2560)
he_dev           1215 drivers/atm/he.c 		he_dev->r1_numbuffs = 2560;
he_dev           1217 drivers/atm/he.c 	he_dev->tx_numbuffs = he_dev->tx_numrows *
he_dev           1218 drivers/atm/he.c 				he_dev->cells_per_row / he_dev->cells_per_lbuf;
he_dev           1219 drivers/atm/he.c 	if (he_dev->tx_numbuffs > 5120)
he_dev           1220 drivers/atm/he.c 		he_dev->tx_numbuffs = 5120;
he_dev           1224 drivers/atm/he.c 	he_writel(he_dev, 
he_dev           1227 drivers/atm/he.c 		(he_is622(he_dev) ? BUS_MULTI(0x28) : BUS_MULTI(0x46)) |
he_dev           1228 drivers/atm/he.c 		(he_is622(he_dev) ? NET_PREF(0x50) : NET_PREF(0x8c)),
he_dev           1231 drivers/atm/he.c 	he_writel(he_dev, BANK_ON |
he_dev           1232 drivers/atm/he.c 		(he_is622(he_dev) ? (REF_RATE(0x384) | WIDE_DATA) : REF_RATE(0x150)),
he_dev           1235 drivers/atm/he.c 	he_writel(he_dev,
he_dev           1236 drivers/atm/he.c 		(he_is622(he_dev) ? RM_BANK_WAIT(1) : RM_BANK_WAIT(0)) |
he_dev           1238 drivers/atm/he.c 	he_writel(he_dev,
he_dev           1239 drivers/atm/he.c 		(he_is622(he_dev) ? TM_BANK_WAIT(2) : TM_BANK_WAIT(1)) |
he_dev           1242 drivers/atm/he.c 	he_writel(he_dev, he_dev->cells_per_lbuf * ATM_CELL_PAYLOAD, LB_CONFIG);
he_dev           1244 drivers/atm/he.c 	he_writel(he_dev, 
he_dev           1245 drivers/atm/he.c 		(he_is622(he_dev) ? UT_RD_DELAY(8) : UT_RD_DELAY(0)) |
he_dev           1246 drivers/atm/he.c 		(he_is622(he_dev) ? RC_UT_MODE(0) : RC_UT_MODE(1)) |
he_dev           1247 drivers/atm/he.c 		RX_VALVP(he_dev->vpibits) |
he_dev           1248 drivers/atm/he.c 		RX_VALVC(he_dev->vcibits),			 RC_CONFIG);
he_dev           1250 drivers/atm/he.c 	he_writel(he_dev, DRF_THRESH(0x20) |
he_dev           1251 drivers/atm/he.c 		(he_is622(he_dev) ? TX_UT_MODE(0) : TX_UT_MODE(1)) |
he_dev           1252 drivers/atm/he.c 		TX_VCI_MASK(he_dev->vcibits) |
he_dev           1253 drivers/atm/he.c 		LBFREE_CNT(he_dev->tx_numbuffs), 		TX_CONFIG);
he_dev           1255 drivers/atm/he.c 	he_writel(he_dev, 0x0, TXAAL5_PROTO);
he_dev           1257 drivers/atm/he.c 	he_writel(he_dev, PHY_INT_ENB |
he_dev           1258 drivers/atm/he.c 		(he_is622(he_dev) ? PTMR_PRE(67 - 1) : PTMR_PRE(50 - 1)),
he_dev           1264 drivers/atm/he.c 		he_writel_tcm(he_dev, 0, i);
he_dev           1267 drivers/atm/he.c 		he_writel_rcm(he_dev, 0, i);
he_dev           1300 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TSRB, TSRB_BA);
he_dev           1301 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TSRC, TSRC_BA);
he_dev           1302 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TSRD, TSRD_BA);
he_dev           1303 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TMABR, TMABR_BA);
he_dev           1304 drivers/atm/he.c 	he_writel(he_dev, CONFIG_TPDBA, TPD_BA);
he_dev           1334 drivers/atm/he.c 	he_writel(he_dev, 0x08000, RCMLBM_BA);
he_dev           1335 drivers/atm/he.c 	he_writel(he_dev, 0x0e000, RCMRSRB_BA);
he_dev           1336 drivers/atm/he.c 	he_writel(he_dev, 0x0d800, RCMABR_BA);
he_dev           1340 drivers/atm/he.c 	he_init_rx_lbfp0(he_dev);
he_dev           1341 drivers/atm/he.c 	he_init_rx_lbfp1(he_dev);
he_dev           1343 drivers/atm/he.c 	he_writel(he_dev, 0x0, RLBC_H);
he_dev           1344 drivers/atm/he.c 	he_writel(he_dev, 0x0, RLBC_T);
he_dev           1345 drivers/atm/he.c 	he_writel(he_dev, 0x0, RLBC_H2);
he_dev           1347 drivers/atm/he.c 	he_writel(he_dev, 512, RXTHRSH);	/* 10% of r0+r1 buffers */
he_dev           1348 drivers/atm/he.c 	he_writel(he_dev, 256, LITHRSH); 	/* 5% of r0+r1 buffers */
he_dev           1350 drivers/atm/he.c 	he_init_tx_lbfp(he_dev);
he_dev           1352 drivers/atm/he.c 	he_writel(he_dev, he_is622(he_dev) ? 0x104780 : 0x800, UBUFF_BA);
he_dev           1356 drivers/atm/he.c 	if (he_is622(he_dev)) {
he_dev           1357 drivers/atm/he.c 		he_writel(he_dev, 0x000f, G0_INMQ_S);
he_dev           1358 drivers/atm/he.c 		he_writel(he_dev, 0x200f, G0_INMQ_L);
he_dev           1360 drivers/atm/he.c 		he_writel(he_dev, 0x001f, G1_INMQ_S);
he_dev           1361 drivers/atm/he.c 		he_writel(he_dev, 0x201f, G1_INMQ_L);
he_dev           1363 drivers/atm/he.c 		he_writel(he_dev, 0x002f, G2_INMQ_S);
he_dev           1364 drivers/atm/he.c 		he_writel(he_dev, 0x202f, G2_INMQ_L);
he_dev           1366 drivers/atm/he.c 		he_writel(he_dev, 0x003f, G3_INMQ_S);
he_dev           1367 drivers/atm/he.c 		he_writel(he_dev, 0x203f, G3_INMQ_L);
he_dev           1369 drivers/atm/he.c 		he_writel(he_dev, 0x004f, G4_INMQ_S);
he_dev           1370 drivers/atm/he.c 		he_writel(he_dev, 0x204f, G4_INMQ_L);
he_dev           1372 drivers/atm/he.c 		he_writel(he_dev, 0x005f, G5_INMQ_S);
he_dev           1373 drivers/atm/he.c 		he_writel(he_dev, 0x205f, G5_INMQ_L);
he_dev           1375 drivers/atm/he.c 		he_writel(he_dev, 0x006f, G6_INMQ_S);
he_dev           1376 drivers/atm/he.c 		he_writel(he_dev, 0x206f, G6_INMQ_L);
he_dev           1378 drivers/atm/he.c 		he_writel(he_dev, 0x007f, G7_INMQ_S);
he_dev           1379 drivers/atm/he.c 		he_writel(he_dev, 0x207f, G7_INMQ_L);
he_dev           1381 drivers/atm/he.c 		he_writel(he_dev, 0x0000, G0_INMQ_S);
he_dev           1382 drivers/atm/he.c 		he_writel(he_dev, 0x0008, G0_INMQ_L);
he_dev           1384 drivers/atm/he.c 		he_writel(he_dev, 0x0001, G1_INMQ_S);
he_dev           1385 drivers/atm/he.c 		he_writel(he_dev, 0x0009, G1_INMQ_L);
he_dev           1387 drivers/atm/he.c 		he_writel(he_dev, 0x0002, G2_INMQ_S);
he_dev           1388 drivers/atm/he.c 		he_writel(he_dev, 0x000a, G2_INMQ_L);
he_dev           1390 drivers/atm/he.c 		he_writel(he_dev, 0x0003, G3_INMQ_S);
he_dev           1391 drivers/atm/he.c 		he_writel(he_dev, 0x000b, G3_INMQ_L);
he_dev           1393 drivers/atm/he.c 		he_writel(he_dev, 0x0004, G4_INMQ_S);
he_dev           1394 drivers/atm/he.c 		he_writel(he_dev, 0x000c, G4_INMQ_L);
he_dev           1396 drivers/atm/he.c 		he_writel(he_dev, 0x0005, G5_INMQ_S);
he_dev           1397 drivers/atm/he.c 		he_writel(he_dev, 0x000d, G5_INMQ_L);
he_dev           1399 drivers/atm/he.c 		he_writel(he_dev, 0x0006, G6_INMQ_S);
he_dev           1400 drivers/atm/he.c 		he_writel(he_dev, 0x000e, G6_INMQ_L);
he_dev           1402 drivers/atm/he.c 		he_writel(he_dev, 0x0007, G7_INMQ_S);
he_dev           1403 drivers/atm/he.c 		he_writel(he_dev, 0x000f, G7_INMQ_L);
he_dev           1408 drivers/atm/he.c 	he_writel(he_dev, 0x0, MCC);
he_dev           1409 drivers/atm/he.c 	he_writel(he_dev, 0x0, OEC);
he_dev           1410 drivers/atm/he.c 	he_writel(he_dev, 0x0, DCC);
he_dev           1411 drivers/atm/he.c 	he_writel(he_dev, 0x0, CEC);
he_dev           1415 drivers/atm/he.c 	he_init_cs_block(he_dev);
he_dev           1419 drivers/atm/he.c 	if (he_init_cs_block_rcm(he_dev) < 0)
he_dev           1424 drivers/atm/he.c 	he_init_tpdrq(he_dev);
he_dev           1426 drivers/atm/he.c 	he_dev->tpd_pool = dma_pool_create("tpd", &he_dev->pci_dev->dev,
he_dev           1428 drivers/atm/he.c 	if (he_dev->tpd_pool == NULL) {
he_dev           1433 drivers/atm/he.c 	INIT_LIST_HEAD(&he_dev->outstanding_tpds);
he_dev           1435 drivers/atm/he.c 	if (he_init_group(he_dev, 0) != 0)
he_dev           1439 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBPS_S + (group * 32));
he_dev           1440 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBPS_T + (group * 32));
he_dev           1441 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBPS_QI + (group * 32));
he_dev           1442 drivers/atm/he.c 		he_writel(he_dev, RBP_THRESH(0x1) | RBP_QSIZE(0x0),
he_dev           1445 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBPL_S + (group * 32));
he_dev           1446 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBPL_T + (group * 32));
he_dev           1447 drivers/atm/he.c 		he_writel(he_dev, RBP_THRESH(0x1) | RBP_QSIZE(0x0),
he_dev           1449 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBPL_BS + (group * 32));
he_dev           1451 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBRQ_ST + (group * 16));
he_dev           1452 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBRQ_H + (group * 16));
he_dev           1453 drivers/atm/he.c 		he_writel(he_dev, RBRQ_THRESH(0x1) | RBRQ_SIZE(0x0),
he_dev           1455 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_RBRQ_I + (group * 16));
he_dev           1457 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_TBRQ_B_T + (group * 16));
he_dev           1458 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_TBRQ_H + (group * 16));
he_dev           1459 drivers/atm/he.c 		he_writel(he_dev, TBRQ_THRESH(0x1),
he_dev           1461 drivers/atm/he.c 		he_writel(he_dev, 0x0, G0_TBRQ_S + (group * 16));
he_dev           1466 drivers/atm/he.c 	he_dev->hsp = dma_alloc_coherent(&he_dev->pci_dev->dev,
he_dev           1468 drivers/atm/he.c 					 &he_dev->hsp_phys, GFP_KERNEL);
he_dev           1469 drivers/atm/he.c 	if (he_dev->hsp == NULL) {
he_dev           1473 drivers/atm/he.c 	he_writel(he_dev, he_dev->hsp_phys, HSP_BA);
he_dev           1478 drivers/atm/he.c 	if (he_isMM(he_dev))
he_dev           1479 drivers/atm/he.c 		suni_init(he_dev->atm_dev);
he_dev           1480 drivers/atm/he.c 	if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->start)
he_dev           1481 drivers/atm/he.c 		he_dev->atm_dev->phy->start(he_dev->atm_dev);
he_dev           1488 drivers/atm/he.c 		val = he_phy_get(he_dev->atm_dev, SUNI_TPOP_APM);
he_dev           1490 drivers/atm/he.c 		he_phy_put(he_dev->atm_dev, val, SUNI_TPOP_APM);
he_dev           1491 drivers/atm/he.c 		he_phy_put(he_dev->atm_dev, SUNI_TACP_IUCHP_CLP, SUNI_TACP_IUCHP);
he_dev           1496 drivers/atm/he.c 	reg = he_readl_mbox(he_dev, CS_ERCTL0);
he_dev           1498 drivers/atm/he.c 	he_writel_mbox(he_dev, reg, CS_ERCTL0);
he_dev           1500 drivers/atm/he.c 	reg = he_readl(he_dev, RC_CONFIG);
he_dev           1502 drivers/atm/he.c 	he_writel(he_dev, reg, RC_CONFIG);
he_dev           1505 drivers/atm/he.c 		he_dev->cs_stper[i].inuse = 0;
he_dev           1506 drivers/atm/he.c 		he_dev->cs_stper[i].pcr = -1;
he_dev           1508 drivers/atm/he.c 	he_dev->total_bw = 0;
he_dev           1513 drivers/atm/he.c 	he_dev->atm_dev->ci_range.vpi_bits = he_dev->vpibits;
he_dev           1514 drivers/atm/he.c 	he_dev->atm_dev->ci_range.vci_bits = he_dev->vcibits;
he_dev           1516 drivers/atm/he.c 	he_dev->irq_peak = 0;
he_dev           1517 drivers/atm/he.c 	he_dev->rbrq_peak = 0;
he_dev           1518 drivers/atm/he.c 	he_dev->rbpl_peak = 0;
he_dev           1519 drivers/atm/he.c 	he_dev->tbrq_peak = 0;
he_dev           1527 drivers/atm/he.c he_stop(struct he_dev *he_dev)
he_dev           1534 drivers/atm/he.c 	pci_dev = he_dev->pci_dev;
he_dev           1538 drivers/atm/he.c 	if (he_dev->membase) {
he_dev           1543 drivers/atm/he.c 		tasklet_disable(&he_dev->tasklet);
he_dev           1547 drivers/atm/he.c 		reg = he_readl_mbox(he_dev, CS_ERCTL0);
he_dev           1549 drivers/atm/he.c 		he_writel_mbox(he_dev, reg, CS_ERCTL0);
he_dev           1551 drivers/atm/he.c 		reg = he_readl(he_dev, RC_CONFIG);
he_dev           1553 drivers/atm/he.c 		he_writel(he_dev, reg, RC_CONFIG);
he_dev           1557 drivers/atm/he.c 	if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->stop)
he_dev           1558 drivers/atm/he.c 		he_dev->atm_dev->phy->stop(he_dev->atm_dev);
he_dev           1561 drivers/atm/he.c 	if (he_dev->irq)
he_dev           1562 drivers/atm/he.c 		free_irq(he_dev->irq, he_dev);
he_dev           1564 drivers/atm/he.c 	if (he_dev->irq_base)
he_dev           1565 drivers/atm/he.c 		dma_free_coherent(&he_dev->pci_dev->dev, (CONFIG_IRQ_SIZE + 1)
he_dev           1566 drivers/atm/he.c 				  * sizeof(struct he_irq), he_dev->irq_base, he_dev->irq_phys);
he_dev           1568 drivers/atm/he.c 	if (he_dev->hsp)
he_dev           1569 drivers/atm/he.c 		dma_free_coherent(&he_dev->pci_dev->dev, sizeof(struct he_hsp),
he_dev           1570 drivers/atm/he.c 				  he_dev->hsp, he_dev->hsp_phys);
he_dev           1572 drivers/atm/he.c 	if (he_dev->rbpl_base) {
he_dev           1573 drivers/atm/he.c 		list_for_each_entry_safe(heb, next, &he_dev->rbpl_outstanding, entry)
he_dev           1574 drivers/atm/he.c 			dma_pool_free(he_dev->rbpl_pool, heb, heb->mapping);
he_dev           1576 drivers/atm/he.c 		dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_RBPL_SIZE
he_dev           1577 drivers/atm/he.c 				  * sizeof(struct he_rbp), he_dev->rbpl_base, he_dev->rbpl_phys);
he_dev           1580 drivers/atm/he.c 	kfree(he_dev->rbpl_virt);
he_dev           1581 drivers/atm/he.c 	kfree(he_dev->rbpl_table);
he_dev           1582 drivers/atm/he.c 	dma_pool_destroy(he_dev->rbpl_pool);
he_dev           1584 drivers/atm/he.c 	if (he_dev->rbrq_base)
he_dev           1585 drivers/atm/he.c 		dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_RBRQ_SIZE * sizeof(struct he_rbrq),
he_dev           1586 drivers/atm/he.c 				  he_dev->rbrq_base, he_dev->rbrq_phys);
he_dev           1588 drivers/atm/he.c 	if (he_dev->tbrq_base)
he_dev           1589 drivers/atm/he.c 		dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq),
he_dev           1590 drivers/atm/he.c 				  he_dev->tbrq_base, he_dev->tbrq_phys);
he_dev           1592 drivers/atm/he.c 	if (he_dev->tpdrq_base)
he_dev           1593 drivers/atm/he.c 		dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq),
he_dev           1594 drivers/atm/he.c 				  he_dev->tpdrq_base, he_dev->tpdrq_phys);
he_dev           1596 drivers/atm/he.c 	dma_pool_destroy(he_dev->tpd_pool);
he_dev           1598 drivers/atm/he.c 	if (he_dev->pci_dev) {
he_dev           1599 drivers/atm/he.c 		pci_read_config_word(he_dev->pci_dev, PCI_COMMAND, &command);
he_dev           1601 drivers/atm/he.c 		pci_write_config_word(he_dev->pci_dev, PCI_COMMAND, command);
he_dev           1604 drivers/atm/he.c 	if (he_dev->membase)
he_dev           1605 drivers/atm/he.c 		iounmap(he_dev->membase);
he_dev           1609 drivers/atm/he.c __alloc_tpd(struct he_dev *he_dev)
he_dev           1614 drivers/atm/he.c 	tpd = dma_pool_alloc(he_dev->tpd_pool, GFP_ATOMIC, &mapping);
he_dev           1642 drivers/atm/he.c he_service_rbrq(struct he_dev *he_dev, int group)
he_dev           1645 drivers/atm/he.c 				((unsigned long)he_dev->rbrq_base |
he_dev           1646 drivers/atm/he.c 					he_dev->hsp->group[group].rbrq_tail);
he_dev           1657 drivers/atm/he.c 	while (he_dev->rbrq_head != rbrq_tail) {
he_dev           1661 drivers/atm/he.c 			he_dev->rbrq_head, group,
he_dev           1662 drivers/atm/he.c 			RBRQ_ADDR(he_dev->rbrq_head),
he_dev           1663 drivers/atm/he.c 			RBRQ_BUFLEN(he_dev->rbrq_head),
he_dev           1664 drivers/atm/he.c 			RBRQ_CID(he_dev->rbrq_head),
he_dev           1665 drivers/atm/he.c 			RBRQ_CRC_ERR(he_dev->rbrq_head) ? " CRC_ERR" : "",
he_dev           1666 drivers/atm/he.c 			RBRQ_LEN_ERR(he_dev->rbrq_head) ? " LEN_ERR" : "",
he_dev           1667 drivers/atm/he.c 			RBRQ_END_PDU(he_dev->rbrq_head) ? " END_PDU" : "",
he_dev           1668 drivers/atm/he.c 			RBRQ_AAL5_PROT(he_dev->rbrq_head) ? " AAL5_PROT" : "",
he_dev           1669 drivers/atm/he.c 			RBRQ_CON_CLOSED(he_dev->rbrq_head) ? " CON_CLOSED" : "",
he_dev           1670 drivers/atm/he.c 			RBRQ_HBUF_ERR(he_dev->rbrq_head) ? " HBUF_ERR" : "");
he_dev           1672 drivers/atm/he.c 		i = RBRQ_ADDR(he_dev->rbrq_head) >> RBP_IDX_OFFSET;
he_dev           1673 drivers/atm/he.c 		heb = he_dev->rbpl_virt[i];
he_dev           1675 drivers/atm/he.c 		cid = RBRQ_CID(he_dev->rbrq_head);
he_dev           1677 drivers/atm/he.c 			vcc = __find_vcc(he_dev, cid);
he_dev           1682 drivers/atm/he.c 			if (!RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
he_dev           1683 drivers/atm/he.c 				clear_bit(i, he_dev->rbpl_table);
he_dev           1685 drivers/atm/he.c 				dma_pool_free(he_dev->rbpl_pool, heb, heb->mapping);
he_dev           1691 drivers/atm/he.c 		if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
he_dev           1697 drivers/atm/he.c 		heb->len = RBRQ_BUFLEN(he_dev->rbrq_head) * 4;
he_dev           1698 drivers/atm/he.c 		clear_bit(i, he_dev->rbpl_table);
he_dev           1702 drivers/atm/he.c 		if (RBRQ_CON_CLOSED(he_dev->rbrq_head)) {
he_dev           1709 drivers/atm/he.c 		if (!RBRQ_END_PDU(he_dev->rbrq_head))
he_dev           1712 drivers/atm/he.c 		if (RBRQ_LEN_ERR(he_dev->rbrq_head)
he_dev           1713 drivers/atm/he.c 				|| RBRQ_CRC_ERR(he_dev->rbrq_head)) {
he_dev           1715 drivers/atm/he.c 				RBRQ_CRC_ERR(he_dev->rbrq_head)
he_dev           1717 drivers/atm/he.c 				RBRQ_LEN_ERR(he_dev->rbrq_head)
he_dev           1768 drivers/atm/he.c 		spin_unlock(&he_dev->global_lock);
he_dev           1770 drivers/atm/he.c 		spin_lock(&he_dev->global_lock);
he_dev           1778 drivers/atm/he.c 			dma_pool_free(he_dev->rbpl_pool, heb, heb->mapping);
he_dev           1783 drivers/atm/he.c 		he_dev->rbrq_head = (struct he_rbrq *)
he_dev           1784 drivers/atm/he.c 				((unsigned long) he_dev->rbrq_base |
he_dev           1785 drivers/atm/he.c 					RBRQ_MASK(he_dev->rbrq_head + 1));
he_dev           1791 drivers/atm/he.c 		if (updated > he_dev->rbrq_peak)
he_dev           1792 drivers/atm/he.c 			he_dev->rbrq_peak = updated;
he_dev           1794 drivers/atm/he.c 		he_writel(he_dev, RBRQ_MASK(he_dev->rbrq_head),
he_dev           1802 drivers/atm/he.c he_service_tbrq(struct he_dev *he_dev, int group)
he_dev           1805 drivers/atm/he.c 				((unsigned long)he_dev->tbrq_base |
he_dev           1806 drivers/atm/he.c 					he_dev->hsp->group[group].tbrq_tail);
he_dev           1813 drivers/atm/he.c 	while (he_dev->tbrq_head != tbrq_tail) {
he_dev           1818 drivers/atm/he.c 			TBRQ_TPD(he_dev->tbrq_head), 
he_dev           1819 drivers/atm/he.c 			TBRQ_EOS(he_dev->tbrq_head) ? " EOS" : "",
he_dev           1820 drivers/atm/he.c 			TBRQ_MULTIPLE(he_dev->tbrq_head) ? " MULTIPLE" : "");
he_dev           1822 drivers/atm/he.c 		list_for_each_entry(__tpd, &he_dev->outstanding_tpds, entry) {
he_dev           1823 drivers/atm/he.c 			if (TPD_ADDR(__tpd->status) == TBRQ_TPD(he_dev->tbrq_head)) {
he_dev           1832 drivers/atm/he.c 						TBRQ_TPD(he_dev->tbrq_head));
he_dev           1836 drivers/atm/he.c 		if (TBRQ_EOS(he_dev->tbrq_head)) {
he_dev           1838 drivers/atm/he.c 				he_mkcid(he_dev, tpd->vcc->vpi, tpd->vcc->vci));
he_dev           1847 drivers/atm/he.c 				dma_unmap_single(&he_dev->pci_dev->dev,
he_dev           1865 drivers/atm/he.c 			dma_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status));
he_dev           1866 drivers/atm/he.c 		he_dev->tbrq_head = (struct he_tbrq *)
he_dev           1867 drivers/atm/he.c 				((unsigned long) he_dev->tbrq_base |
he_dev           1868 drivers/atm/he.c 					TBRQ_MASK(he_dev->tbrq_head + 1));
he_dev           1872 drivers/atm/he.c 		if (updated > he_dev->tbrq_peak)
he_dev           1873 drivers/atm/he.c 			he_dev->tbrq_peak = updated;
he_dev           1875 drivers/atm/he.c 		he_writel(he_dev, TBRQ_MASK(he_dev->tbrq_head),
he_dev           1881 drivers/atm/he.c he_service_rbpl(struct he_dev *he_dev, int group)
he_dev           1890 drivers/atm/he.c 	rbpl_head = (struct he_rbp *) ((unsigned long)he_dev->rbpl_base |
he_dev           1891 drivers/atm/he.c 					RBPL_MASK(he_readl(he_dev, G0_RBPL_S)));
he_dev           1894 drivers/atm/he.c 		new_tail = (struct he_rbp *) ((unsigned long)he_dev->rbpl_base |
he_dev           1895 drivers/atm/he.c 						RBPL_MASK(he_dev->rbpl_tail+1));
he_dev           1901 drivers/atm/he.c 		i = find_next_zero_bit(he_dev->rbpl_table, RBPL_TABLE_SIZE, he_dev->rbpl_hint);
he_dev           1903 drivers/atm/he.c 			i = find_first_zero_bit(he_dev->rbpl_table, RBPL_TABLE_SIZE);
he_dev           1907 drivers/atm/he.c 		he_dev->rbpl_hint = i + 1;
he_dev           1909 drivers/atm/he.c 		heb = dma_pool_alloc(he_dev->rbpl_pool, GFP_ATOMIC, &mapping);
he_dev           1913 drivers/atm/he.c 		list_add(&heb->entry, &he_dev->rbpl_outstanding);
he_dev           1914 drivers/atm/he.c 		he_dev->rbpl_virt[i] = heb;
he_dev           1915 drivers/atm/he.c 		set_bit(i, he_dev->rbpl_table);
he_dev           1919 drivers/atm/he.c 		he_dev->rbpl_tail = new_tail;
he_dev           1924 drivers/atm/he.c 		he_writel(he_dev, RBPL_MASK(he_dev->rbpl_tail), G0_RBPL_T);
he_dev           1931 drivers/atm/he.c 	struct he_dev *he_dev = (struct he_dev *) data;
he_dev           1936 drivers/atm/he.c 	spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           1938 drivers/atm/he.c 	while (he_dev->irq_head != he_dev->irq_tail) {
he_dev           1941 drivers/atm/he.c 		type = ITYPE_TYPE(he_dev->irq_head->isw);
he_dev           1942 drivers/atm/he.c 		group = ITYPE_GROUP(he_dev->irq_head->isw);
he_dev           1949 drivers/atm/he.c 				if (he_service_rbrq(he_dev, group))
he_dev           1950 drivers/atm/he.c 					he_service_rbpl(he_dev, group);
he_dev           1956 drivers/atm/he.c 				he_service_tbrq(he_dev, group);
he_dev           1959 drivers/atm/he.c 				he_service_rbpl(he_dev, group);
he_dev           1967 drivers/atm/he.c 				spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           1968 drivers/atm/he.c 				if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->interrupt)
he_dev           1969 drivers/atm/he.c 					he_dev->atm_dev->phy->interrupt(he_dev->atm_dev);
he_dev           1970 drivers/atm/he.c 				spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           1979 drivers/atm/he.c 						hprintk("abort 0x%x\n", he_readl(he_dev, ABORT_ADDR));
he_dev           1986 drivers/atm/he.c 				HPRINTK("isw not updated 0x%x\n", he_dev->irq_head->isw);
he_dev           1988 drivers/atm/he.c 				he_service_rbrq(he_dev, 0);
he_dev           1989 drivers/atm/he.c 				he_service_rbpl(he_dev, 0);
he_dev           1990 drivers/atm/he.c 				he_service_tbrq(he_dev, 0);
he_dev           1993 drivers/atm/he.c 				hprintk("bad isw 0x%x?\n", he_dev->irq_head->isw);
he_dev           1996 drivers/atm/he.c 		he_dev->irq_head->isw = ITYPE_INVALID;
he_dev           1998 drivers/atm/he.c 		he_dev->irq_head = (struct he_irq *) NEXT_ENTRY(he_dev->irq_base, he_dev->irq_head, IRQ_MASK);
he_dev           2002 drivers/atm/he.c 		if (updated > he_dev->irq_peak)
he_dev           2003 drivers/atm/he.c 			he_dev->irq_peak = updated;
he_dev           2005 drivers/atm/he.c 		he_writel(he_dev,
he_dev           2008 drivers/atm/he.c 			IRQ_TAIL(he_dev->irq_tail), IRQ0_HEAD);
he_dev           2009 drivers/atm/he.c 		(void) he_readl(he_dev, INT_FIFO); /* 8.1.2 controller errata; flush posted writes */
he_dev           2011 drivers/atm/he.c 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2018 drivers/atm/he.c 	struct he_dev *he_dev = (struct he_dev * )dev_id;
he_dev           2021 drivers/atm/he.c 	if (he_dev == NULL)
he_dev           2024 drivers/atm/he.c 	spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2026 drivers/atm/he.c 	he_dev->irq_tail = (struct he_irq *) (((unsigned long)he_dev->irq_base) |
he_dev           2027 drivers/atm/he.c 						(*he_dev->irq_tailoffset << 2));
he_dev           2029 drivers/atm/he.c 	if (he_dev->irq_tail == he_dev->irq_head) {
he_dev           2031 drivers/atm/he.c 		he_dev->irq_tail = (struct he_irq *) ((unsigned long)he_dev->irq_base |
he_dev           2032 drivers/atm/he.c 			((he_readl(he_dev, IRQ0_BASE) & IRQ_MASK) << 2));
he_dev           2033 drivers/atm/he.c 		(void) he_readl(he_dev, INT_FIFO);	/* 8.1.2 controller errata */
he_dev           2037 drivers/atm/he.c 	if (he_dev->irq_head == he_dev->irq_tail /* && !IRQ_PENDING */)
he_dev           2041 drivers/atm/he.c 	if (he_dev->irq_head != he_dev->irq_tail) {
he_dev           2043 drivers/atm/he.c 		tasklet_schedule(&he_dev->tasklet);
he_dev           2044 drivers/atm/he.c 		he_writel(he_dev, INT_CLEAR_A, INT_FIFO);	/* clear interrupt */
he_dev           2045 drivers/atm/he.c 		(void) he_readl(he_dev, INT_FIFO);		/* flush posted writes */
he_dev           2047 drivers/atm/he.c 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2053 drivers/atm/he.c __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
he_dev           2058 drivers/atm/he.c 					tpd, cid, he_dev->tpdrq_tail);
he_dev           2061 drivers/atm/he.c 	new_tail = (struct he_tpdrq *) ((unsigned long) he_dev->tpdrq_base |
he_dev           2062 drivers/atm/he.c 					TPDRQ_MASK(he_dev->tpdrq_tail+1));
he_dev           2071 drivers/atm/he.c 	if (new_tail == he_dev->tpdrq_head) {
he_dev           2072 drivers/atm/he.c 		he_dev->tpdrq_head = (struct he_tpdrq *)
he_dev           2073 drivers/atm/he.c 			(((unsigned long)he_dev->tpdrq_base) |
he_dev           2074 drivers/atm/he.c 				TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H)));
he_dev           2076 drivers/atm/he.c 		if (new_tail == he_dev->tpdrq_head) {
he_dev           2088 drivers/atm/he.c 					dma_unmap_single(&he_dev->pci_dev->dev,
he_dev           2100 drivers/atm/he.c 			dma_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status));
he_dev           2106 drivers/atm/he.c 	list_add_tail(&tpd->entry, &he_dev->outstanding_tpds);
he_dev           2107 drivers/atm/he.c 	he_dev->tpdrq_tail->tpd = TPD_ADDR(tpd->status);
he_dev           2108 drivers/atm/he.c 	he_dev->tpdrq_tail->cid = cid;
he_dev           2111 drivers/atm/he.c 	he_dev->tpdrq_tail = new_tail;
he_dev           2113 drivers/atm/he.c 	he_writel(he_dev, TPDRQ_MASK(he_dev->tpdrq_tail), TPDRQ_T);
he_dev           2114 drivers/atm/he.c 	(void) he_readl(he_dev, TPDRQ_T);		/* flush posted writes */
he_dev           2121 drivers/atm/he.c 	struct he_dev *he_dev = HE_DEV(vcc->dev);
he_dev           2135 drivers/atm/he.c 	cid = he_mkcid(he_dev, vpi, vci);
he_dev           2157 drivers/atm/he.c 			pcr_goal = he_dev->atm_dev->link_rate;
he_dev           2177 drivers/atm/he.c 		spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2178 drivers/atm/he.c 		tsr0 = he_readl_tsr0(he_dev, cid);
he_dev           2179 drivers/atm/he.c 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2199 drivers/atm/he.c 				if ((he_dev->total_bw + pcr_goal)
he_dev           2200 drivers/atm/he.c 					> (he_dev->atm_dev->link_rate * 9 / 10))
he_dev           2206 drivers/atm/he.c 				spin_lock_irqsave(&he_dev->global_lock, flags);			/* also protects he_dev->cs_stper[] */
he_dev           2210 drivers/atm/he.c 					if (he_dev->cs_stper[reg].inuse == 0 || 
he_dev           2211 drivers/atm/he.c 					    he_dev->cs_stper[reg].pcr == pcr_goal)
he_dev           2216 drivers/atm/he.c 					spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2220 drivers/atm/he.c 				he_dev->total_bw += pcr_goal;
he_dev           2223 drivers/atm/he.c 				++he_dev->cs_stper[reg].inuse;
he_dev           2224 drivers/atm/he.c 				he_dev->cs_stper[reg].pcr = pcr_goal;
he_dev           2226 drivers/atm/he.c 				clock = he_is622(he_dev) ? 66667000 : 50000000;
he_dev           2232 drivers/atm/he.c 				he_writel_mbox(he_dev, rate_to_atmf(period/2),
he_dev           2234 drivers/atm/he.c 				spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2245 drivers/atm/he.c 		spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2247 drivers/atm/he.c 		he_writel_tsr0(he_dev, tsr0, cid);
he_dev           2248 drivers/atm/he.c 		he_writel_tsr4(he_dev, tsr4 | 1, cid);
he_dev           2249 drivers/atm/he.c 		he_writel_tsr1(he_dev, TSR1_MCR(rate_to_atmf(0)) |
he_dev           2251 drivers/atm/he.c 		he_writel_tsr2(he_dev, TSR2_ACR(rate_to_atmf(pcr_goal)), cid);
he_dev           2252 drivers/atm/he.c 		he_writel_tsr9(he_dev, TSR9_OPEN_CONN, cid);
he_dev           2254 drivers/atm/he.c 		he_writel_tsr3(he_dev, 0x0, cid);
he_dev           2255 drivers/atm/he.c 		he_writel_tsr5(he_dev, 0x0, cid);
he_dev           2256 drivers/atm/he.c 		he_writel_tsr6(he_dev, 0x0, cid);
he_dev           2257 drivers/atm/he.c 		he_writel_tsr7(he_dev, 0x0, cid);
he_dev           2258 drivers/atm/he.c 		he_writel_tsr8(he_dev, 0x0, cid);
he_dev           2259 drivers/atm/he.c 		he_writel_tsr10(he_dev, 0x0, cid);
he_dev           2260 drivers/atm/he.c 		he_writel_tsr11(he_dev, 0x0, cid);
he_dev           2261 drivers/atm/he.c 		he_writel_tsr12(he_dev, 0x0, cid);
he_dev           2262 drivers/atm/he.c 		he_writel_tsr13(he_dev, 0x0, cid);
he_dev           2263 drivers/atm/he.c 		he_writel_tsr14(he_dev, 0x0, cid);
he_dev           2264 drivers/atm/he.c 		(void) he_readl_tsr0(he_dev, cid);		/* flush posted writes */
he_dev           2265 drivers/atm/he.c 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2286 drivers/atm/he.c 		spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2288 drivers/atm/he.c 		rsr0 = he_readl_rsr0(he_dev, cid);
he_dev           2290 drivers/atm/he.c 			spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2307 drivers/atm/he.c 		he_writel_rsr4(he_dev, rsr4, cid);
he_dev           2308 drivers/atm/he.c 		he_writel_rsr1(he_dev, rsr1, cid);
he_dev           2311 drivers/atm/he.c 		he_writel_rsr0(he_dev,
he_dev           2313 drivers/atm/he.c 		(void) he_readl_rsr0(he_dev, cid);		/* flush posted writes */
he_dev           2315 drivers/atm/he.c 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2335 drivers/atm/he.c 	struct he_dev *he_dev = HE_DEV(vcc->dev);
he_dev           2345 drivers/atm/he.c 	cid = he_mkcid(he_dev, vcc->vpi, vcc->vci);
he_dev           2356 drivers/atm/he.c 		spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2357 drivers/atm/he.c 		while (he_readl(he_dev, RCC_STAT) & RCC_BUSY) {
he_dev           2365 drivers/atm/he.c 		he_writel_rsr0(he_dev, RSR0_CLOSE_CONN, cid);
he_dev           2366 drivers/atm/he.c 		(void) he_readl_rsr0(he_dev, cid);		/* flush posted writes */
he_dev           2367 drivers/atm/he.c 		he_writel_mbox(he_dev, cid, RXCON_CLOSE);
he_dev           2368 drivers/atm/he.c 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2411 drivers/atm/he.c 		spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2412 drivers/atm/he.c 		he_writel_tsr4_upper(he_dev, TSR4_FLUSH_CONN, cid);
he_dev           2417 drivers/atm/he.c 				he_writel_tsr1(he_dev, 
he_dev           2422 drivers/atm/he.c 				he_writel_tsr14_upper(he_dev, TSR14_DELETE, cid);
he_dev           2425 drivers/atm/he.c 		(void) he_readl_tsr4(he_dev, cid);		/* flush posted writes */
he_dev           2427 drivers/atm/he.c 		tpd = __alloc_tpd(he_dev);
he_dev           2439 drivers/atm/he.c 		__enqueue_tpd(he_dev, tpd, cid);
he_dev           2440 drivers/atm/he.c 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2447 drivers/atm/he.c 		spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2454 drivers/atm/he.c 		while (!((tsr4 = he_readl_tsr4(he_dev, cid)) & TSR4_SESSION_ENDED)) {
he_dev           2459 drivers/atm/he.c 		while (TSR0_CONN_STATE(tsr0 = he_readl_tsr0(he_dev, cid)) != 0) {
he_dev           2471 drivers/atm/he.c 			if (he_dev->cs_stper[reg].inuse == 0)
he_dev           2474 drivers/atm/he.c 				--he_dev->cs_stper[reg].inuse;
he_dev           2476 drivers/atm/he.c 			he_dev->total_bw -= he_dev->cs_stper[reg].pcr;
he_dev           2478 drivers/atm/he.c 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2492 drivers/atm/he.c 	struct he_dev *he_dev = HE_DEV(vcc->dev);
he_dev           2493 drivers/atm/he.c 	unsigned cid = he_mkcid(he_dev, vcc->vpi, vcc->vci);
he_dev           2525 drivers/atm/he.c 	spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2527 drivers/atm/he.c 	tpd = __alloc_tpd(he_dev);
he_dev           2534 drivers/atm/he.c 		spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2554 drivers/atm/he.c 	tpd->iovec[slot].addr = dma_map_single(&he_dev->pci_dev->dev, skb->data,
he_dev           2568 drivers/atm/he.c 			__enqueue_tpd(he_dev, tpd, cid);
he_dev           2569 drivers/atm/he.c 			tpd = __alloc_tpd(he_dev);
he_dev           2576 drivers/atm/he.c 				spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2583 drivers/atm/he.c 		tpd->iovec[slot].addr = skb_frag_dma_map(&he_dev->pci_dev->dev,
he_dev           2592 drivers/atm/he.c 	tpd->address0 = dma_map_single(&he_dev->pci_dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
he_dev           2602 drivers/atm/he.c 	__enqueue_tpd(he_dev, tpd, cid);
he_dev           2603 drivers/atm/he.c 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2614 drivers/atm/he.c 	struct he_dev *he_dev = HE_DEV(atm_dev);
he_dev           2627 drivers/atm/he.c 			spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2635 drivers/atm/he.c 					reg.val = he_readl(he_dev, reg.addr);
he_dev           2639 drivers/atm/he.c 						he_readl_rcm(he_dev, reg.addr);
he_dev           2643 drivers/atm/he.c 						he_readl_tcm(he_dev, reg.addr);
he_dev           2647 drivers/atm/he.c 						he_readl_mbox(he_dev, reg.addr);
he_dev           2653 drivers/atm/he.c 			spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2676 drivers/atm/he.c 	struct he_dev *he_dev = HE_DEV(atm_dev);
he_dev           2680 drivers/atm/he.c 	spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2681 drivers/atm/he.c 	he_writel(he_dev, val, FRAMER + (addr*4));
he_dev           2682 drivers/atm/he.c 	(void) he_readl(he_dev, FRAMER + (addr*4));		/* flush posted writes */
he_dev           2683 drivers/atm/he.c 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2691 drivers/atm/he.c 	struct he_dev *he_dev = HE_DEV(atm_dev);
he_dev           2694 drivers/atm/he.c 	spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2695 drivers/atm/he.c 	reg = he_readl(he_dev, FRAMER + (addr*4));
he_dev           2696 drivers/atm/he.c 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2706 drivers/atm/he.c 	struct he_dev *he_dev = HE_DEV(dev);
he_dev           2722 drivers/atm/he.c 			he_dev->prod_id, he_dev->media & 0x40 ? "SM" : "MM");
he_dev           2727 drivers/atm/he.c 	spin_lock_irqsave(&he_dev->global_lock, flags);
he_dev           2728 drivers/atm/he.c 	mcc += he_readl(he_dev, MCC);
he_dev           2729 drivers/atm/he.c 	oec += he_readl(he_dev, OEC);
he_dev           2730 drivers/atm/he.c 	dcc += he_readl(he_dev, DCC);
he_dev           2731 drivers/atm/he.c 	cec += he_readl(he_dev, CEC);
he_dev           2732 drivers/atm/he.c 	spin_unlock_irqrestore(&he_dev->global_lock, flags);
he_dev           2740 drivers/atm/he.c 				CONFIG_IRQ_SIZE, he_dev->irq_peak);
he_dev           2748 drivers/atm/he.c 				CONFIG_RBRQ_SIZE, he_dev->rbrq_peak);
he_dev           2752 drivers/atm/he.c 					CONFIG_TBRQ_SIZE, he_dev->tbrq_peak);
he_dev           2756 drivers/atm/he.c 	rbpl_head = RBPL_MASK(he_readl(he_dev, G0_RBPL_S));
he_dev           2757 drivers/atm/he.c 	rbpl_tail = RBPL_MASK(he_readl(he_dev, G0_RBPL_T));
he_dev           2775 drivers/atm/he.c 						he_dev->cs_stper[i].pcr,
he_dev           2776 drivers/atm/he.c 						he_dev->cs_stper[i].inuse);
he_dev           2780 drivers/atm/he.c 			he_dev->total_bw, he_dev->atm_dev->link_rate * 10 / 9);
he_dev           2787 drivers/atm/he.c static u8 read_prom_byte(struct he_dev *he_dev, int addr)
he_dev           2793 drivers/atm/he.c 	val = readl(he_dev->membase + HOST_CNTL);
he_dev           2798 drivers/atm/he.c 	he_writel(he_dev, val, HOST_CNTL);
he_dev           2802 drivers/atm/he.c 		he_writel(he_dev, val | readtab[i], HOST_CNTL);
he_dev           2808 drivers/atm/he.c 		he_writel(he_dev, val | clocktab[j++] | (((addr >> i) & 1) << 9), HOST_CNTL);
he_dev           2810 drivers/atm/he.c 		he_writel(he_dev, val | clocktab[j++] | (((addr >> i) & 1) << 9), HOST_CNTL);
he_dev           2817 drivers/atm/he.c 	he_writel(he_dev, val, HOST_CNTL);
he_dev           2821 drivers/atm/he.c 		he_writel(he_dev, val | clocktab[j++], HOST_CNTL);
he_dev           2823 drivers/atm/he.c 		tmp_read = he_readl(he_dev, HOST_CNTL);
he_dev           2826 drivers/atm/he.c 		he_writel(he_dev, val | clocktab[j++], HOST_CNTL);
he_dev           2830 drivers/atm/he.c 	he_writel(he_dev, val | ID_CS, HOST_CNTL);
he_dev            314 drivers/atm/he.h 	struct he_dev *next;
he_dev            345 drivers/atm/he.h #define HE_DEV(dev) ((struct he_dev *) (dev)->dev_data)