Lines Matching +full:timeout +full:- +full:pwr +full:- +full:ms
1 // SPDX-License-Identifier: GPL-2.0
9 // conjunction with runtime-pm. Support for both device-tree and non-device-tree
40 u32 timeout, pwr; in exynos_pd_power() local
44 base = pd->base; in exynos_pd_power()
46 pwr = power_on ? pd->local_pwr_cfg : 0; in exynos_pd_power()
47 writel_relaxed(pwr, base); in exynos_pd_power()
49 /* Wait max 1ms */ in exynos_pd_power()
50 timeout = 10; in exynos_pd_power()
52 while ((readl_relaxed(base + 0x4) & pd->local_pwr_cfg) != pwr) { in exynos_pd_power()
53 if (!timeout) { in exynos_pd_power()
55 pr_err("Power domain %s %s failed\n", domain->name, op); in exynos_pd_power()
56 return -ETIMEDOUT; in exynos_pd_power()
58 timeout--; in exynos_pd_power()
86 .compatible = "samsung,exynos4210-pd",
89 .compatible = "samsung,exynos5433-pd",
101 name = kbasename(node->full_name); in exynos_get_domain_name()
108 struct device *dev = &pdev->dev; in exynos_pd_probe()
109 struct device_node *np = dev->of_node; in exynos_pd_probe()
117 return -ENOMEM; in exynos_pd_probe()
119 pd->pd.name = exynos_get_domain_name(dev, np); in exynos_pd_probe()
120 if (!pd->pd.name) in exynos_pd_probe()
121 return -ENOMEM; in exynos_pd_probe()
123 pd->base = of_iomap(np, 0); in exynos_pd_probe()
124 if (!pd->base) in exynos_pd_probe()
125 return -ENODEV; in exynos_pd_probe()
127 pd->pd.power_off = exynos_pd_power_off; in exynos_pd_probe()
128 pd->pd.power_on = exynos_pd_power_on; in exynos_pd_probe()
129 pd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg; in exynos_pd_probe()
132 * Some Samsung platforms with bootloaders turning on the splash-screen in exynos_pd_probe()
133 * and handing it over to the kernel, requires the power-domains to be in exynos_pd_probe()
137 of_device_is_compatible(np, "samsung,exynos4210-pd")) in exynos_pd_probe()
138 exynos_pd_power_off(&pd->pd); in exynos_pd_probe()
140 on = readl_relaxed(pd->base + 0x4) & pd->local_pwr_cfg; in exynos_pd_probe()
142 pm_genpd_init(&pd->pd, NULL, !on); in exynos_pd_probe()
143 ret = of_genpd_add_provider_simple(np, &pd->pd); in exynos_pd_probe()
145 if (ret == 0 && of_parse_phandle_with_args(np, "power-domains", in exynos_pd_probe()
146 "#power-domain-cells", 0, &parent) == 0) { in exynos_pd_probe()
165 .name = "exynos-pd",