aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/arch/arm/include/asm/arch-sunxi/spl.h
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/arch/arm/include/asm/arch-sunxi/spl.h
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/arch/arm/include/asm/arch-sunxi/spl.h')
-rw-r--r--roms/u-boot/arch/arm/include/asm/arch-sunxi/spl.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/include/asm/arch-sunxi/spl.h b/roms/u-boot/arch/arm/include/asm/arch-sunxi/spl.h
new file mode 100644
index 000000000..58cdf806d
--- /dev/null
+++ b/roms/u-boot/arch/arm/include/asm/arch-sunxi/spl.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2007-2011
+ * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
+ * Tom Cubie <tangliang@allwinnertech.com>
+ */
+#ifndef _ASM_ARCH_SPL_H_
+#define _ASM_ARCH_SPL_H_
+
+#include <sunxi_image.h>
+
+#define SPL_ADDR CONFIG_SUNXI_SRAM_ADDRESS
+
+/* The low 8-bits of the 'boot_media' field in the SPL header */
+#define SUNXI_BOOTED_FROM_MMC0 0
+#define SUNXI_BOOTED_FROM_NAND 1
+#define SUNXI_BOOTED_FROM_MMC2 2
+#define SUNXI_BOOTED_FROM_SPI 3
+#define SUNXI_BOOTED_FROM_MMC0_HIGH 0x10
+#define SUNXI_BOOTED_FROM_MMC2_HIGH 0x12
+
+#define is_boot0_magic(addr) (memcmp((void *)(addr), BOOT0_MAGIC, 8) == 0)
+
+uint32_t sunxi_get_boot_device(void);
+
+#endif