Lines Matching refs:pdev
114 static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int *f) in sh_mobile_sdhi_clk_enable() argument
116 struct mmc_host *mmc = platform_get_drvdata(pdev); in sh_mobile_sdhi_clk_enable()
131 static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev) in sh_mobile_sdhi_clk_disable() argument
133 struct mmc_host *mmc = platform_get_drvdata(pdev); in sh_mobile_sdhi_clk_disable()
147 dev_warn(&host->pdev->dev, "timeout waiting for SD bus idle\n"); in sh_mobile_sdhi_wait_idle()
198 static int sh_mobile_sdhi_probe(struct platform_device *pdev) in sh_mobile_sdhi_probe() argument
201 of_match_device(sh_mobile_sdhi_of_match, &pdev->dev); in sh_mobile_sdhi_probe()
204 struct tmio_mmc_data *mmd = pdev->dev.platform_data; in sh_mobile_sdhi_probe()
211 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in sh_mobile_sdhi_probe()
215 priv = devm_kzalloc(&pdev->dev, sizeof(struct sh_mobile_sdhi), GFP_KERNEL); in sh_mobile_sdhi_probe()
217 dev_err(&pdev->dev, "kzalloc failed\n"); in sh_mobile_sdhi_probe()
224 priv->clk = devm_clk_get(&pdev->dev, NULL); in sh_mobile_sdhi_probe()
227 dev_err(&pdev->dev, "cannot get clock: %d\n", ret); in sh_mobile_sdhi_probe()
231 host = tmio_mmc_host_alloc(pdev); in sh_mobile_sdhi_probe()
296 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT); in sh_mobile_sdhi_probe()
299 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_card_detect_irq, 0, in sh_mobile_sdhi_probe()
300 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
305 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDIO); in sh_mobile_sdhi_probe()
308 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdio_irq, 0, in sh_mobile_sdhi_probe()
309 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
314 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDCARD); in sh_mobile_sdhi_probe()
317 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdcard_irq, 0, in sh_mobile_sdhi_probe()
318 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
322 dev_err(&pdev->dev, in sh_mobile_sdhi_probe()
330 irq = platform_get_irq(pdev, i); in sh_mobile_sdhi_probe()
334 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0, in sh_mobile_sdhi_probe()
335 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
347 dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n", in sh_mobile_sdhi_probe()
349 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start), in sh_mobile_sdhi_probe()
362 static int sh_mobile_sdhi_remove(struct platform_device *pdev) in sh_mobile_sdhi_remove() argument
364 struct mmc_host *mmc = platform_get_drvdata(pdev); in sh_mobile_sdhi_remove()