Lines Matching refs:ofdev

516 static int mal_probe(struct platform_device *ofdev)  in mal_probe()  argument
527 mal = devm_kzalloc(&ofdev->dev, sizeof(struct mal_instance), in mal_probe()
533 mal->ofdev = ofdev; in mal_probe()
534 mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; in mal_probe()
538 prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL); in mal_probe()
547 prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL); in mal_probe()
556 dcr_base = dcr_resource_start(ofdev->dev.of_node, 0); in mal_probe()
562 mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); in mal_probe()
569 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { in mal_probe()
576 ofdev->dev.of_node); in mal_probe()
605 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon")) in mal_probe()
618 mal->bd_virt = dma_alloc_coherent(&ofdev->dev, bd_size, &mal->bd_dma, in mal_probe()
635 mal->txeob_irq = platform_get_irq(ofdev, 0); in mal_probe()
636 mal->rxeob_irq = platform_get_irq(ofdev, 1); in mal_probe()
637 mal->serr_irq = platform_get_irq(ofdev, 2); in mal_probe()
644 mal->txde_irq = platform_get_irq(ofdev, 3); in mal_probe()
645 mal->rxde_irq = platform_get_irq(ofdev, 4); in mal_probe()
652 err = devm_request_irq(&ofdev->dev, mal->serr_irq, hdlr_serr, irqflags, in mal_probe()
656 err = devm_request_irq(&ofdev->dev, mal->txde_irq, hdlr_txde, irqflags, in mal_probe()
660 err = devm_request_irq(&ofdev->dev, mal->txeob_irq, mal_txeob, 0, in mal_probe()
664 err = devm_request_irq(&ofdev->dev, mal->rxde_irq, hdlr_rxde, irqflags, in mal_probe()
668 err = devm_request_irq(&ofdev->dev, mal->rxeob_irq, mal_rxeob, 0, in mal_probe()
681 mal->version, ofdev->dev.of_node, in mal_probe()
686 platform_set_drvdata(ofdev, mal); in mal_probe()
691 dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma); in mal_probe()
699 static void mal_remove(struct platform_device *ofdev) in mal_remove() argument
701 struct mal_instance *mal = platform_get_drvdata(ofdev); in mal_remove()
720 dma_free_coherent(&ofdev->dev, in mal_remove()