| 1 |
/* |
| 2 |
* Copyright (c) 2016 - 2020, Broadcom |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: BSD-3-Clause |
| 5 |
*/ |
| 6 |
|
| 7 |
#include <stdint.h> |
| 8 |
|
| 9 |
#include <arch_helpers.h> |
| 10 |
#include <common/debug.h> |
| 11 |
#include <drivers/console.h> |
| 12 |
#include <lib/mmio.h> |
| 13 |
|
| 14 |
#include <platform_def.h> |
| 15 |
|
| 16 |
#define L0_RESET 0x2 |
| 17 |
|
| 18 |
/* |
| 19 |
* Brcm error handler |
| 20 |
*/ |
| 21 |
void plat_error_handler(int err) |
| 22 |
{ |
| 23 |
INFO("L0 reset...\n"); |
| 24 |
|
| 25 |
/* Ensure the characters are flushed out */ |
| 26 |
console_flush(); |
| 27 |
|
| 28 |
mmio_write_32(CRMU_SOFT_RESET_CTRL, L0_RESET); |
| 29 |
|
| 30 |
/* |
| 31 |
* In case we get here: |
| 32 |
* Loop until the watchdog resets the system |
| 33 |
*/ |
| 34 |
while (1) { |
| 35 |
wfi(); |
| 36 |
} |
| 37 |
} |