Lines Matching refs:pwrc
14 #include <dt-bindings/power/amlogic,c3-pwrc.h>
26 struct meson_secure_pwrc *pwrc;
51 if (meson_sm_call(pwrc_domain->pwrc->fw, SM_A1_PWRC_GET, &is_off,
64 if (meson_sm_call(pwrc_domain->pwrc->fw, SM_A1_PWRC_SET, NULL,
79 if (meson_sm_call(pwrc_domain->pwrc->fw, SM_A1_PWRC_SET, NULL,
156 struct meson_secure_pwrc *pwrc;
171 pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL);
172 if (!pwrc) {
177 pwrc->fw = meson_sm_get(sm_np);
179 if (!pwrc->fw)
182 pwrc->xlate.domains = devm_kcalloc(&pdev->dev, match->count,
183 sizeof(*pwrc->xlate.domains),
185 if (!pwrc->xlate.domains)
188 pwrc->domains = devm_kcalloc(&pdev->dev, match->count,
189 sizeof(*pwrc->domains), GFP_KERNEL);
190 if (!pwrc->domains)
193 pwrc->xlate.num_domains = match->count;
194 platform_set_drvdata(pdev, pwrc);
197 struct meson_secure_pwrc_domain *dom = &pwrc->domains[i];
202 dom->pwrc = pwrc;
211 pwrc->xlate.domains[i] = &dom->base;
214 return of_genpd_add_provider_onecell(pdev->dev.of_node, &pwrc->xlate);
234 .compatible = "amlogic,meson-a1-pwrc",
238 .compatible = "amlogic,c3-pwrc",
242 .compatible = "amlogic,meson-s4-pwrc",