Lines Matching refs:acp_base

33 	void __iomem *acp_base;  member
38 static int rn_acp_power_on(void __iomem *acp_base) in rn_acp_power_on() argument
43 val = rn_readl(acp_base + ACP_PGFSM_STATUS); in rn_acp_power_on()
51 acp_base + ACP_PGFSM_CONTROL); in rn_acp_power_on()
54 val = rn_readl(acp_base + ACP_PGFSM_STATUS); in rn_acp_power_on()
62 static int rn_acp_power_off(void __iomem *acp_base) in rn_acp_power_off() argument
68 acp_base + ACP_PGFSM_CONTROL); in rn_acp_power_off()
71 val = rn_readl(acp_base + ACP_PGFSM_STATUS); in rn_acp_power_off()
79 static int rn_acp_reset(void __iomem *acp_base) in rn_acp_reset() argument
84 rn_writel(1, acp_base + ACP_SOFT_RESET); in rn_acp_reset()
87 val = rn_readl(acp_base + ACP_SOFT_RESET); in rn_acp_reset()
92 rn_writel(0, acp_base + ACP_SOFT_RESET); in rn_acp_reset()
95 val = rn_readl(acp_base + ACP_SOFT_RESET); in rn_acp_reset()
103 static void rn_acp_enable_interrupts(void __iomem *acp_base) in rn_acp_enable_interrupts() argument
107 rn_writel(0x01, acp_base + ACP_EXTERNAL_INTR_ENB); in rn_acp_enable_interrupts()
108 ext_intr_ctrl = rn_readl(acp_base + ACP_EXTERNAL_INTR_CNTL); in rn_acp_enable_interrupts()
110 rn_writel(ext_intr_ctrl, acp_base + ACP_EXTERNAL_INTR_CNTL); in rn_acp_enable_interrupts()
113 static void rn_acp_disable_interrupts(void __iomem *acp_base) in rn_acp_disable_interrupts() argument
115 rn_writel(ACP_EXT_INTR_STAT_CLEAR_MASK, acp_base + in rn_acp_disable_interrupts()
117 rn_writel(0x00, acp_base + ACP_EXTERNAL_INTR_ENB); in rn_acp_disable_interrupts()
120 static int rn_acp_init(void __iomem *acp_base) in rn_acp_init() argument
125 ret = rn_acp_power_on(acp_base); in rn_acp_init()
130 rn_writel(0x01, acp_base + ACP_CONTROL); in rn_acp_init()
132 ret = rn_acp_reset(acp_base); in rn_acp_init()
137 rn_writel(0x03, acp_base + ACP_CLKMUX_SEL); in rn_acp_init()
138 rn_acp_enable_interrupts(acp_base); in rn_acp_init()
142 static int rn_acp_deinit(void __iomem *acp_base) in rn_acp_deinit() argument
146 rn_acp_disable_interrupts(acp_base); in rn_acp_deinit()
148 ret = rn_acp_reset(acp_base); in rn_acp_deinit()
153 rn_writel(0x00, acp_base + ACP_CLKMUX_SEL); in rn_acp_deinit()
154 rn_writel(0x00, acp_base + ACP_CONTROL); in rn_acp_deinit()
157 ret = rn_acp_power_off(acp_base); in rn_acp_deinit()
256 adata->acp_base = devm_ioremap(&pci->dev, addr, in snd_rn_acp_probe()
258 if (!adata->acp_base) { in snd_rn_acp_probe()
264 ret = rn_acp_init(adata->acp_base); in snd_rn_acp_probe()
344 if (rn_acp_deinit(adata->acp_base)) in snd_rn_acp_probe()
362 ret = rn_acp_deinit(adata->acp_base); in snd_rn_acp_suspend()
377 ret = rn_acp_init(adata->acp_base); in snd_rn_acp_resume()
402 ret = rn_acp_deinit(adata->acp_base); in snd_rn_acp_remove()