Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-05 Thread Albert ARIBAUD
Hi Tom, Le 05/03/2012 18:56, Tom Rini a écrit : On Thu, Mar 01, 2012 at 10:44:09PM +0100, Albert ARIBAUD wrote: How about this approach: since the problem is the presence of CPU- (or Soc-)level elements in board-level config files, and since there are probably many other such items in board co

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-05 Thread Fabio Estevam
On Mon, Mar 5, 2012 at 2:58 PM, Fabio Estevam wrote: > On Mon, Mar 5, 2012 at 2:52 PM, Tom Rini wrote: > >>> +int __arch_cpu_init(void) >>> +{ >>> +     return 0; >>> +} >>> +int arch_cpu_init(void) >>> +     __attribute__((weak, alias("__arch_cpu_init"))); >>> + >> >> Please add and use __weak

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-05 Thread Fabio Estevam
On Mon, Mar 5, 2012 at 2:52 PM, Tom Rini wrote: >> +int __arch_cpu_init(void) >> +{ >> +     return 0; >> +} >> +int arch_cpu_init(void) >> +     __attribute__((weak, alias("__arch_cpu_init"))); >> + > > Please add and use __weak instead. Ok, before I rework this patch I would like to confirm w

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-05 Thread Tom Rini
On Thu, Mar 01, 2012 at 10:44:09PM +0100, Albert ARIBAUD wrote: > How about this approach: since the problem is the presence of CPU- > (or Soc-)level elements in board-level config files, and since there > are probably many other such items in board config files (CPU type > in a SoC and HW IP conf

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-05 Thread Tom Rini
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 sup

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-03 Thread Stefano Babic
On 01/03/2012 15:02, 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 commo

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-01 Thread Albert ARIBAUD
Le 01/03/2012 21:57, Fabio Estevam a écrit : On Thu, Mar 1, 2012 at 5:51 PM, Albert ARIBAUD wrote: This adds (some) (functionally dead) code to all boards that did not require arch_cpu_init(). Yes, it adds a "return 0" only. Is this terribly bad? Well... Isn't it better than having to s

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-01 Thread Fabio Estevam
On Thu, Mar 1, 2012 at 5:51 PM, Albert ARIBAUD wrote: > This adds (some) (functionally dead) code to all boards that did not require > arch_cpu_init(). Yes, it adds a "return 0" only. Is this terribly bad? Isn't it better than having to select CONFIG_ARCH_CPU_INIT for every board to select arch

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-01 Thread Albert ARIBAUD
Le 01/03/2012 15:02, Fabio Estevam a écrit : 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 lev

Re: [U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-01 Thread Marek Vasut
> 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. Acked-by: Marek Vasut > >

[U-Boot] [PATCH 1/3] ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

2012-03-01 Thread Fabio Estevam
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 --- ar