Lines Matching refs:op
692 struct platform_device *op;
697 op = qep->op;
698 regs = of_get_property(op->dev.of_node, "reg", NULL);
723 static void qec_init_once(struct sunqec *qecp, struct platform_device *op)
741 sbus_writel((resource_size(&op->resource[1]) >> 2),
747 sbus_writel((resource_size(&op->resource[1]) >> 2) >> 1,
749 sbus_writel((resource_size(&op->resource[1]) >> 2) >> 1,
775 struct platform_device *op = to_platform_device(child->dev.parent);
778 qecp = dev_get_drvdata(&op->dev);
784 qecp->op = op;
785 qecp->gregs = of_ioremap(&op->resource[0], 0,
802 qecp->qec_bursts = qec_get_burst(op->dev.of_node);
804 qec_init_once(qecp, op);
806 if (request_irq(op->archdata.irqs[0], qec_interrupt,
812 dev_set_drvdata(&op->dev, qecp);
823 of_iounmap(&op->resource[0], qecp->gregs, GLOB_REG_SIZE);
839 static int __devinit qec_ether_init(struct platform_device *op)
860 i = of_getintprop_default(op->dev.of_node, "channel#", -1);
866 qecp = get_qec(op);
873 qe->op = op;
876 qe->qcregs = of_ioremap(&op->resource[0], 0,
883 qe->mregs = of_ioremap(&op->resource[1], 0,
890 qe->qe_block = dma_alloc_coherent(&op->dev, PAGE_SIZE,
892 qe->buffers = dma_alloc_coherent(&op->dev, sizeof(struct sunqe_buffers),
901 SET_NETDEV_DEV(dev, &op->dev);
904 dev->irq = op->archdata.irqs[0];
913 dev_set_drvdata(&op->dev, qe);
927 of_iounmap(&op->resource[0], qe->qcregs, CREG_REG_SIZE);
929 of_iounmap(&op->resource[1], qe->mregs, MREGS_REG_SIZE);
931 dma_free_coherent(&op->dev, PAGE_SIZE,
934 dma_free_coherent(&op->dev,
944 static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match)
946 return qec_ether_init(op);
949 static int __devexit qec_sbus_remove(struct platform_device *op)
951 struct sunqe *qp = dev_get_drvdata(&op->dev);
956 of_iounmap(&op->resource[0], qp->qcregs, CREG_REG_SIZE);
957 of_iounmap(&op->resource[1], qp->mregs, MREGS_REG_SIZE);
958 dma_free_coherent(&op->dev, PAGE_SIZE,
960 dma_free_coherent(&op->dev, sizeof(struct sunqe_buffers),
965 dev_set_drvdata(&op->dev, NULL);
1000 struct platform_device *op = root_qec_dev->op;
1002 free_irq(op->archdata.irqs[0], (void *) root_qec_dev);
1003 of_iounmap(&op->resource[0], root_qec_dev->gregs,