Lines Matching refs:op

683 	struct platform_device *op;  in qe_get_drvinfo()  local
688 op = qep->op; in qe_get_drvinfo()
689 regs = of_get_property(op->dev.of_node, "reg", NULL); in qe_get_drvinfo()
715 static void qec_init_once(struct sunqec *qecp, struct platform_device *op) in qec_init_once() argument
733 sbus_writel((resource_size(&op->resource[1]) >> 2), in qec_init_once()
739 sbus_writel((resource_size(&op->resource[1]) >> 2) >> 1, in qec_init_once()
741 sbus_writel((resource_size(&op->resource[1]) >> 2) >> 1, in qec_init_once()
767 struct platform_device *op = to_platform_device(child->dev.parent); in get_qec() local
770 qecp = platform_get_drvdata(op); in get_qec()
776 qecp->op = op; in get_qec()
777 qecp->gregs = of_ioremap(&op->resource[0], 0, in get_qec()
794 qecp->qec_bursts = qec_get_burst(op->dev.of_node); in get_qec()
796 qec_init_once(qecp, op); in get_qec()
798 if (request_irq(op->archdata.irqs[0], qec_interrupt, in get_qec()
804 platform_set_drvdata(op, qecp); in get_qec()
815 of_iounmap(&op->resource[0], qecp->gregs, GLOB_REG_SIZE); in get_qec()
831 static int qec_ether_init(struct platform_device *op) in qec_ether_init() argument
852 i = of_getintprop_default(op->dev.of_node, "channel#", -1); in qec_ether_init()
858 qecp = get_qec(op); in qec_ether_init()
865 qe->op = op; in qec_ether_init()
868 qe->qcregs = of_ioremap(&op->resource[0], 0, in qec_ether_init()
875 qe->mregs = of_ioremap(&op->resource[1], 0, in qec_ether_init()
882 qe->qe_block = dma_alloc_coherent(&op->dev, PAGE_SIZE, in qec_ether_init()
884 qe->buffers = dma_alloc_coherent(&op->dev, sizeof(struct sunqe_buffers), in qec_ether_init()
893 SET_NETDEV_DEV(dev, &op->dev); in qec_ether_init()
896 dev->irq = op->archdata.irqs[0]; in qec_ether_init()
905 platform_set_drvdata(op, qe); in qec_ether_init()
913 of_iounmap(&op->resource[0], qe->qcregs, CREG_REG_SIZE); in qec_ether_init()
915 of_iounmap(&op->resource[1], qe->mregs, MREGS_REG_SIZE); in qec_ether_init()
917 dma_free_coherent(&op->dev, PAGE_SIZE, in qec_ether_init()
920 dma_free_coherent(&op->dev, in qec_ether_init()
930 static int qec_sbus_probe(struct platform_device *op) in qec_sbus_probe() argument
932 return qec_ether_init(op); in qec_sbus_probe()
935 static int qec_sbus_remove(struct platform_device *op) in qec_sbus_remove() argument
937 struct sunqe *qp = platform_get_drvdata(op); in qec_sbus_remove()
942 of_iounmap(&op->resource[0], qp->qcregs, CREG_REG_SIZE); in qec_sbus_remove()
943 of_iounmap(&op->resource[1], qp->mregs, MREGS_REG_SIZE); in qec_sbus_remove()
944 dma_free_coherent(&op->dev, PAGE_SIZE, in qec_sbus_remove()
946 dma_free_coherent(&op->dev, sizeof(struct sunqe_buffers), in qec_sbus_remove()
983 struct platform_device *op = root_qec_dev->op; in qec_exit() local
985 free_irq(op->archdata.irqs[0], (void *) root_qec_dev); in qec_exit()
986 of_iounmap(&op->resource[0], root_qec_dev->gregs, in qec_exit()