diff options
author | Stefano Babic <sbabic@denx.de> | 2016-12-16 09:53:52 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-12-16 09:53:52 +0100 |
commit | f2465934b46235287e07473fa4919035ba1a2b68 (patch) | |
tree | ce6d4480a31d592dfee52222b620329a9c75b055 /arch/arm/mach-socfpga | |
parent | 51efabac487d832632f9797a94ed2ba6fe98e718 (diff) | |
parent | 53e8ca22538c2cec691fe74098684a359302688c (diff) |
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'arch/arm/mach-socfpga')
-rw-r--r-- | arch/arm/mach-socfpga/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-socfpga/include/mach/boot0.h | 28 | ||||
-rwxr-xr-x | arch/arm/mach-socfpga/qts-filter.sh | 47 |
3 files changed, 67 insertions, 15 deletions
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig index d91b8bbceb..6991af8775 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig @@ -74,6 +74,10 @@ config TARGET_SOCFPGA_TERASIC_DE0_NANO bool "Terasic DE0-Nano-Atlas (Cyclone V)" select TARGET_SOCFPGA_CYCLONE5 +config TARGET_SOCFPGA_TERASIC_DE1_SOC + bool "Terasic DE1-SoC (Cyclone V)" + select TARGET_SOCFPGA_CYCLONE5 + config TARGET_SOCFPGA_TERASIC_SOCKIT bool "Terasic SoCkit (Cyclone V)" select TARGET_SOCFPGA_CYCLONE5 @@ -84,6 +88,7 @@ config SYS_BOARD default "arria5-socdk" if TARGET_SOCFPGA_ARRIA5_SOCDK default "cyclone5-socdk" if TARGET_SOCFPGA_CYCLONE5_SOCDK default "de0-nano-soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO + default "de1-soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC default "is1" if TARGET_SOCFPGA_IS1 default "mcvevk" if TARGET_SOCFPGA_DENX_MCVEVK default "sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT @@ -98,6 +103,7 @@ config SYS_VENDOR default "ebv" if TARGET_SOCFPGA_EBV_SOCRATES default "samtec" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA default "terasic" if TARGET_SOCFPGA_TERASIC_DE0_NANO + default "terasic" if TARGET_SOCFPGA_TERASIC_DE1_SOC default "terasic" if TARGET_SOCFPGA_TERASIC_SOCKIT config SYS_SOC @@ -107,6 +113,7 @@ config SYS_CONFIG_NAME default "socfpga_arria5_socdk" if TARGET_SOCFPGA_ARRIA5_SOCDK default "socfpga_cyclone5_socdk" if TARGET_SOCFPGA_CYCLONE5_SOCDK default "socfpga_de0_nano_soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO + default "socfpga_de1_soc" if TARGET_SOCFPGA_TERASIC_DE1_SOC default "socfpga_is1" if TARGET_SOCFPGA_IS1 default "socfpga_mcvevk" if TARGET_SOCFPGA_DENX_MCVEVK default "socfpga_sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT 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 0000000000..aaada31286 --- /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 */ diff --git a/arch/arm/mach-socfpga/qts-filter.sh b/arch/arm/mach-socfpga/qts-filter.sh index 1148a71311..785a0d5ea2 100755 --- a/arch/arm/mach-socfpga/qts-filter.sh +++ b/arch/arm/mach-socfpga/qts-filter.sh @@ -1,6 +1,14 @@ #!/bin/sh # +# helper function to convert from DOS to Unix, if necessary, and handle +# lines ending in '\'. +# +fix_newlines_in_macros() { + sed -n ':next;s/\r$//;/[^\\]\\$/ {N;s/\\\n//;b next};p' $1 +} + +# # Process iocsr_config_*.[ch] # $1: SoC type # $2: Input handoff directory @@ -27,14 +35,16 @@ process_iocsr_config() { EOF # Retrieve the scan chain lengths - grep 'CONFIG_HPS_IOCSR_SCANCHAIN[0-9]\+_LENGTH' \ - ${in_bsp_dir}/generated/iocsr_config_${soc}.h | tr -d "()" + fix_newlines_in_macros \ + ${in_bsp_dir}/generated/iocsr_config_${soc}.h | + grep 'CONFIG_HPS_IOCSR_SCANCHAIN[0-9]\+_LENGTH' | tr -d "()" echo "" # Retrieve the scan chain config and zap the ad-hoc length encoding - sed -n '/^const/ !b; :next {/^const/ s/(.*)//;p;n;b next}' \ - ${in_bsp_dir}/generated/iocsr_config_${soc}.c + fix_newlines_in_macros \ + ${in_bsp_dir}/generated/iocsr_config_${soc}.c | + sed -n '/^const/ !b; :next {/^const/ s/(.*)//;p;n;b next}' cat << EOF @@ -69,8 +79,9 @@ process_pinmux_config() { EOF # Retrieve the pinmux config and zap the ad-hoc length encoding - sed -n '/^unsigned/ !b; :next {/^unsigned/ {s/\[.*\]/[]/;s/unsigned long/const u8/};p;n;b next}' \ - ${in_bsp_dir}/generated/pinmux_config_${soc}.c + fix_newlines_in_macros \ + ${in_bsp_dir}/generated/pinmux_config_${soc}.c | + sed -n '/^unsigned/ !b; :next {/^unsigned/ {s/\[.*\]/[]/;s/unsigned long/const u8/};p;n;b next}' cat << EOF @@ -105,8 +116,9 @@ process_pll_config() { EOF # Retrieve the pll config and zap parenthesis - sed -n '/CONFIG_HPS/ !b; :next {/CONFIG_HPS/ s/[()]//g;/endif/ b;p;n;b next}' \ - ${in_bsp_dir}/generated/pll_config.h + fix_newlines_in_macros \ + ${in_bsp_dir}/generated/pll_config.h | + sed -n '/CONFIG_HPS/ !b; :next {/CONFIG_HPS/ s/[()]//g;/endif/ b;p;n;b next}' cat << EOF @@ -149,32 +161,37 @@ EOF echo "/* SDRAM configuration */" # Retrieve the sdram config, zap broken lines and zap parenthesis - sed -n "/\\\\$/ {N;s/ \\\\\n/\t/};p" \ + fix_newlines_in_macros \ ${in_bsp_dir}/generated/sdram/sdram_config.h | + sed -n "/\\\\$/ {N;s/ \\\\\n/\t/};p" | sed -n '/CONFIG_HPS/ !b; :next {/CONFIG_HPS/ s/[()]//g;/endif/ b;p;n;b next}' | sort -u | grep_sdram_config echo "" echo "/* Sequencer auto configuration */" - sed -n "/__RW_MGR/ {s/__//;s/ \+\([^ ]\+\)$/\t\1/p}" \ + fix_newlines_in_macros \ ${in_qts_dir}/hps_isw_handoff/*/sequencer_auto.h | + sed -n "/__RW_MGR/ {s/__//;s/ \+\([^ ]\+\)$/\t\1/p}" | sort -u | grep_sdram_config echo "" echo "/* Sequencer defines configuration */" - sed -n "/^#define [^_]/ {s/__//;s/ \+\([^ ]\+\)$/\t\1/p}" \ + fix_newlines_in_macros \ ${in_qts_dir}/hps_isw_handoff/*/sequencer_defines.h | + sed -n "/^#define [^_]/ {s/__//;s/ \+\([^ ]\+\)$/\t\1/p}" | sort -u | grep_sdram_config echo "" echo "/* Sequencer ac_rom_init configuration */" - sed -n '/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}'\ - ${in_qts_dir}/hps_isw_handoff/*/sequencer_auto_ac_init.c + fix_newlines_in_macros \ + ${in_qts_dir}/hps_isw_handoff/*/sequencer_auto_ac_init.c | + sed -n '/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}' echo "" echo "/* Sequencer inst_rom_init configuration */" - sed -n '/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}'\ - ${in_qts_dir}/hps_isw_handoff/*/sequencer_auto_inst_init.c + fix_newlines_in_macros \ + ${in_qts_dir}/hps_isw_handoff/*/sequencer_auto_inst_init.c | + sed -n '/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}' cat << EOF |