Lines Matching refs:acp_base
24 static int acp63_power_on(void __iomem *acp_base) in acp63_power_on() argument
28 val = readl(acp_base + ACP_PGFSM_STATUS); in acp63_power_on()
34 writel(ACP_PGFSM_CNTL_POWER_ON_MASK, acp_base + ACP_PGFSM_CONTROL); in acp63_power_on()
36 return readl_poll_timeout(acp_base + ACP_PGFSM_STATUS, val, !val, DELAY_US, ACP_TIMEOUT); in acp63_power_on()
39 static int acp63_reset(void __iomem *acp_base) in acp63_reset() argument
44 writel(1, acp_base + ACP_SOFT_RESET); in acp63_reset()
46 ret = readl_poll_timeout(acp_base + ACP_SOFT_RESET, val, in acp63_reset()
52 writel(0, acp_base + ACP_SOFT_RESET); in acp63_reset()
54 return readl_poll_timeout(acp_base + ACP_SOFT_RESET, val, !val, DELAY_US, ACP_TIMEOUT); in acp63_reset()
57 static void acp63_enable_interrupts(void __iomem *acp_base) in acp63_enable_interrupts() argument
59 writel(1, acp_base + ACP_EXTERNAL_INTR_ENB); in acp63_enable_interrupts()
60 writel(ACP_ERROR_IRQ, acp_base + ACP_EXTERNAL_INTR_CNTL); in acp63_enable_interrupts()
63 static void acp63_disable_interrupts(void __iomem *acp_base) in acp63_disable_interrupts() argument
65 writel(ACP_EXT_INTR_STAT_CLEAR_MASK, acp_base + ACP_EXTERNAL_INTR_STAT); in acp63_disable_interrupts()
66 writel(0, acp_base + ACP_EXTERNAL_INTR_CNTL); in acp63_disable_interrupts()
67 writel(0, acp_base + ACP_EXTERNAL_INTR_ENB); in acp63_disable_interrupts()
70 static int acp63_init(void __iomem *acp_base, struct device *dev) in acp63_init() argument
74 ret = acp63_power_on(acp_base); in acp63_init()
79 writel(0x01, acp_base + ACP_CONTROL); in acp63_init()
80 ret = acp63_reset(acp_base); in acp63_init()
85 acp63_enable_interrupts(acp_base); in acp63_init()
89 static int acp63_deinit(void __iomem *acp_base, struct device *dev) in acp63_deinit() argument
93 acp63_disable_interrupts(acp_base); in acp63_deinit()
94 ret = acp63_reset(acp_base); in acp63_deinit()
99 writel(0, acp_base + ACP_CONTROL); in acp63_deinit()