All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] bootstage: Fix build error for standalone API example
@ 2012-03-20  5:49 Simon Glass
  2012-03-23 22:32 ` Anatolij Gustschin
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2012-03-20  5:49 UTC (permalink / raw)
  To: u-boot

This example doesn't have get_timer() defined, which causes build breakages.

Add #ifdef guards to work around this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 lib/time.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/time.c b/lib/time.c
index 69edc3d..5f393c3 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -48,6 +48,7 @@ void mdelay(unsigned long msec)
 		udelay(1000);
 }
 
+#ifdef CONFIG_BOOTSTAGE
 ulong __timer_get_boot_us(void)
 {
 	static ulong base_time;
@@ -64,3 +65,4 @@ ulong __timer_get_boot_us(void)
 
 ulong timer_get_boot_us(void)
 	__attribute__((weak, alias("__timer_get_boot_us")));
+#endif
-- 
1.7.7.3

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

* [U-Boot] [PATCH] bootstage: Fix build error for standalone API example
  2012-03-20  5:49 [U-Boot] [PATCH] bootstage: Fix build error for standalone API example Simon Glass
@ 2012-03-23 22:32 ` Anatolij Gustschin
  2012-03-23 23:04   ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Anatolij Gustschin @ 2012-03-23 22:32 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Mon, 19 Mar 2012 22:49:30 -0700
Simon Glass <sjg@chromium.org> wrote:

> This example doesn't have get_timer() defined, which causes build breakages.
> 
> Add #ifdef guards to work around this.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  lib/time.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/time.c b/lib/time.c
> index 69edc3d..5f393c3 100644
> --- a/lib/time.c
> +++ b/lib/time.c
> @@ -48,6 +48,7 @@ void mdelay(unsigned long msec)
>  		udelay(1000);
>  }
>  
> +#ifdef CONFIG_BOOTSTAGE
>  ulong __timer_get_boot_us(void)
>  {
>  	static ulong base_time;
> @@ -64,3 +65,4 @@ ulong __timer_get_boot_us(void)
>  
>  ulong timer_get_boot_us(void)
>  	__attribute__((weak, alias("__timer_get_boot_us")));
> +#endif

Isn't it better to move timer_get_boot_us() to common/bootstage.c ?
Or is there a plan to use this function not only in bootstage code?

Thanks,
Anatolij

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

* [U-Boot] [PATCH] bootstage: Fix build error for standalone API example
  2012-03-23 22:32 ` Anatolij Gustschin
@ 2012-03-23 23:04   ` Simon Glass
  2012-06-21 18:43     ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2012-03-23 23:04 UTC (permalink / raw)
  To: u-boot

Hi Anatolij,

On Fri, Mar 23, 2012 at 3:32 PM, Anatolij Gustschin <agust@denx.de> wrote:
> Hi Simon,
>
> On Mon, 19 Mar 2012 22:49:30 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
>> This example doesn't have get_timer() defined, which causes build breakages.
>>
>> Add #ifdef guards to work around this.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>> ?lib/time.c | ? ?2 ++
>> ?1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/lib/time.c b/lib/time.c
>> index 69edc3d..5f393c3 100644
>> --- a/lib/time.c
>> +++ b/lib/time.c
>> @@ -48,6 +48,7 @@ void mdelay(unsigned long msec)
>> ? ? ? ? ? ? ? udelay(1000);
>> ?}
>>
>> +#ifdef CONFIG_BOOTSTAGE
>> ?ulong __timer_get_boot_us(void)
>> ?{
>> ? ? ? static ulong base_time;
>> @@ -64,3 +65,4 @@ ulong __timer_get_boot_us(void)
>>
>> ?ulong timer_get_boot_us(void)
>> ? ? ? __attribute__((weak, alias("__timer_get_boot_us")));
>> +#endif
>
> Isn't it better to move timer_get_boot_us() to common/bootstage.c ?
> Or is there a plan to use this function not only in bootstage code?

Yes I sent through the smallest fix.

But as I said in the patch thread I am not sure which is best.

I'm happy to do it either way, so let me know and I can do a patch the
other way.

Regards,
Simon

>
> Thanks,
> Anatolij

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

* [U-Boot] [PATCH] bootstage: Fix build error for standalone API example
  2012-03-23 23:04   ` Simon Glass
@ 2012-06-21 18:43     ` Wolfgang Denk
  2012-06-21 19:00       ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2012-06-21 18:43 UTC (permalink / raw)
  To: u-boot

Dear Simon Glass,

In message <CAPnjgZ3of9HxpFrtoMh+tuLDQ7SX4fOVgkU9t=VtWmTukthaxA@mail.gmail.com> you wrote:
> 
> > Isn't it better to move timer_get_boot_us() to common/bootstage.c ?
> > Or is there a plan to use this function not only in bootstage code?
> 
> Yes I sent through the smallest fix.
> 
> But as I said in the patch thread I am not sure which is best.
> 
> I'm happy to do it either way, so let me know and I can do a patch the
> other way.

This is still open, right?  If so, then please follow Anatolij';s
suggestion. Thanks.

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
You can do this in a number of ways.     IBM chose to do all of them.
Why do you find that funny?        -- D. Taylor, Computer Science 350

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

* [U-Boot] [PATCH] bootstage: Fix build error for standalone API example
  2012-06-21 18:43     ` Wolfgang Denk
@ 2012-06-21 19:00       ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2012-06-21 19:00 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Thu, Jun 21, 2012 at 11:43 AM, Wolfgang Denk <wd@denx.de> wrote:

> Dear Simon Glass,
>
> In message <CAPnjgZ3of9HxpFrtoMh+tuLDQ7SX4fOVgkU9t=
> VtWmTukthaxA at mail.gmail.com> you wrote:
> >
> > > Isn't it better to move timer_get_boot_us() to common/bootstage.c ?
> > > Or is there a plan to use this function not only in bootstage code?
> >
> > Yes I sent through the smallest fix.
> >
> > But as I said in the patch thread I am not sure which is best.
> >
> > I'm happy to do it either way, so let me know and I can do a patch the
> > other way.
>
> This is still open, right?  If so, then please follow Anatolij';s
> suggestion. Thanks.
>

No, this has been tidied up now with this commit:

3786980 Move bootstage timer out of lib/time.c

Regards,
Simon


>
> 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
> You can do this in a number of ways.     IBM chose to do all of them.
> Why do you find that funny?        -- D. Taylor, Computer Science 350
>

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

end of thread, other threads:[~2012-06-21 19:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-20  5:49 [U-Boot] [PATCH] bootstage: Fix build error for standalone API example Simon Glass
2012-03-23 22:32 ` Anatolij Gustschin
2012-03-23 23:04   ` Simon Glass
2012-06-21 18:43     ` Wolfgang Denk
2012-06-21 19:00       ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.