From e4c99234f76e02cf79b0f29cf0b7d261a75bf68b Mon Sep 17 00:00:00 2001 From: Jagannadha Sutradharudu Teki Date: Wed, 30 Jan 2013 12:48:40 +0530 Subject: [PATCH] zynq: Removed Xilinx Boot ROM header support Xilinx Boot ROM header support in u-boot is used on ep107 boards for testing XIP images. This support is removed, as current u-boot is not supporting ep107 boards and the current zynq boards are not using/testing XIP as of now. Removed. - CONFIG_ZYNQ_XILINX_FLASH_HEADER references - xromhdr.pl Signed-off-by: Jagannadha Sutradharudu Teki --- arch/arm/cpu/armv7/start.S | 35 ----------- include/configs/zynq_afx.h | 6 -- include/configs/zynq_cseflash.h | 4 -- include/configs/zynq_zc770.h | 6 -- xromhdr.pl | 105 -------------------------------- 5 files changed, 156 deletions(-) delete mode 100755 xromhdr.pl diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 8349d7db4c5..dcc1f831bc8 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -44,41 +44,6 @@ _start: b reset ldr pc, _not_used ldr pc, _irq ldr pc, _fiq -#ifdef CONFIG_ZYNQ_XILINX_FLASH_HEADER -#if !defined(CONFIG_ZYNQ_XIP_START) || CONFIG_ZYNQ_XIP_START == 0 -#error CONFIG_ZYNQ_XIP_START must be defined for CONFIG_ZYNQ_XILINX_FLASH_HEADER -#else -/* These fields MUST immediately follow the vectors */ -#define HDR_20 0xAA995566 -#define HDR_24 0x584C4E58 -#define HDR_28 0x00000000 -#define HDR_2C 0x544F4F42 -#define HDR_30 0x00000120 -#define HDR_34 0x00000000 -#define HDR_38 0x00000000 -#define HDR_3C CONFIG_ZYNQ_XIP_START -#define HDR_40 0x00000000 -#define HDR_44 0x00000001 -#define HDR_CSUM (~(HDR_20+HDR_24+HDR_28+HDR_2C+HDR_30+HDR_34+HDR_38+HDR_3C+HDR_40+HDR_44)) - -.word HDR_20 /* 0xaa995566 required for sizing of the FLASH */ -.word HDR_24 /* signature 0x584C4E58 identifies the format of the image */ -.word HDR_28 /* 0xA5C3C5A3 for encrypted images */ -.word HDR_2C /* UserData can be anything */ -.word HDR_30 /* LoadStart offset into FLASH where image starts */ -.word HDR_34 /* LoadLength length of image in bytes */ -.word HDR_38 /* DestinationAddress where in OCM the image is to be written to */ -.word HDR_3C /* ImageStartAddress where to jump to at handoff (_start) */ -.word HDR_40 /* TotalImageLength - should be the same for unencrypted images */ -.word HDR_44 /* QSPIConfigWord x1 device */ -.word HDR_CSUM /* checksum - 0x20 - 0x44, complement */ -.word 0,0,0,0,0,0,0,0 -.word 0,0,0,0,0,0,0,0 -.word 0,0,0,0,0 -.word 0xFFFFFFFF /* 0xA0 */ -.word 0x00000000 -#endif -#endif #ifdef CONFIG_SPL_BUILD _undefined_instruction: .word _undefined_instruction _software_interrupt: .word _software_interrupt diff --git a/include/configs/zynq_afx.h b/include/configs/zynq_afx.h index 6fb4de4a44c..7339fbc552b 100644 --- a/include/configs/zynq_afx.h +++ b/include/configs/zynq_afx.h @@ -33,10 +33,4 @@ #include -/* Place a Xilinx Boot ROM header in u-boot image? */ -#if defined(CONFIG_AFX_QSPI) -#define CONFIG_ZYNQ_XILINX_FLASH_HEADER -#define CONFIG_ZYNQ_XIP_START XPSS_QSPI_LIN_BASEADDR -#endif - #endif /* __CONFIG_ZYNQ_AFX_H */ diff --git a/include/configs/zynq_cseflash.h b/include/configs/zynq_cseflash.h index 64ed499d47e..495530e8f82 100644 --- a/include/configs/zynq_cseflash.h +++ b/include/configs/zynq_cseflash.h @@ -70,8 +70,4 @@ #undef CONFIG_ENV_SIZE #define CONFIG_ENV_SIZE 896 -/* Place a Xilinx Boot ROM header in u-boot image? */ -#define CONFIG_ZYNQ_XILINX_FLASH_HEADER -#define CONFIG_ZYNQ_XIP_START CONFIG_SYS_FLASH_BASE - #endif /* __CONFIG_H */ diff --git a/include/configs/zynq_zc770.h b/include/configs/zynq_zc770.h index dab27ae2b02..3bfe6318e62 100644 --- a/include/configs/zynq_zc770.h +++ b/include/configs/zynq_zc770.h @@ -49,10 +49,4 @@ #include -/* Place a Xilinx Boot ROM header in u-boot image? */ -#if defined(CONFIG_ZC770_XM010) -#define CONFIG_ZYNQ_XILINX_FLASH_HEADER -#define CONFIG_ZYNQ_XIP_START XPSS_QSPI_LIN_BASEADDR -#endif - #endif /* __CONFIG_ZYNQ_ZC770_H */ diff --git a/xromhdr.pl b/xromhdr.pl deleted file mode 100755 index 3c87e26d580..00000000000 --- a/xromhdr.pl +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/perl - -use File::Basename; - -print "Xilinx Boot ROM header generator 1.0\n"; -if ($#ARGV != 1) { - print "Example usage:\n"; - print "$0 u-boot.bin NOR\n"; - print "$0 u-boot.bin QSPI\n"; - exit (1); -} - -$hdr_type = "NONE"; -if ($ARGV[1] eq "NOR") { - print "NOR header selected.\n"; - $hdr_type = "nor"; -} elsif ($ARGV[1] eq "QSPI") { - print "QSPI header selected.\n"; - $hdr_type = "qspi"; -} else { - print "ABORT: Must select NOR or QSPI header.\n"; - exit (1); -} - -$input_bin = $ARGV[0]; -$work_dir = dirname($input_bin); -$work_file = basename($input_bin); -print "Wrap file: $input_bin\n"; -$output_bin = "$work_dir/$hdr_type-$work_file"; -print "Output file: $output_bin\n"; - -open(OUTFILE, ">$output_bin"); - -# RESET VECTOR -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; -# UNDEFINED VECTOR -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; -# SW VECTOR -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; -# PREFETCH VECTOR -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; -# DATA ABORT VECTOR -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; -# unused VECTOR -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; -# IRQ -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; -# FIQ -$a = pack('V', hex("0x00000000")); -print OUTFILE $a; - -$HDR_20 = 0xAA995566; -$HDR_24 = 0x584C4E58; -$HDR_28 = 0x00000000; -$HDR_2C = 0x544F4F42; -$HDR_30 = 0x000008A0; -$HDR_34 = 0x00000000; -$HDR_38 = 0x00000000; - -$HDR_3C = 0xDEADBEEF; -if ($hdr_type eq "nor") { - $HDR_3C = 0xE20008A0; -} -if ($hdr_type eq "qspi") { - $HDR_3C = 0xFC0008A0; -} - -$HDR_40 = 0x00000000; -$HDR_44 = 0x00000001; -$HDR_CSUM = (~($HDR_20+$HDR_24+$HDR_28+$HDR_2C+$HDR_30+$HDR_34+$HDR_38+$HDR_3C+$HDR_40+$HDR_44)); -$HDR_CSUM = $HDR_CSUM & 0xFFFFFFFF; - -print OUTFILE pack('V', $HDR_20); -print OUTFILE pack('V', $HDR_24); -print OUTFILE pack('V', $HDR_28); -print OUTFILE pack('V', $HDR_2C); -print OUTFILE pack('V', $HDR_30); -print OUTFILE pack('V', $HDR_34); -print OUTFILE pack('V', $HDR_38); -print OUTFILE pack('V', $HDR_3C); -print OUTFILE pack('V', $HDR_40); -print OUTFILE pack('V', $HDR_44); -print OUTFILE pack('V', $HDR_CSUM); - -for ($i = 0; $i < 21; $i++) { - print OUTFILE pack('V', 0); -} -# A0 -# 256 reg init pairs -for ($i = 0; $i < 256; $i++) { - print OUTFILE pack('V', 0xFFFFFFFF); - print OUTFILE pack('V', 0); -} - -close($OUTFILE); - -`cat $input_bin >> $output_bin`; - -- 2.47.3