1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2016 Broadcom Corporation
7 #include <asm/regdef.h>
8 #include <asm/mipsregs.h>
19 * a0: AON_CTRL base register
20 * a1: D-Cache line size
24 /* Get the address of s3_context */
43 /* Write-back gp registers - cache will be gone */
48 /* Flush at least 64 bytes */
56 /* Drop to deep standby */
58 sw zero, AON_CTRL_PM_CTRL(a0)
59 lw zero, AON_CTRL_PM_CTRL(a0)
60 sw t1, AON_CTRL_PM_CTRL(a0)
61 lw t1, AON_CTRL_PM_CTRL(a0)
63 li t1, (PM_WARM_CONFIG | PM_PWR_DOWN)
64 sw t1, AON_CTRL_PM_CTRL(a0)
65 lw t1, AON_CTRL_PM_CTRL(a0)
67 /* Enable CP0 interrupt 2 and wait for interrupt */
70 li t1, ~(ST0_IM | ST0_IE)
80 /* Wait for interrupt */
86 /* Clear call/return stack */
93 /* Clear jump target buffer */
103 /* Setup mmu defaults */
105 mtc0 zero, CP0_ENTRYHI
106 li k0, PM_DEFAULT_MASK
107 mtc0 k0, CP0_PAGEMASK
109 li sp, BMIPS_WARM_RESTART_VEC
110 la k0, plat_wired_tlb_setup
114 /* Restore general purpose registers */
129 /* Restore CP0 status */
133 /* Return to caller */