diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-socfpga/include/mach/boot0.h | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index de4bf832b9c..7203d63d2ad 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -542,6 +542,7 @@ config ARCH_SOCFPGA select DM select DM_SPI_FLASH select DM_SPI + select ENABLE_ARM_SOC_BOOT0_HOOK config TARGET_CM_T43 bool "Support cm_t43" diff --git a/arch/arm/mach-socfpga/include/mach/boot0.h b/arch/arm/mach-socfpga/include/mach/boot0.h new file mode 100644 index 00000000000..aaada312860 --- /dev/null +++ b/arch/arm/mach-socfpga/include/mach/boot0.h @@ -0,0 +1,28 @@ +/* + * Specialty padding for the Altera SoCFPGA preloader image + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __BOOT0_H +#define __BOOT0_H + +#ifdef CONFIG_SPL_BUILD +#define ARM_SOC_BOOT0_HOOK \ + .balignl 64,0xf33db33f; \ + \ + .word 0x1337c0d3; /* SoCFPGA preloader validation word */ \ + .word 0xc01df00d; /* Version, flags, length */ \ + .word 0xcafec0d3; /* Checksum, zero-pad */ \ + nop; \ + \ + b reset; /* SoCFPGA jumps here */ \ + nop; \ + nop; \ + nop; +#else +#define ARM_SOC_BOOT0_HOOK +#endif + + +#endif /* __BOOT0_H */ |