Lines Matching refs:qecp
143 struct sunqec *qecp = qep->parent; in qe_init() local
146 void __iomem *gregs = qecp->gregs; in qe_init()
470 struct sunqec *qecp = dev_id; in qec_interrupt() local
475 qec_status = sbus_readl(qecp->gregs + GLOB_STAT); in qec_interrupt()
478 struct sunqe *qep = qecp->qes[channel]; in qec_interrupt()
717 static void qec_init_once(struct sunqec *qecp, struct platform_device *op) in qec_init_once() argument
719 u8 bsizes = qecp->qec_bursts; in qec_init_once()
722 sbus_writel(GLOB_CTRL_B64, qecp->gregs + GLOB_CTRL); in qec_init_once()
724 sbus_writel(GLOB_CTRL_B32, qecp->gregs + GLOB_CTRL); in qec_init_once()
726 sbus_writel(GLOB_CTRL_B16, qecp->gregs + GLOB_CTRL); in qec_init_once()
732 sbus_writel(GLOB_PSIZE_2048, qecp->gregs + GLOB_PSIZE); in qec_init_once()
736 qecp->gregs + GLOB_MSIZE); in qec_init_once()
742 qecp->gregs + GLOB_TSIZE); in qec_init_once()
744 qecp->gregs + GLOB_RSIZE); in qec_init_once()
770 struct sunqec *qecp; in get_qec() local
772 qecp = platform_get_drvdata(op); in get_qec()
773 if (!qecp) { in get_qec()
774 qecp = kzalloc(sizeof(struct sunqec), GFP_KERNEL); in get_qec()
775 if (qecp) { in get_qec()
778 qecp->op = op; in get_qec()
779 qecp->gregs = of_ioremap(&op->resource[0], 0, in get_qec()
782 if (!qecp->gregs) in get_qec()
786 ctrl = sbus_readl(qecp->gregs + GLOB_CTRL); in get_qec()
793 if (qec_global_reset(qecp->gregs)) in get_qec()
796 qecp->qec_bursts = qec_get_burst(op->dev.of_node); in get_qec()
798 qec_init_once(qecp, op); in get_qec()
801 IRQF_SHARED, "qec", (void *) qecp)) { in get_qec()
806 platform_set_drvdata(op, qecp); in get_qec()
808 qecp->next_module = root_qec_dev; in get_qec()
809 root_qec_dev = qecp; in get_qec()
813 return qecp; in get_qec()
816 if (qecp->gregs) in get_qec()
817 of_iounmap(&op->resource[0], qecp->gregs, GLOB_REG_SIZE); in get_qec()
818 kfree(qecp); in get_qec()
836 struct sunqec *qecp; in qec_ether_init() local
859 qecp = get_qec(op); in qec_ether_init()
860 if (!qecp) in qec_ether_init()
863 qecp->qes[qe->channel] = qe; in qec_ether_init()
865 qe->parent = qecp; in qec_ether_init()