From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 5 Mar 2012 10:52:52 -0700 Subject: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency In-Reply-To: <1330610560-15978-1-git-send-email-fabio.estevam@freescale.com> References: <1330610560-15978-1-git-send-email-fabio.estevam@freescale.com> Message-ID: <20120305175252.GC18051@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Mar 01, 2012 at 11:02:38AM -0300, Fabio Estevam wrote: > Create a weak-aliased arch_cpu_init, so that we can get rid of CONFIG_ARCH_CPU_INIT > and always call arch_cpu_init. > > This way we do not need to define CONFIG_ARCH_CPU_INIT in every board file, since > arch_cpu_init() is supposed to handle common CPU level code. > > Signed-off-by: Fabio Estevam > --- > arch/arm/lib/board.c | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c > index 500e216..6463db5 100644 > --- a/arch/arm/lib/board.c > +++ b/arch/arm/lib/board.c > @@ -224,10 +224,16 @@ void __dram_init_banksize(void) > void dram_init_banksize(void) > __attribute__((weak, alias("__dram_init_banksize"))); > > +int __arch_cpu_init(void) > +{ > + return 0; > +} > +int arch_cpu_init(void) > + __attribute__((weak, alias("__arch_cpu_init"))); > + Please add and use __weak instead. -- Tom