Lines Matching refs:pdev

84 static int mv_conf_mbus_windows(struct platform_device *pdev,  in mv_conf_mbus_windows()  argument
92 dev_err(&pdev->dev, "no mbus dram info\n"); in mv_conf_mbus_windows()
96 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); in mv_conf_mbus_windows()
98 dev_err(&pdev->dev, "cannot get mbus registers\n"); in mv_conf_mbus_windows()
104 dev_err(&pdev->dev, "cannot map mbus registers\n"); in mv_conf_mbus_windows()
130 static int armada_38x_quirks(struct platform_device *pdev, in armada_38x_quirks() argument
133 struct device_node *np = pdev->dev.of_node; in armada_38x_quirks()
143 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, in armada_38x_quirks()
146 pxa->sdio3_conf_reg = devm_ioremap_resource(&pdev->dev, res); in armada_38x_quirks()
158 …dev_warn(&pdev->dev, "conf-sdio3 register not found: disabling SDR50 and DDR50 modes.\nConsider up… in armada_38x_quirks()
179 struct platform_device *pdev = to_platform_device(mmc_dev(host->mmc)); in pxav3_reset() local
180 struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data; in pxav3_reset()
360 static int sdhci_pxav3_probe(struct platform_device *pdev) in sdhci_pxav3_probe() argument
363 struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data; in sdhci_pxav3_probe()
364 struct device *dev = &pdev->dev; in sdhci_pxav3_probe()
365 struct device_node *np = pdev->dev.of_node; in sdhci_pxav3_probe()
371 pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa), GFP_KERNEL); in sdhci_pxav3_probe()
375 host = sdhci_pltfm_init(pdev, &sdhci_pxav3_pdata, 0); in sdhci_pxav3_probe()
401 ret = armada_38x_quirks(pdev, host); in sdhci_pxav3_probe()
404 ret = mv_conf_mbus_windows(pdev, mv_mbus_dram_info()); in sdhci_pxav3_probe()
409 match = of_match_device(of_match_ptr(sdhci_pxav3_of_match), &pdev->dev); in sdhci_pxav3_probe()
414 sdhci_get_of_property(pdev); in sdhci_pxav3_probe()
416 pdev->dev.platform_data = pdata; in sdhci_pxav3_probe()
448 pm_runtime_get_noresume(&pdev->dev); in sdhci_pxav3_probe()
449 pm_runtime_set_active(&pdev->dev); in sdhci_pxav3_probe()
450 pm_runtime_set_autosuspend_delay(&pdev->dev, PXAV3_RPM_DELAY_MS); in sdhci_pxav3_probe()
451 pm_runtime_use_autosuspend(&pdev->dev); in sdhci_pxav3_probe()
452 pm_runtime_enable(&pdev->dev); in sdhci_pxav3_probe()
453 pm_suspend_ignore_children(&pdev->dev, 1); in sdhci_pxav3_probe()
457 dev_err(&pdev->dev, "failed to add host\n"); in sdhci_pxav3_probe()
461 platform_set_drvdata(pdev, host); in sdhci_pxav3_probe()
464 device_init_wakeup(&pdev->dev, 1); in sdhci_pxav3_probe()
467 device_init_wakeup(&pdev->dev, 0); in sdhci_pxav3_probe()
470 pm_runtime_put_autosuspend(&pdev->dev); in sdhci_pxav3_probe()
475 pm_runtime_disable(&pdev->dev); in sdhci_pxav3_probe()
476 pm_runtime_put_noidle(&pdev->dev); in sdhci_pxav3_probe()
483 sdhci_pltfm_free(pdev); in sdhci_pxav3_probe()
487 static int sdhci_pxav3_remove(struct platform_device *pdev) in sdhci_pxav3_remove() argument
489 struct sdhci_host *host = platform_get_drvdata(pdev); in sdhci_pxav3_remove()
493 pm_runtime_get_sync(&pdev->dev); in sdhci_pxav3_remove()
494 pm_runtime_disable(&pdev->dev); in sdhci_pxav3_remove()
495 pm_runtime_put_noidle(&pdev->dev); in sdhci_pxav3_remove()
502 sdhci_pltfm_free(pdev); in sdhci_pxav3_remove()