• Home
  • Raw
  • Download

Lines Matching refs:pdev

518 static int tegra30_ahub_probe(struct platform_device *pdev)  in tegra30_ahub_probe()  argument
531 match = of_match_device(tegra30_ahub_of_match, &pdev->dev); in tegra30_ahub_probe()
546 rst = reset_control_get(&pdev->dev, in tegra30_ahub_probe()
549 dev_err(&pdev->dev, "Can't get reset %s\n", in tegra30_ahub_probe()
561 ahub = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub), in tegra30_ahub_probe()
564 dev_err(&pdev->dev, "Can't allocate tegra30_ahub\n"); in tegra30_ahub_probe()
568 dev_set_drvdata(&pdev->dev, ahub); in tegra30_ahub_probe()
571 ahub->dev = &pdev->dev; in tegra30_ahub_probe()
573 ahub->clk_d_audio = clk_get(&pdev->dev, "d_audio"); in tegra30_ahub_probe()
575 dev_err(&pdev->dev, "Can't retrieve ahub d_audio clock\n"); in tegra30_ahub_probe()
580 ahub->clk_apbif = clk_get(&pdev->dev, "apbif"); in tegra30_ahub_probe()
582 dev_err(&pdev->dev, "Can't retrieve ahub apbif clock\n"); in tegra30_ahub_probe()
587 res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); in tegra30_ahub_probe()
589 dev_err(&pdev->dev, "No apbif memory resource\n"); in tegra30_ahub_probe()
594 region = devm_request_mem_region(&pdev->dev, res0->start, in tegra30_ahub_probe()
597 dev_err(&pdev->dev, "request region apbif failed\n"); in tegra30_ahub_probe()
603 regs_apbif = devm_ioremap(&pdev->dev, res0->start, in tegra30_ahub_probe()
606 dev_err(&pdev->dev, "ioremap apbif failed\n"); in tegra30_ahub_probe()
611 ahub->regmap_apbif = devm_regmap_init_mmio(&pdev->dev, regs_apbif, in tegra30_ahub_probe()
614 dev_err(&pdev->dev, "apbif regmap init failed\n"); in tegra30_ahub_probe()
620 res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); in tegra30_ahub_probe()
622 dev_err(&pdev->dev, "No ahub memory resource\n"); in tegra30_ahub_probe()
627 region = devm_request_mem_region(&pdev->dev, res1->start, in tegra30_ahub_probe()
630 dev_err(&pdev->dev, "request region ahub failed\n"); in tegra30_ahub_probe()
635 regs_ahub = devm_ioremap(&pdev->dev, res1->start, in tegra30_ahub_probe()
638 dev_err(&pdev->dev, "ioremap ahub failed\n"); in tegra30_ahub_probe()
643 ahub->regmap_ahub = devm_regmap_init_mmio(&pdev->dev, regs_ahub, in tegra30_ahub_probe()
646 dev_err(&pdev->dev, "ahub regmap init failed\n"); in tegra30_ahub_probe()
652 pm_runtime_enable(&pdev->dev); in tegra30_ahub_probe()
653 if (!pm_runtime_enabled(&pdev->dev)) { in tegra30_ahub_probe()
654 ret = tegra30_ahub_runtime_resume(&pdev->dev); in tegra30_ahub_probe()
659 of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); in tegra30_ahub_probe()
664 pm_runtime_disable(&pdev->dev); in tegra30_ahub_probe()
674 static int tegra30_ahub_remove(struct platform_device *pdev) in tegra30_ahub_remove() argument
679 pm_runtime_disable(&pdev->dev); in tegra30_ahub_remove()
680 if (!pm_runtime_status_suspended(&pdev->dev)) in tegra30_ahub_remove()
681 tegra30_ahub_runtime_suspend(&pdev->dev); in tegra30_ahub_remove()