Patchwork [U-Boot] post: fix compile issue for post tests on kirkwood

login
register
mail settings
Submitter Holger Brunck
Date Nov. 24, 2011, 1:09 p.m.
Message ID <1322140150-15801-1-git-send-email-holger.brunck@keymile.com>
Download mbox | patch
Permalink /patch/127503/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Holger Brunck - Nov. 24, 2011, 1:09 p.m.
commit f31a911fe (arm, post: add missing post_time_ms for arm)
enables get_ticks and get_tbclk for all arm based boards,
but kirkwood has currently no implementation for this. So
undefine this for kirkwood boards.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
---
 post/post.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Marek Vasut - Nov. 25, 2011, 8:52 a.m.
> commit f31a911fe (arm, post: add missing post_time_ms for arm)
> enables get_ticks and get_tbclk for all arm based boards,
> but kirkwood has currently no implementation for this. So
> undefine this for kirkwood boards.

So this means the kirkwood timer doesn't conform to current timer api? Why work 
it around and not fix it then?

M
Prafulla Wadaskar - Nov. 25, 2011, 9:16 a.m.
> -----Original Message-----
> From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de]
> On Behalf Of Marek Vasut
> Sent: 25 November 2011 14:22
> To: u-boot@lists.denx.de
> Cc: Valentin@theia.denx.de; Longchamp; Heiko Schocher; Holger Brunck
> Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> kirkwood
> 
> > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > enables get_ticks and get_tbclk for all arm based boards,
> > but kirkwood has currently no implementation for this. So
> > undefine this for kirkwood boards.
> 
> So this means the kirkwood timer doesn't conform to current timer api? Why
> work
> it around and not fix it then?

I think this is better approach

Regards..
Prafulla . . .
Marek Vasut - Nov. 25, 2011, 9:22 a.m.
> > -----Original Message-----
> > From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de]
> > On Behalf Of Marek Vasut
> > Sent: 25 November 2011 14:22
> > To: u-boot@lists.denx.de
> > Cc: Valentin@theia.denx.de; Longchamp; Heiko Schocher; Holger Brunck
> > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> > kirkwood
> > 
> > > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > > enables get_ticks and get_tbclk for all arm based boards,
> > > but kirkwood has currently no implementation for this. So
> > > undefine this for kirkwood boards.
> > 
> > So this means the kirkwood timer doesn't conform to current timer api?
> > Why work
> > it around and not fix it then?
> 
> I think this is better approach
> 
Right? :) So now the question is ... who's gonna do it ? ;-)
Prafulla Wadaskar - Nov. 26, 2011, 10:29 a.m.
> -----Original Message-----
> From: Marek Vasut [mailto:marek.vasut@gmail.com]
> Sent: 25 November 2011 14:52
> To: Prafulla Wadaskar
> Cc: u-boot@lists.denx.de; Valentin@theia.denx.de; Longchamp; Heiko
> Schocher; Holger Brunck
> Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> kirkwood
> 
> > > -----Original Message-----
> > > From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> bounces@lists.denx.de]
> > > On Behalf Of Marek Vasut
> > > Sent: 25 November 2011 14:22
> > > To: u-boot@lists.denx.de
> > > Cc: Valentin@theia.denx.de; Longchamp; Heiko Schocher; Holger Brunck
> > > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests
> on
> > > kirkwood
> > >
> > > > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > > > enables get_ticks and get_tbclk for all arm based boards,
> > > > but kirkwood has currently no implementation for this. So
> > > > undefine this for kirkwood boards.
> > >
> > > So this means the kirkwood timer doesn't conform to current timer api?
> > > Why work
> > > it around and not fix it then?
> >
> > I think this is better approach
> >
> Right? :) So now the question is ... who's gonna do it ? ;-)

Patch from any one is welcomed. :-D

Regards..
Prafulla . . .
Marek Vasut - Nov. 26, 2011, 11:45 a.m.
> > -----Original Message-----
> > From: Marek Vasut [mailto:marek.vasut@gmail.com]
> > Sent: 25 November 2011 14:52
> > To: Prafulla Wadaskar
> > Cc: u-boot@lists.denx.de; Valentin@theia.denx.de; Longchamp; Heiko
> > Schocher; Holger Brunck
> > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> > kirkwood
> > 
> > > > -----Original Message-----
> > > > From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> > 
> > bounces@lists.denx.de]
> > 
> > > > On Behalf Of Marek Vasut
> > > > Sent: 25 November 2011 14:22
> > > > To: u-boot@lists.denx.de
> > > > Cc: Valentin@theia.denx.de; Longchamp; Heiko Schocher; Holger Brunck
> > > > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests
> > 
> > on
> > 
> > > > kirkwood
> > > > 
> > > > > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > > > > enables get_ticks and get_tbclk for all arm based boards,
> > > > > but kirkwood has currently no implementation for this. So
> > > > > undefine this for kirkwood boards.
> > > > 
> > > > So this means the kirkwood timer doesn't conform to current timer
> > > > api? Why work
> > > > it around and not fix it then?
> > > 
> > > I think this is better approach
> > 
> > Right? :) So now the question is ... who's gonna do it ? ;-)
> 
> Patch from any one is welcomed. :-D

Anyone, eh? Anyone ... anyone like the maintainer maybe ? >:-D
M
Prafulla Wadaskar - Nov. 27, 2011, 5:56 a.m.
> -----Original Message-----
> From: Marek Vasut [mailto:marek.vasut@gmail.com]
> Sent: 26 November 2011 17:15
> To: Prafulla Wadaskar
> Cc: u-boot@lists.denx.de; Valentin@theia.denx.de; Longchamp; Heiko
> Schocher; Holger Brunck
> Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> kirkwood
> 
> > > -----Original Message-----
> > > From: Marek Vasut [mailto:marek.vasut@gmail.com]
> > > Sent: 25 November 2011 14:52
> > > To: Prafulla Wadaskar
> > > Cc: u-boot@lists.denx.de; Valentin@theia.denx.de; Longchamp; Heiko
> > > Schocher; Holger Brunck
> > > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests
> on
> > > kirkwood
> > >
> > > > > -----Original Message-----
> > > > > From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> > >
> > > bounces@lists.denx.de]
> > >
> > > > > On Behalf Of Marek Vasut
> > > > > Sent: 25 November 2011 14:22
> > > > > To: u-boot@lists.denx.de
> > > > > Cc: Valentin@theia.denx.de; Longchamp; Heiko Schocher; Holger
> Brunck
> > > > > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post
> tests
> > >
> > > on
> > >
> > > > > kirkwood
> > > > >
> > > > > > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > > > > > enables get_ticks and get_tbclk for all arm based boards,
> > > > > > but kirkwood has currently no implementation for this. So
> > > > > > undefine this for kirkwood boards.
> > > > >
> > > > > So this means the kirkwood timer doesn't conform to current timer
> > > > > api? Why work
> > > > > it around and not fix it then?
> > > >
> > > > I think this is better approach
> > >
> > > Right? :) So now the question is ... who's gonna do it ? ;-)
> >
> > Patch from any one is welcomed. :-D
> 
> Anyone, eh? Anyone ... anyone like the maintainer maybe ? >:-D

I would have loved to do it, but I am very busy with some other very important assignment.
May be I will post a patch in feb2012

Regards..
Prafulla . .
Marek Vasut - Nov. 27, 2011, 7:07 a.m.
> > -----Original Message-----
> > From: Marek Vasut [mailto:marek.vasut@gmail.com]
> > Sent: 26 November 2011 17:15
> > To: Prafulla Wadaskar
> > Cc: u-boot@lists.denx.de; Valentin@theia.denx.de; Longchamp; Heiko
> > Schocher; Holger Brunck
> > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> > kirkwood
> > 
> > > > -----Original Message-----
> > > > From: Marek Vasut [mailto:marek.vasut@gmail.com]
> > > > Sent: 25 November 2011 14:52
> > > > To: Prafulla Wadaskar
> > > > Cc: u-boot@lists.denx.de; Valentin@theia.denx.de; Longchamp; Heiko
> > > > Schocher; Holger Brunck
> > > > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests
> > 
> > on
> > 
> > > > kirkwood
> > > > 
> > > > > > -----Original Message-----
> > > > > > From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> > > > 
> > > > bounces@lists.denx.de]
> > > > 
> > > > > > On Behalf Of Marek Vasut
> > > > > > Sent: 25 November 2011 14:22
> > > > > > To: u-boot@lists.denx.de
> > > > > > Cc: Valentin@theia.denx.de; Longchamp; Heiko Schocher; Holger
> > 
> > Brunck
> > 
> > > > > > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post
> > 
> > tests
> > 
> > > > on
> > > > 
> > > > > > kirkwood
> > > > > > 
> > > > > > > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > > > > > > enables get_ticks and get_tbclk for all arm based boards,
> > > > > > > but kirkwood has currently no implementation for this. So
> > > > > > > undefine this for kirkwood boards.
> > > > > > 
> > > > > > So this means the kirkwood timer doesn't conform to current timer
> > > > > > api? Why work
> > > > > > it around and not fix it then?
> > > > > 
> > > > > I think this is better approach
> > > > 
> > > > Right? :) So now the question is ... who's gonna do it ? ;-)
> > > 
> > > Patch from any one is welcomed. :-D
> > 
> > Anyone, eh? Anyone ... anyone like the maintainer maybe ? >:-D
> 
> I would have loved to do it, but I am very busy with some other very
> important assignment. May be I will post a patch in feb2012
> 

I'll keep an eye on this ;-)
Holger Brunck - Nov. 28, 2011, 8:51 a.m.
Hi,

On 11/27/2011 08:07 AM, Marek Vasut wrote:
>>>>>>>
>>>>>>>> commit f31a911fe (arm, post: add missing post_time_ms for arm)
>>>>>>>> enables get_ticks and get_tbclk for all arm based boards,
>>>>>>>> but kirkwood has currently no implementation for this. So
>>>>>>>> undefine this for kirkwood boards.
>>>>>>>
>>>>>>> So this means the kirkwood timer doesn't conform to current timer
>>>>>>> api? Why work
>>>>>>> it around and not fix it then?
>>>>>>
>>>>>> I think this is better approach
>>>>>
>>>>> Right? :) So now the question is ... who's gonna do it ? ;-)
>>>>
>>>> Patch from any one is welcomed. :-D
>>>
>>> Anyone, eh? Anyone ... anyone like the maintainer maybe ? >:-D
>>
>> I would have loved to do it, but I am very busy with some other very
>> important assignment. May be I will post a patch in feb2012
>>
> 
> I'll keep an eye on this ;-)

I do also agree that implementing the functions would be better then adding an
#ifdef as my patch does. But I currently got also no time to do this.

So could someone please pick this patch up that the keymile ARM boards are
compilable again?

Best regards
Holger

Patch

diff --git a/post/post.c b/post/post.c
index 0e67ad7..422a819 100644
--- a/post/post.c
+++ b/post/post.c
@@ -494,7 +494,7 @@  void post_reloc(void)
  */
 unsigned long post_time_ms(unsigned long base)
 {
-#if defined(CONFIG_PPC) || defined(CONFIG_ARM)
+#if defined(CONFIG_PPC) || defined(CONFIG_ARM) && !defined(CONFIG_KIRKWOOD)
 	return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ))
 		- base;
 #else