Lines Matching refs:ofdev

516 static int mal_probe(struct platform_device *ofdev)  in mal_probe()  argument
532 mal->ofdev = ofdev; in mal_probe()
533 mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; in mal_probe()
537 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()
557 dcr_base = dcr_resource_start(ofdev->dev.of_node, 0); in mal_probe()
564 mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); in mal_probe()
572 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { in mal_probe()
579 ofdev->dev.of_node); in mal_probe()
585 mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in mal_probe()
586 mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1); in mal_probe()
587 mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2); in mal_probe()
592 mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3); in mal_probe()
593 mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4); in mal_probe()
623 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon")) in mal_probe()
636 mal->bd_virt = dma_alloc_coherent(&ofdev->dev, bd_size, &mal->bd_dma, in mal_probe()
687 mal->version, ofdev->dev.of_node, in mal_probe()
692 platform_set_drvdata(ofdev, mal); in mal_probe()
705 dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma); in mal_probe()
714 static int mal_remove(struct platform_device *ofdev) in mal_remove() argument
716 struct mal_instance *mal = platform_get_drvdata(ofdev); in mal_remove()
737 dma_free_coherent(&ofdev->dev, in mal_remove()