* [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines
@ 2012-02-22 17:10 Stefan Kristiansson
2012-02-22 17:10 ` [U-Boot] [PATCH] openrisc: implement get_ticks and get_tbclk Stefan Kristiansson
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Stefan Kristiansson @ 2012-02-22 17:10 UTC (permalink / raw)
To: u-boot
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
arch/openrisc/include/asm/bitops.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/openrisc/include/asm/bitops.h b/arch/openrisc/include/asm/bitops.h
index c001a5d..c76a409 100644
--- a/arch/openrisc/include/asm/bitops.h
+++ b/arch/openrisc/include/asm/bitops.h
@@ -25,4 +25,8 @@
#define PLATFORM_FFS
#include <asm/bitops/ffs.h>
+#define hweight32(x) generic_hweight32(x)
+#define hweight16(x) generic_hweight16(x)
+#define hweight8(x) generic_hweight8(x)
+
#endif /* __ASM_GENERIC_BITOPS_H */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] openrisc: implement get_ticks and get_tbclk
2012-02-22 17:10 [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
@ 2012-02-22 17:10 ` Stefan Kristiansson
2012-10-02 22:06 ` [U-Boot] " Tom Rini
2012-02-22 17:15 ` [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
2012-10-02 22:06 ` [U-Boot] [U-Boot,1/2] " Tom Rini
2 siblings, 1 reply; 9+ messages in thread
From: Stefan Kristiansson @ 2012-02-22 17:10 UTC (permalink / raw)
To: u-boot
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
arch/openrisc/lib/timer.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/openrisc/lib/timer.c b/arch/openrisc/lib/timer.c
index 4e92a31..89e644b 100644
--- a/arch/openrisc/lib/timer.c
+++ b/arch/openrisc/lib/timer.c
@@ -86,6 +86,16 @@ void set_timer(ulong t)
timestamp = t;
}
+unsigned long long get_ticks(void)
+{
+ return get_timer(0);
+}
+
+ulong get_tbclk(void)
+{
+ return CONFIG_SYS_HZ;
+}
+
void __udelay(ulong usec)
{
ulong elapsed = 0;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines
2012-02-22 17:10 [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
2012-02-22 17:10 ` [U-Boot] [PATCH] openrisc: implement get_ticks and get_tbclk Stefan Kristiansson
@ 2012-02-22 17:15 ` Stefan Kristiansson
2012-02-22 22:15 ` Marek Vasut
2012-10-02 22:06 ` [U-Boot] [U-Boot,1/2] " Tom Rini
2 siblings, 1 reply; 9+ messages in thread
From: Stefan Kristiansson @ 2012-02-22 17:15 UTC (permalink / raw)
To: u-boot
On Wed, Feb 22, 2012 at 07:10:09PM +0200, Stefan Kristiansson wrote:
> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> ---
> arch/openrisc/include/asm/bitops.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/openrisc/include/asm/bitops.h b/arch/openrisc/include/asm/bitops.h
> index c001a5d..c76a409 100644
> --- a/arch/openrisc/include/asm/bitops.h
> +++ b/arch/openrisc/include/asm/bitops.h
> @@ -25,4 +25,8 @@
> #define PLATFORM_FFS
> #include <asm/bitops/ffs.h>
>
> +#define hweight32(x) generic_hweight32(x)
> +#define hweight16(x) generic_hweight16(x)
> +#define hweight8(x) generic_hweight8(x)
> +
> #endif /* __ASM_GENERIC_BITOPS_H */
> --
> 1.7.5.4
>
Sorry, screwed up when I format-patched this,
there is no part 2 to it.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines
2012-02-22 17:15 ` [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
@ 2012-02-22 22:15 ` Marek Vasut
2012-02-22 22:41 ` Mike Frysinger
0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2012-02-22 22:15 UTC (permalink / raw)
To: u-boot
> On Wed, Feb 22, 2012 at 07:10:09PM +0200, Stefan Kristiansson wrote:
> > Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> > ---
> >
> > arch/openrisc/include/asm/bitops.h | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/openrisc/include/asm/bitops.h
> > b/arch/openrisc/include/asm/bitops.h index c001a5d..c76a409 100644
> > --- a/arch/openrisc/include/asm/bitops.h
> > +++ b/arch/openrisc/include/asm/bitops.h
> > @@ -25,4 +25,8 @@
> >
> > #define PLATFORM_FFS
> > #include <asm/bitops/ffs.h>
> >
> > +#define hweight32(x) generic_hweight32(x)
> > +#define hweight16(x) generic_hweight16(x)
> > +#define hweight8(x) generic_hweight8(x)
> > +
> >
> > #endif /* __ASM_GENERIC_BITOPS_H */
>
> Sorry, screwed up when I format-patched this,
> there is no part 2 to it.
>
Hey,
looks like get_tbclk() and get_ticks() looks all the same just about everywhere.
What about introducing a weak alias for these functions so in case weird
platform pops up, these can be overridden.
M
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines
2012-02-22 22:15 ` Marek Vasut
@ 2012-02-22 22:41 ` Mike Frysinger
2012-02-22 23:24 ` Marek Vasut
0 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2012-02-22 22:41 UTC (permalink / raw)
To: u-boot
On Wednesday 22 February 2012 17:15:50 Marek Vasut wrote:
> looks like get_tbclk() and get_ticks() looks all the same just about
> everywhere. What about introducing a weak alias for these functions so in
> case weird platform pops up, these can be overridden.
the unified timer core that Graeme/Simon were doing takes care of that
implicitly
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120222/2b050ce0/attachment.pgp>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines
2012-02-22 22:41 ` Mike Frysinger
@ 2012-02-22 23:24 ` Marek Vasut
2012-02-22 23:29 ` Graeme Russ
0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2012-02-22 23:24 UTC (permalink / raw)
To: u-boot
> On Wednesday 22 February 2012 17:15:50 Marek Vasut wrote:
> > looks like get_tbclk() and get_ticks() looks all the same just about
> > everywhere. What about introducing a weak alias for these functions so in
> > case weird platform pops up, these can be overridden.
>
> the unified timer core that Graeme/Simon were doing takes care of that
> implicitly
Unified timer core?
M
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines
2012-02-22 23:24 ` Marek Vasut
@ 2012-02-22 23:29 ` Graeme Russ
0 siblings, 0 replies; 9+ messages in thread
From: Graeme Russ @ 2012-02-22 23:29 UTC (permalink / raw)
To: u-boot
Ho Marek,
On Thu, Feb 23, 2012 at 10:24 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> On Wednesday 22 February 2012 17:15:50 Marek Vasut wrote:
>> > looks like get_tbclk() and get_ticks() looks all the same just about
>> > everywhere. What about introducing a weak alias for these functions so in
>> > case weird platform pops up, these can be overridden.
>>
>> the unified timer core that Graeme/Simon were doing takes care of that
>> implicitly
>
> Unified timer core?
I don't know what this has to do with openrisc/bitops but a while ago there
was a discussion regarding the implementation of new timer API. I did some
initial tidy-up work but we kind of got stuck on the finer details. It
still in my todo list, but several other items have taken priority
Regards,
Graeme
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [U-Boot,1/2] openrisc/bitops: add hweightX defines
2012-02-22 17:10 [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
2012-02-22 17:10 ` [U-Boot] [PATCH] openrisc: implement get_ticks and get_tbclk Stefan Kristiansson
2012-02-22 17:15 ` [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
@ 2012-10-02 22:06 ` Tom Rini
2 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2012-10-02 22:06 UTC (permalink / raw)
To: u-boot
On Wed, Feb 22, 2012 at 07:10:09AM -0000, Stefan Kristiansson wrote:
> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121002/d44c7235/attachment.pgp>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] openrisc: implement get_ticks and get_tbclk
2012-02-22 17:10 ` [U-Boot] [PATCH] openrisc: implement get_ticks and get_tbclk Stefan Kristiansson
@ 2012-10-02 22:06 ` Tom Rini
0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2012-10-02 22:06 UTC (permalink / raw)
To: u-boot
On Wed, Feb 22, 2012 at 07:10:10AM -0000, Stefan Kristiansson wrote:
> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121002/f54fbf64/attachment.pgp>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-10-02 22:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22 17:10 [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
2012-02-22 17:10 ` [U-Boot] [PATCH] openrisc: implement get_ticks and get_tbclk Stefan Kristiansson
2012-10-02 22:06 ` [U-Boot] " Tom Rini
2012-02-22 17:15 ` [U-Boot] [PATCH 1/2] openrisc/bitops: add hweightX defines Stefan Kristiansson
2012-02-22 22:15 ` Marek Vasut
2012-02-22 22:41 ` Mike Frysinger
2012-02-22 23:24 ` Marek Vasut
2012-02-22 23:29 ` Graeme Russ
2012-10-02 22:06 ` [U-Boot] [U-Boot,1/2] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox