spl.h 697 B

123456789101112131415161718192021222324252627
  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. #include <sunxi_image.h>
  10. #define SPL_ADDR CONFIG_SUNXI_SRAM_ADDRESS
  11. /* The low 8-bits of the 'boot_media' field in the SPL header */
  12. #define SUNXI_BOOTED_FROM_MMC0 0
  13. #define SUNXI_BOOTED_FROM_NAND 1
  14. #define SUNXI_BOOTED_FROM_MMC2 2
  15. #define SUNXI_BOOTED_FROM_SPI 3
  16. #define SUNXI_BOOTED_FROM_MMC0_HIGH 0x10
  17. #define SUNXI_BOOTED_FROM_MMC2_HIGH 0x12
  18. #define is_boot0_magic(addr) (memcmp((void *)addr, BOOT0_MAGIC, 8) == 0)
  19. uint32_t sunxi_get_boot_device(void);
  20. #endif