| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <device/mmio.h> |
| 4 | #include <reset.h> |
| 5 | |
| 6 | #define GCNT_PSHOLD ((void *)0x004AB000u) |
| 7 | #define TCSR_BOOT_MISC_DETECT ((void *)0x0193D100) |
| 8 | #define TCSR_RESET_DEBUG_SW_ENTRY ((void *)0x01940000) |
| 9 | |
| 10 | void do_board_reset(void) |
| 11 | { |
| 12 | /* |
| 13 | * At boot time the boot loaders would have set a magic cookie |
| 14 | * here to detect watchdog reset. However, since this is a |
| 15 | * normal reset clear the magic numbers. |
| 16 | */ |
| 17 | write32(TCSR_BOOT_MISC_DETECT, 0); |
| 18 | write32(TCSR_RESET_DEBUG_SW_ENTRY, 0); |
| 19 | write32(GCNT_PSHOLD, 0); |
| 20 | } |