Lines Matching +full:event +full:- +full:deep

1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (c) 2006-2007 Freescale Semiconductor, Inc.
47 u32 event; member
49 /* All but PMCI are deep-sleep only */
61 /* deep-sleep only */
68 /* deep-sleep only */
123 u32 reg_cfg1 = in_be32(&pmc_regs->config1); in mpc83xx_change_state()
133 out_be32(&pmc_regs->config1, reg_cfg1); in mpc83xx_change_state()
145 u32 event = in_be32(&pmc_regs->event); in pmc_irq_handler() local
151 if (event) { in pmc_irq_handler()
152 out_be32(&pmc_regs->event, event); in pmc_irq_handler()
161 out_be32(&syscr_regs->sicrl, saved_regs.sicrl); in mpc83xx_suspend_restore_regs()
162 out_be32(&syscr_regs->sicrh, saved_regs.sicrh); in mpc83xx_suspend_restore_regs()
163 out_be32(&clock_regs->sccr, saved_regs.sccr); in mpc83xx_suspend_restore_regs()
168 saved_regs.sicrl = in_be32(&syscr_regs->sicrl); in mpc83xx_suspend_save_regs()
169 saved_regs.sicrh = in_be32(&syscr_regs->sicrh); in mpc83xx_suspend_save_regs()
170 saved_regs.sccr = in_be32(&clock_regs->sccr); in mpc83xx_suspend_save_regs()
175 int ret = -EAGAIN; in mpc83xx_suspend_enter()
185 out_be32(&pmc_regs->config1, in mpc83xx_suspend_enter()
186 in_be32(&pmc_regs->config1) | PMCCR1_PME_EN); in mpc83xx_suspend_enter()
189 /* Put the system into low-power mode and the RAM in mpc83xx_suspend_enter()
190 * into self-refresh mode once the core goes to in mpc83xx_suspend_enter()
194 out_be32(&pmc_regs->config, PMCCR_SLPEN | PMCCR_DLPEN); in mpc83xx_suspend_enter()
196 /* If it has deep sleep (i.e. it's an 831x or compatible), in mpc83xx_suspend_enter()
198 * require going through the boot firmware upon a wakeup event. in mpc83xx_suspend_enter()
204 out_be32(&pmc_regs->mask, PMCER_ALL); in mpc83xx_suspend_enter()
206 out_be32(&pmc_regs->config1, in mpc83xx_suspend_enter()
207 in_be32(&pmc_regs->config1) | PMCCR1_POWER_OFF); in mpc83xx_suspend_enter()
213 out_be32(&pmc_regs->config1, in mpc83xx_suspend_enter()
214 in_be32(&pmc_regs->config1) & ~PMCCR1_POWER_OFF); in mpc83xx_suspend_enter()
216 out_be32(&pmc_regs->mask, PMCER_PMCI); in mpc83xx_suspend_enter()
220 out_be32(&pmc_regs->mask, PMCER_PMCI); in mpc83xx_suspend_enter()
228 out_be32(&pmc_regs->config1, in mpc83xx_suspend_enter()
229 in_be32(&pmc_regs->config1) & ~PMCCR1_PME_EN); in mpc83xx_suspend_enter()
258 return -EINVAL; in mpc83xx_suspend_begin()
272 * a userspace-driven suspend request. It's probably best in agent_thread_fn()
291 out_be32(&pmc_regs->config1, PMCCR1_USE_STATE); in mpc83xx_set_agent()
292 out_be32(&pmc_regs->mask, PMCER_PMCI); in mpc83xx_set_agent()
306 return -ENOMEM; in mpc83xx_is_pci_agent()
308 ret = !(in_be32(&rcw_regs->rcwhr) & RCW_PCI_HOST); in mpc83xx_is_pci_agent()
332 .compatible = "fsl,mpc8313-pmc",
336 .compatible = "fsl,mpc8349-pmc",
344 struct device_node *np = ofdev->dev.of_node; in pmc_probe()
349 type = of_device_get_match_data(&ofdev->dev); in pmc_probe()
351 return -EINVAL; in pmc_probe()
354 return -ENODEV; in pmc_probe()
356 has_deep_sleep = type->has_deep_sleep; in pmc_probe()
365 return -ENODEV; in pmc_probe()
373 return -EBUSY; in pmc_probe()
379 ret = -ENOMEM; in pmc_probe()
385 ret = -ENODEV; in pmc_probe()
392 ret = -ENOMEM; in pmc_probe()
400 ret = -ENOMEM; in pmc_probe()
424 .name = "mpc83xx-pmc",