Lines Matching +full:imx93 +full:- +full:src

1 // SPDX-License-Identifier: GPL-2.0
38 void __iomem *addr = domain->addr; in imx93_pd_on()
42 ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); in imx93_pd_on()
44 dev_err(domain->dev, "failed to enable clocks for domain: %s\n", genpd->name); in imx93_pd_on()
55 dev_err(domain->dev, "pd_on timeout: name: %s, stat: %x\n", genpd->name, val); in imx93_pd_on()
65 void __iomem *addr = domain->addr; in imx93_pd_off()
77 dev_err(domain->dev, "pd_off timeout: name: %s, stat: %x\n", genpd->name, val); in imx93_pd_off()
81 clk_bulk_disable_unprepare(domain->num_clks, domain->clks); in imx93_pd_off()
89 struct device *dev = &pdev->dev; in imx93_pd_remove()
90 struct device_node *np = dev->of_node; in imx93_pd_remove()
92 if (!domain->init_off) in imx93_pd_remove()
93 clk_bulk_disable_unprepare(domain->num_clks, domain->clks); in imx93_pd_remove()
96 pm_genpd_remove(&domain->genpd); in imx93_pd_remove()
103 struct device *dev = &pdev->dev; in imx93_pd_probe()
104 struct device_node *np = dev->of_node; in imx93_pd_probe()
110 return -ENOMEM; in imx93_pd_probe()
112 domain->addr = devm_platform_ioremap_resource(pdev, 0); in imx93_pd_probe()
113 if (IS_ERR(domain->addr)) in imx93_pd_probe()
114 return PTR_ERR(domain->addr); in imx93_pd_probe()
116 domain->num_clks = devm_clk_bulk_get_all(dev, &domain->clks); in imx93_pd_probe()
117 if (domain->num_clks < 0) in imx93_pd_probe()
118 return dev_err_probe(dev, domain->num_clks, "Failed to get domain's clocks\n"); in imx93_pd_probe()
120 domain->genpd.name = dev_name(dev); in imx93_pd_probe()
121 domain->genpd.power_off = imx93_pd_off; in imx93_pd_probe()
122 domain->genpd.power_on = imx93_pd_on; in imx93_pd_probe()
123 domain->dev = dev; in imx93_pd_probe()
125 domain->init_off = readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK; in imx93_pd_probe()
127 if (!domain->init_off) { in imx93_pd_probe()
128 ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); in imx93_pd_probe()
130 dev_err(domain->dev, "failed to enable clocks for domain: %s\n", in imx93_pd_probe()
131 domain->genpd.name); in imx93_pd_probe()
136 ret = pm_genpd_init(&domain->genpd, NULL, domain->init_off); in imx93_pd_probe()
142 ret = of_genpd_add_provider_simple(np, &domain->genpd); in imx93_pd_probe()
149 pm_genpd_remove(&domain->genpd); in imx93_pd_probe()
152 if (!domain->init_off) in imx93_pd_probe()
153 clk_bulk_disable_unprepare(domain->num_clks, domain->clks); in imx93_pd_probe()
159 { .compatible = "fsl,imx93-src-slice" },