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 #define is_boot0_magic(addr) (memcmp((void *)(addr), BOOT0_MAGIC, 8) == 0) 23 24 uint32_t sunxi_get_boot_device(void); 25 26 #endif 27