Lines Matching refs:mc_dev
20 struct fsl_mc_device *mc_dev; in dpaa2_ptp_enable() local
27 mc_dev = to_fsl_mc_device(dev); in dpaa2_ptp_enable()
51 err = dprtc_get_irq_mask(mc_dev->mc_io, 0, mc_dev->mc_handle, in dpaa2_ptp_enable()
63 err = dprtc_set_irq_mask(mc_dev->mc_io, 0, mc_dev->mc_handle, in dpaa2_ptp_enable()
93 struct fsl_mc_device *mc_dev; in dpaa2_ptp_irq_handler_thread() local
99 mc_dev = to_fsl_mc_device(dev); in dpaa2_ptp_irq_handler_thread()
101 err = dprtc_get_irq_status(mc_dev->mc_io, 0, mc_dev->mc_handle, in dpaa2_ptp_irq_handler_thread()
119 err = dprtc_clear_irq_status(mc_dev->mc_io, 0, mc_dev->mc_handle, in dpaa2_ptp_irq_handler_thread()
129 static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev) in dpaa2_ptp_probe() argument
131 struct device *dev = &mc_dev->dev; in dpaa2_ptp_probe()
141 err = fsl_mc_portal_allocate(mc_dev, 0, &mc_dev->mc_io); in dpaa2_ptp_probe()
150 err = dprtc_open(mc_dev->mc_io, 0, mc_dev->obj_desc.id, in dpaa2_ptp_probe()
151 &mc_dev->mc_handle); in dpaa2_ptp_probe()
173 err = fsl_mc_allocate_irqs(mc_dev); in dpaa2_ptp_probe()
179 ptp_qoriq->irq = mc_dev->irqs[0]->virq; in dpaa2_ptp_probe()
190 err = dprtc_set_irq_enable(mc_dev->mc_io, 0, mc_dev->mc_handle, in dpaa2_ptp_probe()
210 fsl_mc_free_irqs(mc_dev); in dpaa2_ptp_probe()
216 dprtc_close(mc_dev->mc_io, 0, mc_dev->mc_handle); in dpaa2_ptp_probe()
218 fsl_mc_portal_free(mc_dev->mc_io); in dpaa2_ptp_probe()
223 static int dpaa2_ptp_remove(struct fsl_mc_device *mc_dev) in dpaa2_ptp_remove() argument
225 struct device *dev = &mc_dev->dev; in dpaa2_ptp_remove()
233 fsl_mc_free_irqs(mc_dev); in dpaa2_ptp_remove()
234 dprtc_close(mc_dev->mc_io, 0, mc_dev->mc_handle); in dpaa2_ptp_remove()
235 fsl_mc_portal_free(mc_dev->mc_io); in dpaa2_ptp_remove()