Heiko Stübner | 5c43acb | 2017-02-18 19:46:26 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2017 Heiko Stuebner <heiko@sntech.de> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0 |
| 5 | */ |
| 6 | |
| 7 | #ifndef _ASM_ARCH_BOOTROM_H |
| 8 | #define _ASM_ARCH_BOOTROM_H |
| 9 | |
| 10 | /* |
| 11 | * Saved Stack pointer address. |
| 12 | * Access might be needed in some special cases. |
| 13 | */ |
| 14 | extern u32 SAVE_SP_ADDR; |
| 15 | |
Simon Glass | ef0ab85 | 2017-04-15 13:11:31 -0600 | [diff] [blame] | 16 | /** |
Heiko Stübner | 5c43acb | 2017-02-18 19:46:26 +0100 | [diff] [blame] | 17 | * Hand control back to the bootrom to load another |
| 18 | * boot stage. |
| 19 | */ |
Simon Glass | ef0ab85 | 2017-04-15 13:11:31 -0600 | [diff] [blame] | 20 | void back_to_bootrom(void); |
| 21 | |
| 22 | /** |
| 23 | * Assembler component for the above (do not call this directly) |
| 24 | */ |
| 25 | void _back_to_bootrom_s(void); |
Heiko Stübner | 5c43acb | 2017-02-18 19:46:26 +0100 | [diff] [blame] | 26 | |
Philipp Tomsich | 1cd4e12 | 2017-09-29 19:27:55 +0200 | [diff] [blame^] | 27 | /** |
| 28 | * Boot-device identifiers as used by the BROM |
| 29 | */ |
| 30 | enum { |
| 31 | BROM_BOOTSOURCE_NAND = 1, |
| 32 | BROM_BOOTSOURCE_EMMC = 2, |
| 33 | BROM_BOOTSOURCE_SPINOR = 3, |
| 34 | BROM_BOOTSOURCE_SPINAND = 4, |
| 35 | BROM_BOOTSOURCE_SD = 5, |
| 36 | BROM_BOOTSOURCE_USB = 10, |
| 37 | BROM_LAST_BOOTSOURCE = BROM_BOOTSOURCE_USB |
| 38 | }; |
| 39 | |
| 40 | /** |
| 41 | * Locations of the boot-device identifier in SRAM |
| 42 | */ |
| 43 | #define RK3399_BROM_BOOTSOURCE_ID_ADDR 0xff8c0010 |
| 44 | |
Heiko Stübner | 5c43acb | 2017-02-18 19:46:26 +0100 | [diff] [blame] | 45 | #endif |