Lines Matching refs:pdev

204 ux500_of_probe(struct platform_device *pdev, struct device_node *np)  in ux500_of_probe()  argument
210 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); in ux500_of_probe()
216 dev_err(&pdev->dev, "No 'dr_mode' property found\n"); in ux500_of_probe()
232 static int ux500_probe(struct platform_device *pdev) in ux500_probe() argument
235 struct musb_hdrc_platform_data *pdata = dev_get_platdata(&pdev->dev); in ux500_probe()
236 struct device_node *np = pdev->dev.of_node; in ux500_probe()
244 pdata = ux500_of_probe(pdev, np); in ux500_probe()
248 pdev->dev.platform_data = pdata; in ux500_probe()
250 dev_err(&pdev->dev, "no pdata or device tree found\n"); in ux500_probe()
255 glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); in ux500_probe()
261 dev_err(&pdev->dev, "failed to allocate musb device\n"); in ux500_probe()
265 clk = devm_clk_get(&pdev->dev, NULL); in ux500_probe()
267 dev_err(&pdev->dev, "failed to get clock\n"); in ux500_probe()
274 dev_err(&pdev->dev, "failed to enable clock\n"); in ux500_probe()
278 musb->dev.parent = &pdev->dev; in ux500_probe()
279 musb->dev.dma_mask = &pdev->dev.coherent_dma_mask; in ux500_probe()
280 musb->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask; in ux500_probe()
282 glue->dev = &pdev->dev; in ux500_probe()
289 platform_set_drvdata(pdev, glue); in ux500_probe()
294 musb_resources[0].name = pdev->resource[0].name; in ux500_probe()
295 musb_resources[0].start = pdev->resource[0].start; in ux500_probe()
296 musb_resources[0].end = pdev->resource[0].end; in ux500_probe()
297 musb_resources[0].flags = pdev->resource[0].flags; in ux500_probe()
299 musb_resources[1].name = pdev->resource[1].name; in ux500_probe()
300 musb_resources[1].start = pdev->resource[1].start; in ux500_probe()
301 musb_resources[1].end = pdev->resource[1].end; in ux500_probe()
302 musb_resources[1].flags = pdev->resource[1].flags; in ux500_probe()
307 dev_err(&pdev->dev, "failed to add resources\n"); in ux500_probe()
313 dev_err(&pdev->dev, "failed to add platform_data\n"); in ux500_probe()
319 dev_err(&pdev->dev, "failed to register musb device\n"); in ux500_probe()
335 static int ux500_remove(struct platform_device *pdev) in ux500_remove() argument
337 struct ux500_glue *glue = platform_get_drvdata(pdev); in ux500_remove()