public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
@ 2007-12-18 23:52 Hebbar
  2007-12-18 23:59 ` Hebbar
  0 siblings, 1 reply; 9+ messages in thread
From: Hebbar @ 2007-12-18 23:52 UTC (permalink / raw)
  To: u-boot


Hi,

This patches allows cpu_init_crit function to be compilled only if
CONFIG_SKIP_LOWLEVEL_INIT is not defined. At present irrespective of
CONFIG_SKIP_LOWLEVEL_INIT, cpu_init_crit is always compilled. This is for
arm926ejs module. 

--- u-boot-1.3.1/cpu/arm926ejs/start.S	2007-12-06 01:21:19.000000000 -0800
+++ uboot/cpu/arm926ejs/start.S	2007-12-19 08:40:37.296875000 -0800
@@ -187,7 +187,7 @@ clbss_l:str	r2, [r0]		/* clear loop...  
 _start_armboot:
 	.word start_armboot
 
-
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
 /*
  *************************************************************************
  *
@@ -225,6 +225,9 @@ cpu_init_crit:
 	bl	lowlevel_init	/* go setup pll,mux,memory */
 	mov	lr, ip		/* restore link */
 	mov	pc, lr		/* back to my caller */
+	
+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
+	
 /*
  *************************************************************************
  *

Signed-off-by: Hebbar 

I welcome comments, complaints, suggestions and advices. 

Regards 
Gururaja 
-- 
View this message in context: http://www.nabble.com/-PATCH--ARM926%3A-compile-cpu_init_crit-function-only-if-CONFIG_SKIP_LOWLEVEL_INIT-is-not-defined-tp14408413p14408413.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
  2007-12-18 23:52 [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined Hebbar
@ 2007-12-18 23:59 ` Hebbar
  2007-12-19  6:27   ` Dirk Behme
  2008-02-04 22:38   ` Wolfgang Denk
  0 siblings, 2 replies; 9+ messages in thread
From: Hebbar @ 2007-12-18 23:59 UTC (permalink / raw)
  To: u-boot


Hi,

This patches allows cpu_init_crit function to be compilled only if
CONFIG_SKIP_LOWLEVEL_INIT is not defined. At present irrespective of
CONFIG_SKIP_LOWLEVEL_INIT, cpu_init_crit is always compilled. This is for
arm926ejs module. 

Signed-off-by: K R Gururaja Hebbar <gururajakr@sanyo.co.in>


--- u-boot-1.3.1/cpu/arm926ejs/start.S	2007-12-06 01:21:19.000000000 -0800
+++ uboot/cpu/arm926ejs/start.S	2007-12-19 08:40:37.296875000 -0800
@@ -187,7 +187,7 @@ clbss_l:str	r2, [r0]		/* clear loop...  
 _start_armboot:
 	.word start_armboot
 
-
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
 /*
  *************************************************************************
  *
@@ -225,6 +225,9 @@ cpu_init_crit:
 	bl	lowlevel_init	/* go setup pll,mux,memory */
 	mov	lr, ip		/* restore link */
 	mov	pc, lr		/* back to my caller */
+	
+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
+	
 /*
  *************************************************************************
  *


I welcome comments, complaints, suggestions and advices. 

Regards 
Gururaja 

-- 
View this message in context: http://www.nabble.com/-PATCH--ARM926%3A-compile-cpu_init_crit-function-only-if-CONFIG_SKIP_LOWLEVEL_INIT-is-not-defined-tp14408413p14408491.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
  2007-12-18 23:59 ` Hebbar
@ 2007-12-19  6:27   ` Dirk Behme
  2008-02-04 22:38   ` Wolfgang Denk
  1 sibling, 0 replies; 9+ messages in thread
From: Dirk Behme @ 2007-12-19  6:27 UTC (permalink / raw)
  To: u-boot

Hebbar wrote:
> This patches allows cpu_init_crit function to be compilled only if
> CONFIG_SKIP_LOWLEVEL_INIT is not defined. At present irrespective of
> CONFIG_SKIP_LOWLEVEL_INIT, cpu_init_crit is always compilled. This is for
> arm926ejs module. 
> 
> Signed-off-by: K R Gururaja Hebbar <gururajakr@sanyo.co.in>
> 
> 
> --- u-boot-1.3.1/cpu/arm926ejs/start.S	2007-12-06 01:21:19.000000000 -0800
> +++ uboot/cpu/arm926ejs/start.S	2007-12-19 08:40:37.296875000 -0800
> @@ -187,7 +187,7 @@ clbss_l:str	r2, [r0]		/* clear loop...  
>  _start_armboot:
>  	.word start_armboot
>  
> -
> +#ifndef CONFIG_SKIP_LOWLEVEL_INIT
>  /*
>   *************************************************************************
>   *
> @@ -225,6 +225,9 @@ cpu_init_crit:
>  	bl	lowlevel_init	/* go setup pll,mux,memory */
>  	mov	lr, ip		/* restore link */
>  	mov	pc, lr		/* back to my caller */
> +	
> +#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
> +	
>  /*
>   *************************************************************************
>   *
> I welcome comments, complaints, suggestions and advices. 

The reason for this is to decrease resulting binary size? If so, all 
lowlevel_init() should be encapsulated as well to save even more space?

Dirk

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
@ 2007-12-19  8:48 Gururaja Hebbar K R
  2007-12-19  8:58 ` Dirk Behme
  0 siblings, 1 reply; 9+ messages in thread
From: Gururaja Hebbar K R @ 2007-12-19  8:48 UTC (permalink / raw)
  To: u-boot

Hi,
 
At present in "start.S" inside cpu\arm926ejs,   cpu_init_crit is called only if "CONFIG_SKIP_LOWLEVEL_INIT" is not defined 
 
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
 bl cpu_init_crit
#endif
 
But "cpu_init_crit" function  doesnt have any if defs which means cpu_init_crit function will compile irrespective of  "CONFIG_SKIP_LOWLEVEL_INIT". Hence the patch. The same is done in other processor files. Kindly check "cpu\arm920t\start.S" 

Regards

Gururaja


________________________________

From: Dirk Behme [mailto:dirk.behme at googlemail.com]
Sent: Wed 19-Dec-07 3:27 PM
To: Gururaja Hebbar K R
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined



Hebbar wrote:
> This patches allows cpu_init_crit function to be compilled only if
> CONFIG_SKIP_LOWLEVEL_INIT is not defined. At present irrespective of
> CONFIG_SKIP_LOWLEVEL_INIT, cpu_init_crit is always compilled. This is for
> arm926ejs module.
>
> Signed-off-by: K R Gururaja Hebbar <gururajakr@sanyo.co.in>
>
>
> --- u-boot-1.3.1/cpu/arm926ejs/start.S        2007-12-06 01:21:19.000000000 -0800
> +++ uboot/cpu/arm926ejs/start.S       2007-12-19 08:40:37.296875000 -0800
> @@ -187,7 +187,7 @@ clbss_l:str       r2, [r0]                /* clear loop... 
>  _start_armboot:
>       .word start_armboot
> 
> -
> +#ifndef CONFIG_SKIP_LOWLEVEL_INIT
>  /*
>   *************************************************************************
>   *
> @@ -225,6 +225,9 @@ cpu_init_crit:
>       bl      lowlevel_init   /* go setup pll,mux,memory */
>       mov     lr, ip          /* restore link */
>       mov     pc, lr          /* back to my caller */
> +    
> +#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
> +    
>  /*
>   *************************************************************************
>   *
> I welcome comments, complaints, suggestions and advices.

The reason for this is to decrease resulting binary size? If so, all
lowlevel_init() should be encapsulated as well to save even more space?

Dirk



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071219/c56e5a54/attachment.htm 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
  2007-12-19  8:48 Gururaja Hebbar K R
@ 2007-12-19  8:58 ` Dirk Behme
  0 siblings, 0 replies; 9+ messages in thread
From: Dirk Behme @ 2007-12-19  8:58 UTC (permalink / raw)
  To: u-boot

Gururaja Hebbar K R wrote:
> Hi,
>  
> At present in "start.S" inside cpu\arm926ejs,   cpu_init_crit is called 
> only if "CONFIG_SKIP_LOWLEVEL_INIT" is not defined
>  
> #ifndef CONFIG_SKIP_LOWLEVEL_INIT
>  bl cpu_init_crit
> #endif
>  
> But "cpu_init_crit" function  doesnt have any if defs which means 
> cpu_init_crit function will compile irrespective of  
> "CONFIG_SKIP_LOWLEVEL_INIT". 

Yes, thats clear.

> Hence the patch. The same is done in other 
> processor files. Kindly check "cpu\arm920t\start.S"

So the only reason that you do this is because its done in other files 
this way as well?

To not execute cpu_init_crit the existing ifndef is sufficent. But my 
point is: When you want to decrease resulting binary size by excluding 
unnecessary code (cpu_init_crit), then you should also exclude the 
then unused board specific lowlevel_init called from cpu_init_crit as 
well.

Dirk

> ------------------------------------------------------------------------
> *From:* Dirk Behme [mailto:dirk.behme at googlemail.com]
> *Sent:* Wed 19-Dec-07 3:27 PM
> *To:* Gururaja Hebbar K R
> *Cc:* u-boot-users at lists.sourceforge.net
> *Subject:* Re: [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit 
> function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
> 
> Hebbar wrote:
>  > This patches allows cpu_init_crit function to be compilled only if
>  > CONFIG_SKIP_LOWLEVEL_INIT is not defined. At present irrespective of
>  > CONFIG_SKIP_LOWLEVEL_INIT, cpu_init_crit is always compilled. This is for
>  > arm926ejs module.
>  >
>  > Signed-off-by: K R Gururaja Hebbar <gururajakr@sanyo.co.in>
>  >
>  >
>  > --- u-boot-1.3.1/cpu/arm926ejs/start.S        2007-12-06 
> 01:21:19.000000000 -0800
>  > +++ uboot/cpu/arm926ejs/start.S       2007-12-19 08:40:37.296875000 -0800
>  > @@ -187,7 +187,7 @@ clbss_l:str       r2, [r0]                /* 
> clear loop... 
>  >  _start_armboot:
>  >       .word start_armboot
>  > 
>  > -
>  > +#ifndef CONFIG_SKIP_LOWLEVEL_INIT
>  >  /*
>  >   
> *************************************************************************
>  >   *
>  > @@ -225,6 +225,9 @@ cpu_init_crit:
>  >       bl      lowlevel_init   /* go setup pll,mux,memory */
>  >       mov     lr, ip          /* restore link */
>  >       mov     pc, lr          /* back to my caller */
>  > +    
>  > +#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
>  > +    
>  >  /*
>  >   
> *************************************************************************
>  >   *
>  > I welcome comments, complaints, suggestions and advices.
> 
> The reason for this is to decrease resulting binary size? If so, all
> lowlevel_init() should be encapsulated as well to save even more space?
> 
> Dirk
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
  2007-12-18 23:59 ` Hebbar
  2007-12-19  6:27   ` Dirk Behme
@ 2008-02-04 22:38   ` Wolfgang Denk
  2008-02-05  1:32     ` Hebbar
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2008-02-04 22:38 UTC (permalink / raw)
  To: u-boot

In message <14408491.post@talk.nabble.com> you wrote:
> 
> This patches allows cpu_init_crit function to be compilled only if
> CONFIG_SKIP_LOWLEVEL_INIT is not defined. At present irrespective of
> CONFIG_SKIP_LOWLEVEL_INIT, cpu_init_crit is always compilled. This is for
> arm926ejs module. 

I'm not sure about this one. Probably the whole  cpu_init_crit:  part
should be placed inside the "#ifndef CONFIG_SKIP_LOWLEVEL_INIT" part,
as it is done for example in "cpu/arm920t/start.S" ?

Not applied.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A direct quote from the Boss: "We passed over a lot of good people to
get the ones we hired."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
  2008-02-04 22:38   ` Wolfgang Denk
@ 2008-02-05  1:32     ` Hebbar
  2008-02-13 23:59       ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Hebbar @ 2008-02-05  1:32 UTC (permalink / raw)
  To: u-boot


Hi Wolfgang ,

At Present the call to "cpu_init_crit" in uboot/cpu/arm926ejs/start.S (142)
is under ifndef

#ifndef CONFIG_SKIP_LOWLEVEL_INIT
	bl	cpu_init_crit
#endif

  But the function definition (203) isn't under this ifndef. So irrespective
of CONFIG_SKIP_LOWLEVEL_INIT, this function is compiled. Hence i have
applied the ifndef to function definition which places the entire
cpu_init_crit inside the ifndef.

Regards
Gururaja


In message <14408491.post@talk.nabble.com> you wrote:
> 
> This patches allows cpu_init_crit function to be compilled only if
> CONFIG_SKIP_LOWLEVEL_INIT is not defined. At present irrespective of
> CONFIG_SKIP_LOWLEVEL_INIT, cpu_init_crit is always compilled. This is for
> arm926ejs module. 

I'm not sure about this one. Probably the whole  cpu_init_crit:  part
should be placed inside the "#ifndef CONFIG_SKIP_LOWLEVEL_INIT" part,
as it is done for example in "cpu/arm920t/start.S" ?

Not applied.


Best regards,

Wolfgang Denk
-- 
View this message in context: http://www.nabble.com/-PATCH--ARM926%3A-compile-cpu_init_crit-function-only-if-CONFIG_SKIP_LOWLEVEL_INIT-is-not-defined-tp14408413p15281823.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
  2008-02-05  1:32     ` Hebbar
@ 2008-02-13 23:59       ` Wolfgang Denk
  2008-02-14  0:19         ` Hebbar
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2008-02-13 23:59 UTC (permalink / raw)
  To: u-boot

In message <15281823.post@talk.nabble.com> you wrote:
> 
> At Present the call to "cpu_init_crit" in uboot/cpu/arm926ejs/start.S (142)
> is under ifndef
> 
> #ifndef CONFIG_SKIP_LOWLEVEL_INIT
> 	bl	cpu_init_crit
> #endif
> 
>   But the function definition (203) isn't under this ifndef. So irrespective
> of CONFIG_SKIP_LOWLEVEL_INIT, this function is compiled. Hence i have
> applied the ifndef to function definition which places the entire
> cpu_init_crit inside the ifndef.

I don't think you answer my question:

> I'm not sure about this one. Probably the whole  cpu_init_crit:  part
> should be placed inside the "#ifndef CONFIG_SKIP_LOWLEVEL_INIT" part,
> as it is done for example in "cpu/arm920t/start.S" ?

?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The years of peak mental activity are undoubtedly between the ages of
four and eighteen. At four we know all the questions, at eighteen all
the answers.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined
  2008-02-13 23:59       ` Wolfgang Denk
@ 2008-02-14  0:19         ` Hebbar
  0 siblings, 0 replies; 9+ messages in thread
From: Hebbar @ 2008-02-14  0:19 UTC (permalink / raw)
  To: u-boot


Hi,

I went through "cpu/arm920t/start.S" file and found that this is what this
patch is doing. 

This patch places the entire cpu_init_crit function definition inside ifndef
same as in arm920t/start.S.

Sorry if i havent understood you.

Present cpu/arm926ejs/start.S

_start_armboot:
	.word start_armboot

                                            -----> This is where i have
placed #ifndef CONFIG_SKIP_LOWLEVEL_INIT 
/*
 *************************************************************************
 *
 * CPU_init_critical registers
 *
 * setup important registers
 * setup memory timing
 *
 *************************************************************************
 */


cpu_init_crit:
	/*
	 * flush v4 I/D caches
	 */
	mov	r0, 

<snip>
<snip>
<snip>
<snip>


	bl	lowlevel_init	/* go setup pll,mux,memory */
	mov	lr, ip		/* restore link */
	mov	pc, lr		/* back to my caller */
/*                                                                                               
----> here is the #endif 
 *************************************************************************
 *
 * Interrupt handling
 *
 *************************************************************************
 */


Regards
Gururaja


wd wrote:
> 
> In message <15281823.post@talk.nabble.com> you wrote:
> 
> 
> I don't think you answer my question:
> 
>> I'm not sure about this one. Probably the whole  cpu_init_crit:  part
>> should be placed inside the "#ifndef CONFIG_SKIP_LOWLEVEL_INIT" part,
>> as it is done for example in "cpu/arm920t/start.S" ?
> 
> ?
> 
> Best regards,
> 
> Wolfgang Denk
> 
> 

-- 
View this message in context: http://www.nabble.com/-PATCH--ARM926%3A-compile-cpu_init_crit-function-only-if-CONFIG_SKIP_LOWLEVEL_INIT-is-not-defined-tp14408413p15471298.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-02-14  0:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 23:52 [U-Boot-Users] [PATCH] ARM926: compile cpu_init_crit function only if CONFIG_SKIP_LOWLEVEL_INIT is not defined Hebbar
2007-12-18 23:59 ` Hebbar
2007-12-19  6:27   ` Dirk Behme
2008-02-04 22:38   ` Wolfgang Denk
2008-02-05  1:32     ` Hebbar
2008-02-13 23:59       ` Wolfgang Denk
2008-02-14  0:19         ` Hebbar
  -- strict thread matches above, loose matches on Subject: below --
2007-12-19  8:48 Gururaja Hebbar K R
2007-12-19  8:58 ` Dirk Behme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox