Lines Matching refs:ofdev

514 static int mal_probe(struct platform_device *ofdev)  in mal_probe()  argument
530 mal->ofdev = ofdev; in mal_probe()
531 mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; in mal_probe()
535 prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL); in mal_probe()
545 prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL); in mal_probe()
555 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()
570 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { in mal_probe()
577 ofdev->dev.of_node); in mal_probe()
583 mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in mal_probe()
584 mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1); in mal_probe()
585 mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2); in mal_probe()
590 mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3); in mal_probe()
591 mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4); in mal_probe()
621 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon")) in mal_probe()
634 mal->bd_virt = dma_alloc_coherent(&ofdev->dev, bd_size, &mal->bd_dma, in mal_probe()
685 mal->version, ofdev->dev.of_node, in mal_probe()
690 platform_set_drvdata(ofdev, mal); in mal_probe()
703 dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma); in mal_probe()
712 static int mal_remove(struct platform_device *ofdev) in mal_remove() argument
714 struct mal_instance *mal = platform_get_drvdata(ofdev); in mal_remove()
735 dma_free_coherent(&ofdev->dev, in mal_remove()