diff mbox

[U-Boot,10/11] MIPS: add init hook for CPU specific initialization

Message ID 1322143076-20349-11-git-send-email-daniel.schwierzeck@googlemail.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Daniel Schwierzeck Nov. 24, 2011, 1:57 p.m. UTC
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
 arch/mips/lib/board.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

Comments

Marek Vasut Nov. 25, 2011, 8:49 a.m. UTC | #1
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
> ---
>  arch/mips/lib/board.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
> index bcf12c5..27c2cfe 100644
> --- a/arch/mips/lib/board.c
> +++ b/arch/mips/lib/board.c
> @@ -57,6 +57,16 @@ static char *failed = "*** failed ***\n";
>   */
>  unsigned long mips_io_port_base = -1;
> 
> +int __arch_cpu_init(void)
> +{
> +	/*
> +	 * Nothing to do in this dummy implementation
> +	 */
> +	return 0;
> +}
> +int arch_cpu_init(void)
> +	__attribute__((weak, alias("__arch_cpu_init")));
> +
>  int __board_early_init_f(void)
>  {
>  	/*
> @@ -130,6 +140,7 @@ static int init_baudrate(void)
>  typedef int (init_fnc_t) (void);
> 
>  init_fnc_t *init_sequence[] = {
> +	arch_cpu_init,
>  	board_early_init_f,
>  	timer_init,
>  	env_init,		/* initialize environment */

Maybe do it the same way it's done on ARM.

M
Marek Vasut March 31, 2012, 8:53 p.m. UTC | #2
Dear Marek Vasut,

> > Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
> > ---
> > 
> >  arch/mips/lib/board.c |   11 +++++++++++
> >  1 files changed, 11 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
> > index bcf12c5..27c2cfe 100644
> > --- a/arch/mips/lib/board.c
> > +++ b/arch/mips/lib/board.c
> > @@ -57,6 +57,16 @@ static char *failed = "*** failed ***\n";
> > 
> >   */
> >  
> >  unsigned long mips_io_port_base = -1;
> > 
> > +int __arch_cpu_init(void)
> > +{
> > +	/*
> > +	 * Nothing to do in this dummy implementation
> > +	 */
> > +	return 0;
> > +}
> > +int arch_cpu_init(void)
> > +	__attribute__((weak, alias("__arch_cpu_init")));
> > +
> > 
> >  int __board_early_init_f(void)
> >  {
> >  
> >  	/*
> > 
> > @@ -130,6 +140,7 @@ static int init_baudrate(void)
> > 
> >  typedef int (init_fnc_t) (void);
> >  
> >  init_fnc_t *init_sequence[] = {
> > 
> > +	arch_cpu_init,
> > 
> >  	board_early_init_f,
> >  	timer_init,
> >  	env_init,		/* initialize environment */
> 
> Maybe do it the same way it's done on ARM.
> 
> M

Can you please rebase this on u-boot-staging/marex@denx.de ? It doesn't apply :(

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
index bcf12c5..27c2cfe 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -57,6 +57,16 @@  static char *failed = "*** failed ***\n";
  */
 unsigned long mips_io_port_base = -1;
 
+int __arch_cpu_init(void)
+{
+	/*
+	 * Nothing to do in this dummy implementation
+	 */
+	return 0;
+}
+int arch_cpu_init(void)
+	__attribute__((weak, alias("__arch_cpu_init")));
+
 int __board_early_init_f(void)
 {
 	/*
@@ -130,6 +140,7 @@  static int init_baudrate(void)
 typedef int (init_fnc_t) (void);
 
 init_fnc_t *init_sequence[] = {
+	arch_cpu_init,
 	board_early_init_f,
 	timer_init,
 	env_init,		/* initialize environment */