Hou Zhiqiang | 45684ae | 2016-06-28 20:18:16 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 NXP Semiconductor, Inc. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <asm/psci.h> |
| 9 | #ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT |
| 10 | #include <asm/armv8/sec_firmware.h> |
| 11 | #endif |
| 12 | |
| 13 | int psci_update_dt(void *fdt) |
| 14 | { |
| 15 | #ifdef CONFIG_MP |
macro.wave.z@gmail.com | 2d16a1a | 2016-12-08 11:58:21 +0800 | [diff] [blame] | 16 | #if defined(CONFIG_FSL_PPA_ARMV8_PSCI) |
Hou Zhiqiang | 45684ae | 2016-06-28 20:18:16 +0800 | [diff] [blame] | 17 | #ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT |
| 18 | /* |
| 19 | * If the PSCI in SEC Firmware didn't work, avoid to update the |
| 20 | * device node of PSCI. But still return 0 instead of an error |
| 21 | * number to support detecting PSCI dynamically and then switching |
| 22 | * the SMP boot method between PSCI and spin-table. |
| 23 | */ |
| 24 | if (sec_firmware_support_psci_version() == 0xffffffff) |
| 25 | return 0; |
| 26 | #endif |
| 27 | fdt_psci(fdt); |
| 28 | #endif |
| 29 | #endif |
| 30 | return 0; |
| 31 | } |