Andrei Narkevitch | b0be461 | 2020-01-27 17:26:19 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019-2020, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "target_cfg.h" |
| 9 | #include "cmsis.h" |
| 10 | #include "Driver_Flash.h" |
| 11 | #include "flash_layout.h" |
| 12 | |
| 13 | /* Flash device name must be specified by target */ |
| 14 | extern ARM_DRIVER_FLASH FLASH_DEV_NAME; |
| 15 | |
| 16 | /* bootloader platform-specific hw initialization */ |
| 17 | __WEAK int32_t boot_platform_init(void) |
| 18 | { |
| 19 | int32_t result; |
| 20 | |
| 21 | result = FLASH_DEV_NAME.Initialize(NULL); |
| 22 | if (result == ARM_DRIVER_OK) { |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | return 1; |
| 27 | } |