Lines Matching refs:pdev
200 ux500_of_probe(struct platform_device *pdev, struct device_node *np) in ux500_of_probe() argument
206 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); in ux500_of_probe()
212 dev_err(&pdev->dev, "No 'dr_mode' property found\n"); in ux500_of_probe()
228 static int ux500_probe(struct platform_device *pdev) in ux500_probe() argument
231 struct musb_hdrc_platform_data *pdata = dev_get_platdata(&pdev->dev); in ux500_probe()
232 struct device_node *np = pdev->dev.of_node; in ux500_probe()
240 pdata = ux500_of_probe(pdev, np); in ux500_probe()
244 pdev->dev.platform_data = pdata; in ux500_probe()
246 dev_err(&pdev->dev, "no pdata or device tree found\n"); in ux500_probe()
251 glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); in ux500_probe()
257 dev_err(&pdev->dev, "failed to allocate musb device\n"); in ux500_probe()
261 clk = devm_clk_get(&pdev->dev, NULL); in ux500_probe()
263 dev_err(&pdev->dev, "failed to get clock\n"); in ux500_probe()
270 dev_err(&pdev->dev, "failed to enable clock\n"); in ux500_probe()
274 musb->dev.parent = &pdev->dev; in ux500_probe()
275 musb->dev.dma_mask = &pdev->dev.coherent_dma_mask; in ux500_probe()
276 musb->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask; in ux500_probe()
278 glue->dev = &pdev->dev; in ux500_probe()
285 platform_set_drvdata(pdev, glue); in ux500_probe()
290 musb_resources[0].name = pdev->resource[0].name; in ux500_probe()
291 musb_resources[0].start = pdev->resource[0].start; in ux500_probe()
292 musb_resources[0].end = pdev->resource[0].end; in ux500_probe()
293 musb_resources[0].flags = pdev->resource[0].flags; in ux500_probe()
295 musb_resources[1].name = pdev->resource[1].name; in ux500_probe()
296 musb_resources[1].start = pdev->resource[1].start; in ux500_probe()
297 musb_resources[1].end = pdev->resource[1].end; in ux500_probe()
298 musb_resources[1].flags = pdev->resource[1].flags; in ux500_probe()
303 dev_err(&pdev->dev, "failed to add resources\n"); in ux500_probe()
309 dev_err(&pdev->dev, "failed to add platform_data\n"); in ux500_probe()
315 dev_err(&pdev->dev, "failed to register musb device\n"); in ux500_probe()
331 static int ux500_remove(struct platform_device *pdev) in ux500_remove() argument
333 struct ux500_glue *glue = platform_get_drvdata(pdev); in ux500_remove()