Lines Matching refs:pwrc
24 struct meson_secure_pwrc *pwrc; member
49 if (meson_sm_call(pwrc_domain->pwrc->fw, SM_A1_PWRC_GET, &is_off, in pwrc_secure_is_off()
62 if (meson_sm_call(pwrc_domain->pwrc->fw, SM_A1_PWRC_SET, NULL, in meson_secure_pwrc_off()
77 if (meson_sm_call(pwrc_domain->pwrc->fw, SM_A1_PWRC_SET, NULL, in meson_secure_pwrc_on()
126 struct meson_secure_pwrc *pwrc; in meson_secure_pwrc_probe() local
141 pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL); in meson_secure_pwrc_probe()
142 if (!pwrc) in meson_secure_pwrc_probe()
145 pwrc->fw = meson_sm_get(sm_np); in meson_secure_pwrc_probe()
147 if (!pwrc->fw) in meson_secure_pwrc_probe()
150 pwrc->xlate.domains = devm_kcalloc(&pdev->dev, match->count, in meson_secure_pwrc_probe()
151 sizeof(*pwrc->xlate.domains), in meson_secure_pwrc_probe()
153 if (!pwrc->xlate.domains) in meson_secure_pwrc_probe()
156 pwrc->domains = devm_kcalloc(&pdev->dev, match->count, in meson_secure_pwrc_probe()
157 sizeof(*pwrc->domains), GFP_KERNEL); in meson_secure_pwrc_probe()
158 if (!pwrc->domains) in meson_secure_pwrc_probe()
161 pwrc->xlate.num_domains = match->count; in meson_secure_pwrc_probe()
162 platform_set_drvdata(pdev, pwrc); in meson_secure_pwrc_probe()
165 struct meson_secure_pwrc_domain *dom = &pwrc->domains[i]; in meson_secure_pwrc_probe()
170 dom->pwrc = pwrc; in meson_secure_pwrc_probe()
179 pwrc->xlate.domains[i] = &dom->base; in meson_secure_pwrc_probe()
182 return of_genpd_add_provider_onecell(pdev->dev.of_node, &pwrc->xlate); in meson_secure_pwrc_probe()