Lines Matching refs:mod_num
68 u32 psc_get_domain_num(u32 mod_num) in psc_get_domain_num() argument
73 domain_num = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCFG(mod_num)); in psc_get_domain_num()
93 int psc_set_state(u32 mod_num, u32 state) in psc_set_state() argument
106 v = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCFG(mod_num)); in psc_set_state()
130 mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_set_state()
133 __raw_writel(mdctl, KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_set_state()
155 int psc_enable_module(u32 mod_num) in psc_enable_module() argument
160 mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_enable_module()
164 return psc_set_state(mod_num, PSC_REG_VAL_MDCTL_NEXT_ON); in psc_enable_module()
173 int psc_disable_module(u32 mod_num) in psc_disable_module() argument
178 mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_disable_module()
182 __raw_writel(mdctl, KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_disable_module()
184 return psc_set_state(mod_num, PSC_REG_VAL_MDCTL_NEXT_SWRSTDISABLE); in psc_disable_module()
198 int psc_set_reset_iso(u32 mod_num) in psc_set_reset_iso() argument
204 mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_set_reset_iso()
206 __raw_writel(mdctl, KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_set_reset_iso()
208 v = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCFG(mod_num)); in psc_set_reset_iso()
246 int psc_module_keep_in_reset_enabled(u32 mod_num, bool gate_clocks) in psc_module_keep_in_reset_enabled() argument
250 int domain_num = psc_get_domain_num(mod_num); in psc_module_keep_in_reset_enabled()
255 mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_module_keep_in_reset_enabled()
259 __raw_writel(mdctl, KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_module_keep_in_reset_enabled()
265 mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_module_keep_in_reset_enabled()
269 __raw_writel(mdctl, KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_module_keep_in_reset_enabled()
276 mdstat = __raw_readl(KS2_PSC_BASE + PSC_REG_MDSTAT(mod_num)); in psc_module_keep_in_reset_enabled()
278 mdstat = __raw_readl(KS2_PSC_BASE + PSC_REG_MDSTAT(mod_num)); in psc_module_keep_in_reset_enabled()
304 int psc_module_release_from_reset(u32 mod_num) in psc_module_release_from_reset() argument
307 int domain_num = psc_get_domain_num(mod_num); in psc_module_release_from_reset()
312 mdctl = __raw_readl(KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_module_release_from_reset()
316 __raw_writel(mdctl, KS2_PSC_BASE + PSC_REG_MDCTL(mod_num)); in psc_module_release_from_reset()
320 mdstat = __raw_readl(KS2_PSC_BASE + PSC_REG_MDSTAT(mod_num)); in psc_module_release_from_reset()
322 mdstat = __raw_readl(KS2_PSC_BASE + PSC_REG_MDSTAT(mod_num)); in psc_module_release_from_reset()