1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * (C) Copyright 2007-2011 4 * Allwinner Technology Co., Ltd. <www.allwinnertech.com> 5 * Tom Cubie <tangliang@allwinnertech.com> 6 */ 7 #ifndef _ASM_ARCH_SPL_H_ 8 #define _ASM_ARCH_SPL_H_ 9 10 #include <sunxi_image.h> 11 12 #define SPL_ADDR CONFIG_SUNXI_SRAM_ADDRESS 13 14 /* The low 8-bits of the 'boot_media' field in the SPL header */ 15 #define SUNXI_BOOTED_FROM_MMC0 0 16 #define SUNXI_BOOTED_FROM_NAND 1 17 #define SUNXI_BOOTED_FROM_MMC2 2 18 #define SUNXI_BOOTED_FROM_SPI 3 19 #define SUNXI_BOOTED_FROM_MMC0_HIGH 0x10 20 #define SUNXI_BOOTED_FROM_MMC2_HIGH 0x12 21 22 /* 23 * Values taken from the F1C200s BootROM stack 24 * to determine where we booted from. 25 */ 26 #define SUNIV_BOOTED_FROM_MMC0 0xffff40f8 27 #define SUNIV_BOOTED_FROM_NAND 0xffff4114 28 #define SUNIV_BOOTED_FROM_SPI 0xffff4130 29 #define SUNIV_BOOTED_FROM_MMC1 0xffff4150 30 31 uint32_t sunxi_get_boot_device(void); 32 uint32_t sunxi_get_spl_size(void); 33 34 #endif 35