Lines Matching refs:xvcu

521 static int xvcu_register_clock_provider(struct xvcu_device *xvcu)  in xvcu_register_clock_provider()  argument
523 struct device *dev = xvcu->dev; in xvcu_register_clock_provider()
528 void __iomem *reg_base = xvcu->vcu_slcr_ba; in xvcu_register_clock_provider()
536 xvcu->clk_data = data; in xvcu_register_clock_provider()
539 "vcu_pll", __clk_get_name(xvcu->pll_ref), in xvcu_register_clock_provider()
543 xvcu->pll = hw; in xvcu_register_clock_provider()
545 hw = xvcu_register_pll_post(dev, "vcu_pll_post", xvcu->pll, reg_base); in xvcu_register_clock_provider()
548 xvcu->pll_post = hw; in xvcu_register_clock_provider()
551 parent_data[1].hw = xvcu->pll_post; in xvcu_register_clock_provider()
577 static void xvcu_unregister_clock_provider(struct xvcu_device *xvcu) in xvcu_unregister_clock_provider() argument
579 struct clk_hw_onecell_data *data = xvcu->clk_data; in xvcu_unregister_clock_provider()
591 clk_hw_unregister_fixed_factor(xvcu->pll_post); in xvcu_unregister_clock_provider()
606 struct xvcu_device *xvcu; in xvcu_probe() local
610 xvcu = devm_kzalloc(&pdev->dev, sizeof(*xvcu), GFP_KERNEL); in xvcu_probe()
611 if (!xvcu) in xvcu_probe()
614 xvcu->dev = &pdev->dev; in xvcu_probe()
621 xvcu->vcu_slcr_ba = devm_ioremap(&pdev->dev, res->start, in xvcu_probe()
623 if (!xvcu->vcu_slcr_ba) { in xvcu_probe()
628 xvcu->logicore_reg_ba = in xvcu_probe()
630 if (IS_ERR(xvcu->logicore_reg_ba)) { in xvcu_probe()
647 xvcu->logicore_reg_ba = in xvcu_probe()
650 if (IS_ERR(xvcu->logicore_reg_ba)) { in xvcu_probe()
652 return PTR_ERR(xvcu->logicore_reg_ba); in xvcu_probe()
656 xvcu->aclk = devm_clk_get(&pdev->dev, "aclk"); in xvcu_probe()
657 if (IS_ERR(xvcu->aclk)) { in xvcu_probe()
659 return PTR_ERR(xvcu->aclk); in xvcu_probe()
662 xvcu->pll_ref = devm_clk_get(&pdev->dev, "pll_ref"); in xvcu_probe()
663 if (IS_ERR(xvcu->pll_ref)) { in xvcu_probe()
665 return PTR_ERR(xvcu->pll_ref); in xvcu_probe()
668 ret = clk_prepare_enable(xvcu->aclk); in xvcu_probe()
679 regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE); in xvcu_probe()
681 ret = xvcu_register_clock_provider(xvcu); in xvcu_probe()
687 dev_set_drvdata(&pdev->dev, xvcu); in xvcu_probe()
692 xvcu_unregister_clock_provider(xvcu); in xvcu_probe()
693 clk_disable_unprepare(xvcu->aclk); in xvcu_probe()
707 struct xvcu_device *xvcu; in xvcu_remove() local
709 xvcu = platform_get_drvdata(pdev); in xvcu_remove()
711 xvcu_unregister_clock_provider(xvcu); in xvcu_remove()
714 regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0); in xvcu_remove()
716 clk_disable_unprepare(xvcu->aclk); in xvcu_remove()