Commit de39dc71625d1a66cc611d1a85bf53545cba60a3

Authored by Adam Ford
Committed by Tom Rini
1 parent d7c09684d7

arm: armv7-a: Compile and tune for armv7-a instead of armv5

arch/arm/Makefile references armv5 for backwards compatibility with
older compilers.  This patch removes those references to armv5,
since by now newer compilers are required which should have armv7
support enabled.

The Makefile also also has a list of options for mtune, but the
entry for CONFIG_CPU_V7A is empty, so this patch tunes the
CPU_V7A architecture to generic-armv7-a.

The following size changed apply to omap3_logic using GCC.

Stock
text data bss dec hex filename
50910 429 67580 118919 1d087 spl/u-boot-spl
540713 22700 327072 890485   d9675 u-boot

Without Armv5
text data bss dec hex filename
50916 429 67580 118925   1d08d spl/u-boot-spl
540719 22700 327064 890483   d9673 u-boot

mtune=generic-armv7-a
text data bss dec hex filename
50932 429 67580 118941   1d09d spl/u-boot-spl
540519 22700 327080 890299   d95bb u-boot

Signed-off-by: Adam Ford <aford173@gmail.com>

Showing 3 changed files with 3 additions and 9 deletions Side-by-side Diff

... ... @@ -15,7 +15,7 @@
15 15 arch-$(CONFIG_CPU_ARM1136) =-march=armv5
16 16 arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
17 17 arch-$(CONFIG_CPU_V7A) =$(call cc-option, -march=armv7-a, \
18   - $(call cc-option, -march=armv7, -march=armv5))
  18 + $(call cc-option, -march=armv7))
19 19 arch-$(CONFIG_CPU_V7M) =-march=armv7-m
20 20 arch-$(CONFIG_CPU_V7R) =-march=armv7-r
21 21 arch-$(CONFIG_ARM64) =-march=armv8-a
... ... @@ -40,7 +40,7 @@
40 40 tune-$(CONFIG_CPU_PXA) =-mcpu=xscale
41 41 tune-$(CONFIG_CPU_ARM1136) =
42 42 tune-$(CONFIG_CPU_ARM1176) =
43   -tune-$(CONFIG_CPU_V7A) =
  43 +tune-$(CONFIG_CPU_V7A) =-mtune=generic-armv7-a
44 44 tune-$(CONFIG_CPU_V7R) =
45 45 tune-$(CONFIG_ARM64) =
46 46  
arch/arm/mach-omap2/omap3/lowlevel_init.S
... ... @@ -21,6 +21,7 @@
21 21 * R0 - Service ID
22 22 * R1 - paramer list
23 23 */
  24 +/* TODO: Re-evaluate the comment at the end regarding armv5 vs armv7 */
24 25 ENTRY(do_omap3_emu_romcode_call)
25 26 PUSH {r4-r12, lr} @ Save all registers from ROM code!
26 27 MOV r12, r0 @ Copy the Secure Service ID in R12
... ... @@ -23,13 +23,6 @@
23 23  
24 24 * CompuLab Ltd. CM-T35 [8]
25 25  
26   -Toolchain
27   -=========
28   -
29   -While ARM Cortex-A8 support ARM v7 instruction set (-march=armv7a) we compile
30   -with -march=armv5 to allow more compilers to work. For U-Boot code this has
31   -no performance impact.
32   -
33 26 Build
34 27 =====
35 28