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