Lines Matching refs:mdev
173 struct macio_dev *mdev; member
1744 pmac_call_feature(PMAC_FTR_MESH_ENABLE, macio_get_of_node(ms->mdev), 0, 1); in set_mesh_power()
1747 pmac_call_feature(PMAC_FTR_MESH_ENABLE, macio_get_of_node(ms->mdev), 0, 0); in set_mesh_power()
1754 static int mesh_suspend(struct macio_dev *mdev, pm_message_t mesg) in mesh_suspend() argument
1756 struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); in mesh_suspend()
1785 static int mesh_resume(struct macio_dev *mdev) in mesh_resume() argument
1787 struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); in mesh_resume()
1811 static int mesh_shutdown(struct macio_dev *mdev) in mesh_shutdown() argument
1813 struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); in mesh_shutdown()
1844 static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) in mesh_probe() argument
1846 struct device_node *mesh = macio_get_of_node(mdev); in mesh_probe()
1847 struct pci_dev* pdev = macio_get_pci_dev(mdev); in mesh_probe()
1855 switch (mdev->bus->chip->type) { in mesh_probe()
1865 if (macio_resource_count(mdev) != 2 || macio_irq_count(mdev) != 2) { in mesh_probe()
1867 " (got %d,%d)\n", macio_resource_count(mdev), in mesh_probe()
1868 macio_irq_count(mdev)); in mesh_probe()
1872 if (macio_request_resources(mdev, "mesh") != 0) { in mesh_probe()
1887 mesh_host->base = macio_resource_start(mdev, 0); in mesh_probe()
1888 mesh_host->irq = macio_irq(mdev, 0); in mesh_probe()
1890 macio_set_drvdata(mdev, ms); in mesh_probe()
1892 ms->mdev = mdev; in mesh_probe()
1895 ms->mesh = ioremap(macio_resource_start(mdev, 0), 0x1000); in mesh_probe()
1900 ms->dma = ioremap(macio_resource_start(mdev, 1), 0x1000); in mesh_probe()
1907 ms->meshintr = macio_irq(mdev, 0); in mesh_probe()
1908 ms->dmaintr = macio_irq(mdev, 1); in mesh_probe()
1918 dma_cmd_space = pci_zalloc_consistent(macio_get_pci_dev(mdev), in mesh_probe()
1963 if (scsi_add_host(mesh_host, &mdev->ofdev.dev)) in mesh_probe()
1975 mesh_shutdown(mdev); in mesh_probe()
1977 pci_free_consistent(macio_get_pci_dev(mdev), ms->dma_cmd_size, in mesh_probe()
1985 macio_release_resources(mdev); in mesh_probe()
1990 static int mesh_remove(struct macio_dev *mdev) in mesh_remove() argument
1992 struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); in mesh_remove()
2000 mesh_shutdown(mdev); in mesh_remove()
2010 pci_free_consistent(macio_get_pci_dev(mdev), ms->dma_cmd_size, in mesh_remove()
2014 macio_release_resources(mdev); in mesh_remove()