Sheetal Tigadoli | 13680c9 | 2019-12-13 10:39:06 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2020, Broadcom |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <arch_helpers.h> |
| 8 | #include <common/debug.h> |
| 9 | |
| 10 | #include <cmn_plat_util.h> |
| 11 | #include <platform_def.h> |
| 12 | |
| 13 | uint32_t boot_source_get(void) |
| 14 | { |
| 15 | /* For now return BOOT_SOURCE_QSPI */ |
| 16 | return BOOT_SOURCE_QSPI; |
| 17 | } |
| 18 | |
| 19 | void __dead2 plat_soft_reset(uint32_t reset) |
| 20 | { |
| 21 | if (reset == SOFT_RESET_L3) { |
| 22 | mmio_setbits_32(CRMU_IHOST_SW_PERSISTENT_REG1, reset); |
| 23 | mmio_write_32(CRMU_MAIL_BOX0, 0x0); |
| 24 | mmio_write_32(CRMU_MAIL_BOX1, 0xFFFFFFFF); |
| 25 | } |
| 26 | |
| 27 | if (reset != SOFT_SYS_RESET_L1) |
| 28 | reset = SOFT_PWR_UP_RESET_L0; |
| 29 | |
| 30 | if (reset == SOFT_PWR_UP_RESET_L0) |
| 31 | INFO("L0 RESET...\n"); |
| 32 | |
| 33 | if (reset == SOFT_SYS_RESET_L1) |
| 34 | INFO("L1 RESET...\n"); |
| 35 | |
| 36 | console_flush(); |
| 37 | |
| 38 | mmio_clrbits_32(CRMU_SOFT_RESET_CTRL, 1 << reset); |
| 39 | |
| 40 | while (1) { |
| 41 | ; |
| 42 | } |
| 43 | } |