ARM: arm1176: Define arch_cpu_init() at the SoC level
Subsystems (3)
PATCH 1/1 ARM: arm1176: Define arch_cpu_init() at the SoC level
Commit 86c6326 "ARM: arm1176: enable instruction cache in arch_cpu_init()" defined arch_cpu_init() in a file that is shared across all arm1176 SoCs. tnetv107x already implemented this function, which caused linking to break. Move the new conflicting arch_cpu_init() into arm1176/bcm2835/init.c so that it doesn't conflict; grep indicates this function is usually defined at the SoC-level, not the CPU-level, at least for ARM.
--- arch/arm/cpu/arm1176/bcm2835/Makefile | 2 +- arch/arm/cpu/arm1176/bcm2835/init.c | 24 ++++++++++++++++++++++++ arch/arm/cpu/arm1176/cpu.c | 7 ------- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 arch/arm/cpu/arm1176/bcm2835/init.c
arch/arm/cpu/arm1176/bcm2835/Makefile +1 -1
@@ -17,7 +17,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o SOBJS := lowlevel_init.o -COBJS := reset.o timer.o +COBJS := init.o reset.o timer.o SRCS := $(SOBJS:.o=.c) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
arch/arm/cpu/arm1176/bcm2835/init.c new file +24 -0
@@ -0,0 +1,24 @@ +/* +* (C) Copyright 2012 Stephen Warren +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <common.h> + +int arch_cpu_init (void ) +{ +icache_enable (); + +return 0 ; +}
arch/arm/cpu/arm1176/cpu.c +0 -7
@@ -65,10 +65,3 @@ static void cache_flush (void)/* mem barrier to sync things */ asm ("mcr p15, 0, %0, c7, c10, 4" : :"r" (0 )); } - -int arch_cpu_init (void ) -{ -icache_enable (); - -return 0 ; -}
Signature · 1 line
1.7.9.5
PATCH 1/1 ARM: arm1176: Define arch_cpu_init() at the SoC level
Dear Stephen Warren,
Quoted 9 lines
Commit 86c6326 "ARM: arm1176: enable instruction cache in
arch_cpu_init()" definedarch_cpu_init()in a file that is shared across all arm1176 SoCs. tnetv107x already implemented this function, which caused linking to break. Move the new conflictingarch_cpu_init()intoarm1176/bcm2835/init.cso that it doesn't conflict; grep indicates this function is usually defined at the SoC-level, not the CPU-level, at least for ARM.Signed-off-by Stephen Warren <[email protected]>
Quoted 55 lines
--- arch/arm/cpu/arm1176/bcm2835/Makefile | 2 +- arch/arm/cpu/arm1176/bcm2835/init.c | 24 ++++++++++++++++++++++++ arch/arm/cpu/arm1176/cpu.c | 7 ------- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 arch/arm/cpu/arm1176/bcm2835/init.c(quoted diff) +0
-0b/arch/arm/cpu/arm1176/bcm2835/Makefile index 4ea6d6b..95da6a8 100644
arch/arm/cpu/arm1176/bcm2835/Makefile +1
-1@@ -17,7 +17,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o SOBJS := lowlevel_init.o -COBJS := reset.o timer.o +COBJS := init.o reset.o timer.o SRCS := $(SOBJS:.o=.c) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))(quoted diff) +0
-0
b/arch/arm/cpu/arm1176/bcm2835/init.cnew file mode 100644 index 0000000..e90d3bbarch/arm/cpu/arm1176/bcm2835/init.c new file +24
-0@@ -0,0 +1,24 @@ +/* +* (C) Copyright 2012 Stephen Warren +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <common.h> + +int arch_cpu_init (void ) +{ +icache_enable (); + +return 0 ; +}arch/arm/cpu/arm1176/cpu.c +0
-0
arch/arm/cpu/arm1176/cpu.c static void cache_flush (void) · line 74
Quoted 10 lines
arch/arm/cpu/arm1176/cpu.c +0
-7@@ -65,10 +65,3 @@ static void cache_flush (void)/* mem barrier to sync things */ asm ("mcr p15, 0, %0, c7, c10, 4" : :"r" (0 )); } - -int arch_cpu_init (void ) -{ -icache_enable (); - -return 0 ; -}
Best regards,
Marek Vasut
PATCH 1/1 ARM: arm1176: Define arch_cpu_init() at the SoC level
In reply to Stephen WarrenHi Albert, Tom,
Quoted 8 lines · On Sat, 1 Sep 2012 19:27:56 -0700 Stephen Warren <[email protected]> wrote:
Commit 86c6326 "ARM: arm1176: enable instruction cache in
arch_cpu_init()" definedarch_cpu_init()in a file that is shared across all arm1176 SoCs. tnetv107x already implemented this function, which caused linking to break. Move the new conflictingarch_cpu_init()intoarm1176/bcm2835/init.cso that it doesn't conflict; grep indicates this function is usually defined at the SoC-level, not the CPU-level, at least for ARM.
Quoted 7 lines
Signed-off-by Stephen Warren <[email protected]>--- arch/arm/cpu/arm1176/bcm2835/Makefile | 2 +- arch/arm/cpu/arm1176/bcm2835/init.c | 24 ++++++++++++++++++++++++ arch/arm/cpu/arm1176/cpu.c | 7 ------- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 arch/arm/cpu/arm1176/bcm2835/init.c
Could you please apply this patch? It fixes the build error for tnetv107x_evm board. Currently MAKEALL doesn't build this board, but this [1] patch enables building it and it fails. Thanks!
Anatolij
PATCH 1/1 ARM: arm1176: Define arch_cpu_init() at the SoC level
Quoted 21 lines · Anatolij Gustschin
Hi Albert, Tom,
Quoted 8 lines · On Sat, 1 Sep 2012 19:27:56 -0700 Stephen Warren <[email protected]> wrote:
Commit 86c6326 "ARM: arm1176: enable instruction cache in
arch_cpu_init()" definedarch_cpu_init()in a file that is shared across all arm1176 SoCs. tnetv107x already implemented this function, which caused linking to break. Move the new conflictingarch_cpu_init()intoarm1176/bcm2835/init.cso that it doesn't conflict; grep indicates this function is usually defined at the SoC-level, not the CPU-level, at least for ARM.Quoted 7 lines
Signed-off-by Stephen Warren <[email protected]>--- arch/arm/cpu/arm1176/bcm2835/Makefile | 2 +- arch/arm/cpu/arm1176/bcm2835/init.c | 24 ++++++++++++++++++++++++ arch/arm/cpu/arm1176/cpu.c | 7 ------- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 arch/arm/cpu/arm1176/bcm2835/init.c
Quoted 3 lines
Could you please apply this patch? It fixes the build error for
tnetv107x_evmboard. Currently MAKEALL doesn't build this board, but this [1] patch enables building it and it fails. Thanks!
I know this could go through u-boot-arm, but to try and ease Albert's backlog, I've taken this for u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120925/00341255/attachment.pgp>