* [PATCH 01/24] ARM: AT91: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
@ 2010-12-13 19:15 ` Russell King - ARM Linux
2010-12-13 19:15 ` [PATCH 02/24] ARM: bcmring: " Russell King - ARM Linux
` (22 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:15 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-at91/at91rm9200_time.c | 4 +---
arch/arm/mach-at91/at91sam926x_time.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index 2500f41..1dd69c8 100644
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -101,7 +101,6 @@ static struct clocksource clk32k = {
.rating = 150,
.read = read_clk32k,
.mask = CLOCKSOURCE_MASK(20),
- .shift = 10,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -201,8 +200,7 @@ void __init at91rm9200_timer_init(void)
clockevents_register_device(&clkevt);
/* register clocksource */
- clk32k.mult = clocksource_hz2mult(AT91_SLOW_CLOCK, clk32k.shift);
- clocksource_register(&clk32k);
+ clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK);
}
struct sys_timer at91rm9200_timer = {
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index 608a632..4ba8549 100644
--- a/arch/arm/mach-at91/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -51,7 +51,6 @@ static struct clocksource pit_clk = {
.name = "pit",
.rating = 175,
.read = read_pit_clk,
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -163,10 +162,9 @@ static void __init at91sam926x_pit_init(void)
* Register clocksource. The high order bits of PIV are unused,
* so this isn't a 32-bit counter unless we get clockevent irqs.
*/
- pit_clk.mult = clocksource_hz2mult(pit_rate, pit_clk.shift);
bits = 12 /* PICNT */ + ilog2(pit_cycle) /* PIV */;
pit_clk.mask = CLOCKSOURCE_MASK(bits);
- clocksource_register(&pit_clk);
+ clocksource_register_hz(&pit_clk, pit_rate);
/* Set up irq handler */
setup_irq(AT91_ID_SYS, &at91sam926x_pit_irq);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 02/24] ARM: bcmring: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
2010-12-13 19:15 ` [PATCH 01/24] ARM: AT91: update clock source registration Russell King - ARM Linux
@ 2010-12-13 19:15 ` Russell King - ARM Linux
2010-12-13 19:36 ` Scott Branden
2010-12-13 19:15 ` [PATCH 03/24] ARM: davinci: update clock source registration Russell King - ARM Linux
` (21 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:15 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-bcmring/core.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-bcmring/core.c
index d3f959e..b91b1b0 100644
--- a/arch/arm/mach-bcmring/core.c
+++ b/arch/arm/mach-bcmring/core.c
@@ -294,7 +294,6 @@ static struct clocksource clocksource_bcmring_timer1 = {
.rating = 200,
.read = bcmring_get_cycles_timer1,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -303,7 +302,6 @@ static struct clocksource clocksource_bcmring_timer3 = {
.rating = 100,
.read = bcmring_get_cycles_timer3,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -316,10 +314,8 @@ static int __init bcmring_clocksource_init(void)
writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC,
TIMER1_VA_BASE + TIMER_CTRL);
- clocksource_bcmring_timer1.mult =
- clocksource_khz2mult(TIMER1_FREQUENCY_MHZ * 1000,
- clocksource_bcmring_timer1.shift);
- clocksource_register(&clocksource_bcmring_timer1);
+ clocksource_register_khz(&clocksource_bcmring_timer1,
+ TIMER1_FREQUENCY_MHZ * 1000);
/* setup timer3 as free-running clocksource */
writel(0, TIMER3_VA_BASE + TIMER_CTRL);
@@ -328,10 +324,8 @@ static int __init bcmring_clocksource_init(void)
writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC,
TIMER3_VA_BASE + TIMER_CTRL);
- clocksource_bcmring_timer3.mult =
- clocksource_khz2mult(TIMER3_FREQUENCY_KHZ,
- clocksource_bcmring_timer3.shift);
- clocksource_register(&clocksource_bcmring_timer3);
+ clocksource_register_khz(&clocksource_bcmring_timer3,
+ TIMER3_FREQUENCY_KHZ);
return 0;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 02/24] ARM: bcmring: update clock source registration
2010-12-13 19:15 ` [PATCH 02/24] ARM: bcmring: " Russell King - ARM Linux
@ 2010-12-13 19:36 ` Scott Branden
2010-12-13 20:28 ` {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM: bcmring: update clock source registration) JD (Jiandong) Zheng
0 siblings, 1 reply; 39+ messages in thread
From: Scott Branden @ 2010-12-13 19:36 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Russell King [mailto:rmk at arm.linux.org.uk] On Behalf Of Russell
> King - ARM Linux
> Sent: December 13, 2010 11:16 AM
> To: linux-arm-kernel at lists.infradead.org
> Cc: Leo Chen; Scott Branden
> Subject: [PATCH 02/24] ARM: bcmring: update clock source registration
>
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of
> the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Changes follow John Stultz' notes from his commit
Acked-By: Scott Branden <sbranden@broadcom.com>
> ---
> arch/arm/mach-bcmring/core.c | 14 ++++----------
> 1 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-
> bcmring/core.c
> index d3f959e..b91b1b0 100644
> --- a/arch/arm/mach-bcmring/core.c
> +++ b/arch/arm/mach-bcmring/core.c
> @@ -294,7 +294,6 @@ static struct clocksource
> clocksource_bcmring_timer1 = {
> .rating = 200,
> .read = bcmring_get_cycles_timer1,
> .mask = CLOCKSOURCE_MASK(32),
> - .shift = 20,
> .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> };
>
> @@ -303,7 +302,6 @@ static struct clocksource
> clocksource_bcmring_timer3 = {
> .rating = 100,
> .read = bcmring_get_cycles_timer3,
> .mask = CLOCKSOURCE_MASK(32),
> - .shift = 20,
> .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> };
>
> @@ -316,10 +314,8 @@ static int __init bcmring_clocksource_init(void)
> writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE |
> TIMER_CTRL_PERIODIC,
> TIMER1_VA_BASE + TIMER_CTRL);
>
> - clocksource_bcmring_timer1.mult =
> - clocksource_khz2mult(TIMER1_FREQUENCY_MHZ * 1000,
> - clocksource_bcmring_timer1.shift);
> - clocksource_register(&clocksource_bcmring_timer1);
> + clocksource_register_khz(&clocksource_bcmring_timer1,
> + TIMER1_FREQUENCY_MHZ * 1000);
>
> /* setup timer3 as free-running clocksource */
> writel(0, TIMER3_VA_BASE + TIMER_CTRL);
> @@ -328,10 +324,8 @@ static int __init bcmring_clocksource_init(void)
> writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE |
> TIMER_CTRL_PERIODIC,
> TIMER3_VA_BASE + TIMER_CTRL);
>
> - clocksource_bcmring_timer3.mult =
> - clocksource_khz2mult(TIMER3_FREQUENCY_KHZ,
> - clocksource_bcmring_timer3.shift);
> - clocksource_register(&clocksource_bcmring_timer3);
> + clocksource_register_khz(&clocksource_bcmring_timer3,
> + TIMER3_FREQUENCY_KHZ);
>
> return 0;
> }
> --
> 1.6.2.5
>
^ permalink raw reply [flat|nested] 39+ messages in thread* {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM: bcmring: update clock source registration)
2010-12-13 19:36 ` Scott Branden
@ 2010-12-13 20:28 ` JD (Jiandong) Zheng
2010-12-13 20:32 ` Scott Branden
2010-12-14 22:01 ` Russell King - ARM Linux
0 siblings, 2 replies; 39+ messages in thread
From: JD (Jiandong) Zheng @ 2010-12-13 20:28 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
This is second time I submit this patch because there are complains about Leo
Chen's email is not valid and reachable.
I am Jiandong Zheng working on BCMRING in Broadcom Canada Ltd. I am replacing
Leo Chen (leochen at broadcom.com) as " ARM/BCMRING ARM ARCHITECTURE" and "
ARM/BCMRING MTD NAND DRIVER" maintainer from Broadcom as he is no longer the
maintainer of these components.
Here is the patch to MAINTAINERS file in linux 2.6.36 about this change.
Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
Subject: [PATCH] Change bcmring Maintainer list.
---
MAINTAINERS | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index f2a2b8e..8968ba3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -572,14 +572,14 @@ W: http://maxim.org.za/at91_26.html
S: Maintained
ARM/BCMRING ARM ARCHITECTURE
-M: Leo Chen <leochen@broadcom.com>
+M: Jiandong Zheng <jdzheng@broadcom.com>
M: Scott Branden <sbranden@broadcom.com>
L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-bcmring
ARM/BCMRING MTD NAND DRIVER
-M: Leo Chen <leochen@broadcom.com>
+M: Jiandong Zheng <jdzheng@broadcom.com>
M: Scott Branden <sbranden@broadcom.com>
L: linux-mtd at lists.infradead.org
S: Maintained
--
1.7.1
Thanks,
JD (Jiandong) Zheng
> -----Original Message-----
> From: Russell King [mailto:rmk at arm.linux.org.uk] On Behalf Of Russell
> King - ARM Linux
> Sent: December 13, 2010 11:16 AM
> To: linux-arm-kernel at lists.infradead.org
> Cc: Leo Chen; Scott Branden
> Subject: [PATCH 02/24] ARM: bcmring: update clock source registration
>
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of
> the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Changes follow John Stultz' notes from his commit
Acked-By: Scott Branden <sbranden@broadcom.com>
> ---
> arch/arm/mach-bcmring/core.c | 14 ++++----------
> 1 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-
> bcmring/core.c
> index d3f959e..b91b1b0 100644
> --- a/arch/arm/mach-bcmring/core.c
> +++ b/arch/arm/mach-bcmring/core.c
> @@ -294,7 +294,6 @@ static struct clocksource
> clocksource_bcmring_timer1 = {
> .rating = 200,
> .read = bcmring_get_cycles_timer1,
> .mask = CLOCKSOURCE_MASK(32),
> - .shift = 20,
> .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> };
>
> @@ -303,7 +302,6 @@ static struct clocksource
> clocksource_bcmring_timer3 = {
> .rating = 100,
> .read = bcmring_get_cycles_timer3,
> .mask = CLOCKSOURCE_MASK(32),
> - .shift = 20,
> .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> };
>
> @@ -316,10 +314,8 @@ static int __init bcmring_clocksource_init(void)
> writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE |
> TIMER_CTRL_PERIODIC,
> TIMER1_VA_BASE + TIMER_CTRL);
>
> - clocksource_bcmring_timer1.mult =
> - clocksource_khz2mult(TIMER1_FREQUENCY_MHZ * 1000,
> - clocksource_bcmring_timer1.shift);
> - clocksource_register(&clocksource_bcmring_timer1);
> + clocksource_register_khz(&clocksource_bcmring_timer1,
> + TIMER1_FREQUENCY_MHZ * 1000);
>
> /* setup timer3 as free-running clocksource */
> writel(0, TIMER3_VA_BASE + TIMER_CTRL);
> @@ -328,10 +324,8 @@ static int __init bcmring_clocksource_init(void)
> writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE |
> TIMER_CTRL_PERIODIC,
> TIMER3_VA_BASE + TIMER_CTRL);
>
> - clocksource_bcmring_timer3.mult =
> - clocksource_khz2mult(TIMER3_FREQUENCY_KHZ,
> - clocksource_bcmring_timer3.shift);
> - clocksource_register(&clocksource_bcmring_timer3);
> + clocksource_register_khz(&clocksource_bcmring_timer3,
> + TIMER3_FREQUENCY_KHZ);
>
> return 0;
> }
> --
> 1.6.2.5
>
^ permalink raw reply related [flat|nested] 39+ messages in thread* {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM: bcmring: update clock source registration)
2010-12-13 20:28 ` {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM: bcmring: update clock source registration) JD (Jiandong) Zheng
@ 2010-12-13 20:32 ` Scott Branden
2010-12-14 22:01 ` Russell King - ARM Linux
1 sibling, 0 replies; 39+ messages in thread
From: Scott Branden @ 2010-12-13 20:32 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: JD (Jiandong) Zheng
> Sent: December 13, 2010 12:29 PM
> To: Russell King - ARM Linux; linux-arm-kernel at lists.infradead.org
> Cc: Scott Branden
> Subject: {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM:
> bcmring: update clock source registration)
>
> Hello,
>
> This is second time I submit this patch because there are complains
> about Leo
> Chen's email is not valid and reachable.
>
> I am Jiandong Zheng working on BCMRING in Broadcom Canada Ltd. I am
> replacing
> Leo Chen (leochen at broadcom.com) as " ARM/BCMRING ARM ARCHITECTURE" and
> "
> ARM/BCMRING MTD NAND DRIVER" maintainer from Broadcom as he is no
> longer the
> maintainer of these components.
>
> Here is the patch to MAINTAINERS file in linux 2.6.36 about this
> change.
>
> Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
Acked-by: Scott Branden <sbranden@broadcom.com>
>
> Subject: [PATCH] Change bcmring Maintainer list.
>
> ---
> MAINTAINERS | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f2a2b8e..8968ba3 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -572,14 +572,14 @@ W: http://maxim.org.za/at91_26.html
> S: Maintained
>
> ARM/BCMRING ARM ARCHITECTURE
> -M: Leo Chen <leochen@broadcom.com>
> +M: Jiandong Zheng <jdzheng@broadcom.com>
> M: Scott Branden <sbranden@broadcom.com>
> L: linux-arm-kernel at lists.infradead.org (moderated for non-
> subscribers)
> S: Maintained
> F: arch/arm/mach-bcmring
>
> ARM/BCMRING MTD NAND DRIVER
> -M: Leo Chen <leochen@broadcom.com>
> +M: Jiandong Zheng <jdzheng@broadcom.com>
> M: Scott Branden <sbranden@broadcom.com>
> L: linux-mtd at lists.infradead.org
> S: Maintained
> --
> 1.7.1
>
> Thanks,
> JD (Jiandong) Zheng
>
> > -----Original Message-----
> > From: Russell King [mailto:rmk at arm.linux.org.uk] On Behalf Of Russell
> > King - ARM Linux
> > Sent: December 13, 2010 11:16 AM
> > To: linux-arm-kernel at lists.infradead.org
> > Cc: Leo Chen; Scott Branden
> > Subject: [PATCH 02/24] ARM: bcmring: update clock source registration
> >
> > In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface)
> new
> > interfaces were added which simplify (and optimize) the selection of
> > the
> > divisor shift/mult constants. Switch over to using this new
> interface.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Changes follow John Stultz' notes from his commit
> Acked-By: Scott Branden <sbranden@broadcom.com>
> > ---
> > arch/arm/mach-bcmring/core.c | 14 ++++----------
> > 1 files changed, 4 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-
> > bcmring/core.c
> > index d3f959e..b91b1b0 100644
> > --- a/arch/arm/mach-bcmring/core.c
> > +++ b/arch/arm/mach-bcmring/core.c
> > @@ -294,7 +294,6 @@ static struct clocksource
> > clocksource_bcmring_timer1 = {
> > .rating = 200,
> > .read = bcmring_get_cycles_timer1,
> > .mask = CLOCKSOURCE_MASK(32),
> > - .shift = 20,
> > .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> > };
> >
> > @@ -303,7 +302,6 @@ static struct clocksource
> > clocksource_bcmring_timer3 = {
> > .rating = 100,
> > .read = bcmring_get_cycles_timer3,
> > .mask = CLOCKSOURCE_MASK(32),
> > - .shift = 20,
> > .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> > };
> >
> > @@ -316,10 +314,8 @@ static int __init bcmring_clocksource_init(void)
> > writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE |
> > TIMER_CTRL_PERIODIC,
> > TIMER1_VA_BASE + TIMER_CTRL);
> >
> > - clocksource_bcmring_timer1.mult =
> > - clocksource_khz2mult(TIMER1_FREQUENCY_MHZ * 1000,
> > - clocksource_bcmring_timer1.shift);
> > - clocksource_register(&clocksource_bcmring_timer1);
> > + clocksource_register_khz(&clocksource_bcmring_timer1,
> > + TIMER1_FREQUENCY_MHZ * 1000);
> >
> > /* setup timer3 as free-running clocksource */
> > writel(0, TIMER3_VA_BASE + TIMER_CTRL);
> > @@ -328,10 +324,8 @@ static int __init bcmring_clocksource_init(void)
> > writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE |
> > TIMER_CTRL_PERIODIC,
> > TIMER3_VA_BASE + TIMER_CTRL);
> >
> > - clocksource_bcmring_timer3.mult =
> > - clocksource_khz2mult(TIMER3_FREQUENCY_KHZ,
> > - clocksource_bcmring_timer3.shift);
> > - clocksource_register(&clocksource_bcmring_timer3);
> > + clocksource_register_khz(&clocksource_bcmring_timer3,
> > + TIMER3_FREQUENCY_KHZ);
> >
> > return 0;
> > }
> > --
> > 1.6.2.5
> >
^ permalink raw reply [flat|nested] 39+ messages in thread* {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM: bcmring: update clock source registration)
2010-12-13 20:28 ` {PATCH] BCMRING maintainer change (was RE: [PATCH 02/24] ARM: bcmring: update clock source registration) JD (Jiandong) Zheng
2010-12-13 20:32 ` Scott Branden
@ 2010-12-14 22:01 ` Russell King - ARM Linux
1 sibling, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-14 22:01 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 13, 2010 at 12:28:40PM -0800, JD (Jiandong) Zheng wrote:
> Hello,
>
> This is second time I submit this patch because there are complains about Leo
> Chen's email is not valid and reachable.
>
> I am Jiandong Zheng working on BCMRING in Broadcom Canada Ltd. I am replacing
> Leo Chen (leochen at broadcom.com) as " ARM/BCMRING ARM ARCHITECTURE" and "
> ARM/BCMRING MTD NAND DRIVER" maintainer from Broadcom as he is no longer the
> maintainer of these components.
>
> Here is the patch to MAINTAINERS file in linux 2.6.36 about this change.
>
> Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
>
> Subject: [PATCH] Change bcmring Maintainer list.
I've commited this manually, to fix up the text of the commit message:
Change bcmring Maintainer list.
I am Jiandong Zheng working on BCMRING in Broadcom Canada Ltd. I am
replacing Leo Chen (leochen at broadcom.com) as "ARM/BCMRING ARM
ARCHITECTURE" and "ARM/BCMRING MTD NAND DRIVER" maintainer from
Broadcom as he is no longer the maintainer of these components.
Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
Acked-by: Scott Branden <sbranden@broadcom.com>
A few notes for future:
1. don't overflow more than 72 characters, unless you're quoting kernel
messages.
2. The patch summary should be in the email subject, so 'git am' can
safely parse it.
3. sign-offs should be the last thing before the "---" line before the
diffstat.
4. commentry about how many times a patch has been sent, and that this
is a patch should go after the "---" line.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 03/24] ARM: davinci: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
2010-12-13 19:15 ` [PATCH 01/24] ARM: AT91: update clock source registration Russell King - ARM Linux
2010-12-13 19:15 ` [PATCH 02/24] ARM: bcmring: " Russell King - ARM Linux
@ 2010-12-13 19:15 ` Russell King - ARM Linux
2010-12-13 19:16 ` [PATCH 04/24] ARM: integrator: " Russell King - ARM Linux
` (20 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:15 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-davinci/time.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 0f21c36..c148671 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -276,7 +276,6 @@ static struct clocksource clocksource_davinci = {
.rating = 300,
.read = read_cycles,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 24,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -378,10 +377,8 @@ static void __init davinci_timer_init(void)
/* setup clocksource */
clocksource_davinci.name = id_to_name[clocksource_id];
- clocksource_davinci.mult =
- clocksource_khz2mult(davinci_clock_tick_rate/1000,
- clocksource_davinci.shift);
- if (clocksource_register(&clocksource_davinci))
+ if (clocksource_register_hz(&clocksource_davinci,
+ davinci_clock_tick_rate))
printk(err, clocksource_davinci.name);
/* setup clockevent */
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 04/24] ARM: integrator: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (2 preceding siblings ...)
2010-12-13 19:15 ` [PATCH 03/24] ARM: davinci: update clock source registration Russell King - ARM Linux
@ 2010-12-13 19:16 ` Russell King - ARM Linux
2010-12-13 19:16 ` [PATCH 05/24] ARM: ixp4xx: " Russell King - ARM Linux
` (19 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:16 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-integrator/integrator_ap.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 548208f..2774df8 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -372,7 +372,6 @@ static struct clocksource clocksource_timersp = {
.rating = 200,
.read = timersp_read,
.mask = CLOCKSOURCE_MASK(16),
- .shift = 16,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -390,8 +389,7 @@ static void integrator_clocksource_init(u32 khz)
writel(ctrl, base + TIMER_CTRL);
writel(0xffff, base + TIMER_LOAD);
- cs->mult = clocksource_khz2mult(khz, cs->shift);
- clocksource_register(cs);
+ clocksource_register_khz(cs, khz);
}
static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 05/24] ARM: ixp4xx: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (3 preceding siblings ...)
2010-12-13 19:16 ` [PATCH 04/24] ARM: integrator: " Russell King - ARM Linux
@ 2010-12-13 19:16 ` Russell King - ARM Linux
2010-12-13 19:17 ` [PATCH 06/24] ARM: lpc32xx: " Russell King - ARM Linux
` (18 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:16 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-ixp4xx/common.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 0bce097..82fc003 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -411,7 +411,6 @@ static struct clocksource clocksource_ixp4xx = {
.rating = 200,
.read = ixp4xx_get_cycles,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -419,10 +418,7 @@ unsigned long ixp4xx_timer_freq = FREQ;
EXPORT_SYMBOL(ixp4xx_timer_freq);
static void __init ixp4xx_clocksource_init(void)
{
- clocksource_ixp4xx.mult =
- clocksource_hz2mult(ixp4xx_timer_freq,
- clocksource_ixp4xx.shift);
- clocksource_register(&clocksource_ixp4xx);
+ clocksource_register_hz(&clocksource_ixp4xx, ixp4xx_timer_freq);
}
/*
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 06/24] ARM: lpc32xx: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (4 preceding siblings ...)
2010-12-13 19:16 ` [PATCH 05/24] ARM: ixp4xx: " Russell King - ARM Linux
@ 2010-12-13 19:17 ` Russell King - ARM Linux
2010-12-13 19:17 ` [PATCH 07/24] ARM: mmp: " Russell King - ARM Linux
` (17 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:17 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-lpc32xx/timer.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c
index 630dd4a..6162ac3 100644
--- a/arch/arm/mach-lpc32xx/timer.c
+++ b/arch/arm/mach-lpc32xx/timer.c
@@ -38,7 +38,6 @@ static cycle_t lpc32xx_clksrc_read(struct clocksource *cs)
static struct clocksource lpc32xx_clksrc = {
.name = "lpc32xx_clksrc",
- .shift = 24,
.rating = 300,
.read = lpc32xx_clksrc_read,
.mask = CLOCKSOURCE_MASK(32),
@@ -171,9 +170,7 @@ static void __init lpc32xx_timer_init(void)
__raw_writel(0, LCP32XX_TIMER_MCR(LPC32XX_TIMER1_BASE));
__raw_writel(LCP32XX_TIMER_CNTR_TCR_EN,
LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE));
- lpc32xx_clksrc.mult = clocksource_hz2mult(clkrate,
- lpc32xx_clksrc.shift);
- clocksource_register(&lpc32xx_clksrc);
+ clocksource_register_hz(&lpc32xx_clksrc, clkrate);
}
struct sys_timer lpc32xx_timer = {
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 07/24] ARM: mmp: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (5 preceding siblings ...)
2010-12-13 19:17 ` [PATCH 06/24] ARM: lpc32xx: " Russell King - ARM Linux
@ 2010-12-13 19:17 ` Russell King - ARM Linux
2010-12-13 19:17 ` [PATCH 08/24] ARM: MSM: " Russell King - ARM Linux
` (16 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:17 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-mmp/time.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 6652819..0c0ab09 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -146,7 +146,6 @@ static cycle_t clksrc_read(struct clocksource *cs)
static struct clocksource cksrc = {
.name = "clocksource",
- .shift = 20,
.rating = 200,
.read = clksrc_read,
.mask = CLOCKSOURCE_MASK(32),
@@ -193,10 +192,8 @@ void __init timer_init(int irq)
ckevt.min_delta_ns = clockevent_delta2ns(MIN_DELTA, &ckevt);
ckevt.cpumask = cpumask_of(0);
- cksrc.mult = clocksource_hz2mult(CLOCK_TICK_RATE, cksrc.shift);
-
setup_irq(irq, &timer_irq);
- clocksource_register(&cksrc);
+ clocksource_register_hz(&cksrc, CLOCK_TICK_RATE);
clockevents_register_device(&ckevt);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 08/24] ARM: MSM: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (6 preceding siblings ...)
2010-12-13 19:17 ` [PATCH 07/24] ARM: mmp: " Russell King - ARM Linux
@ 2010-12-13 19:17 ` Russell King - ARM Linux
2010-12-14 20:32 ` Jeff Ohlstein
2010-12-13 19:18 ` [PATCH 09/24] ARM: netx: " Russell King - ARM Linux
` (15 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:17 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-msm/timer.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 950100f..595be7f 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -137,7 +137,6 @@ static struct msm_clock msm_clocks[] = {
.rating = 200,
.read = msm_gpt_read,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 17,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
},
.irq = {
@@ -164,7 +163,6 @@ static struct msm_clock msm_clocks[] = {
.rating = 300,
.read = msm_dgt_read,
.mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)),
- .shift = 24 - MSM_DGT_SHIFT,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
},
.irq = {
@@ -205,8 +203,7 @@ static void __init msm_timer_init(void)
ce->min_delta_ns = clockevent_delta2ns(4, ce);
ce->cpumask = cpumask_of(0);
- cs->mult = clocksource_hz2mult(clock->freq, cs->shift);
- res = clocksource_register(cs);
+ res = clocksource_register_hz(cs, clock->freq);
if (res)
printk(KERN_ERR "msm_timer_init: clocksource_register "
"failed for %s\n", cs->name);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 08/24] ARM: MSM: update clock source registration
2010-12-13 19:17 ` [PATCH 08/24] ARM: MSM: " Russell King - ARM Linux
@ 2010-12-14 20:32 ` Jeff Ohlstein
0 siblings, 0 replies; 39+ messages in thread
From: Jeff Ohlstein @ 2010-12-14 20:32 UTC (permalink / raw)
To: linux-arm-kernel
Russell King - ARM Linux wrote:
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of the
> divisor shift/mult constants. Switch over to using this new interface.
>
>
Tested-By: Jeff Ohlstein <johlstei@codeaurora.org>
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 09/24] ARM: netx: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (7 preceding siblings ...)
2010-12-13 19:17 ` [PATCH 08/24] ARM: MSM: " Russell King - ARM Linux
@ 2010-12-13 19:18 ` Russell King - ARM Linux
2010-12-13 19:18 ` [PATCH 10/24] ARM: ns9xxx: " Russell King - ARM Linux
` (14 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:18 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-netx/time.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index 82801db..f12f22d 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -114,7 +114,6 @@ static struct clocksource clocksource_netx = {
.rating = 200,
.read = netx_get_cycles,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -151,9 +150,7 @@ static void __init netx_timer_init(void)
writel(NETX_GPIO_COUNTER_CTRL_RUN,
NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE));
- clocksource_netx.mult =
- clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift);
- clocksource_register(&clocksource_netx);
+ clocksource_register_hz(&clocksource_netx, CLOCK_TICK_RATE);
netx_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC,
netx_clockevent.shift);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 10/24] ARM: ns9xxx: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (8 preceding siblings ...)
2010-12-13 19:18 ` [PATCH 09/24] ARM: netx: " Russell King - ARM Linux
@ 2010-12-13 19:18 ` Russell King - ARM Linux
2010-12-13 19:18 ` [PATCH 11/24] ARM: omap: " Russell King - ARM Linux
` (13 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:18 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-ns9xxx/time-ns9360.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-ns9xxx/time-ns9360.c b/arch/arm/mach-ns9xxx/time-ns9360.c
index 7728126..9ca32f5 100644
--- a/arch/arm/mach-ns9xxx/time-ns9360.c
+++ b/arch/arm/mach-ns9xxx/time-ns9360.c
@@ -35,7 +35,6 @@ static struct clocksource ns9360_clocksource = {
.rating = 300,
.read = ns9360_clocksource_read,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -148,10 +147,7 @@ static void __init ns9360_timer_init(void)
__raw_writel(tc, SYS_TC(TIMER_CLOCKSOURCE));
- ns9360_clocksource.mult = clocksource_hz2mult(ns9360_cpuclock(),
- ns9360_clocksource.shift);
-
- clocksource_register(&ns9360_clocksource);
+ clocksource_register_hz(&ns9360_clocksource, ns9360_cpuclock());
latch = SH_DIV(ns9360_cpuclock(), HZ, 0);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 11/24] ARM: omap: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (9 preceding siblings ...)
2010-12-13 19:18 ` [PATCH 10/24] ARM: ns9xxx: " Russell King - ARM Linux
@ 2010-12-13 19:18 ` Russell King - ARM Linux
2010-12-13 19:19 ` [PATCH 12/24] ARM: PXA: " Russell King - ARM Linux
` (12 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:18 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-omap1/time.c | 6 +-----
arch/arm/mach-omap2/timer-gp.c | 5 +----
arch/arm/plat-omap/counter_32k.c | 6 +-----
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 1be6a21..abb34ff 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -208,7 +208,6 @@ static struct clocksource clocksource_mpu = {
.rating = 300,
.read = mpu_read,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 24,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -217,13 +216,10 @@ static void __init omap_init_clocksource(unsigned long rate)
static char err[] __initdata = KERN_ERR
"%s: can't register clocksource!\n";
- clocksource_mpu.mult
- = clocksource_khz2mult(rate/1000, clocksource_mpu.shift);
-
setup_irq(INT_TIMER2, &omap_mpu_timer2_irq);
omap_mpu_timer_start(1, ~0, 1);
- if (clocksource_register(&clocksource_mpu))
+ if (clocksource_register_hz(&clocksource_mpu, rate))
printk(err, clocksource_mpu.name);
}
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index e13c29e..a7816db 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -195,7 +195,6 @@ static struct clocksource clocksource_gpt = {
.rating = 300,
.read = clocksource_read_cycles,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 24,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -220,9 +219,7 @@ static void __init omap2_gp_clocksource_init(void)
omap_dm_timer_set_load_start(gpt, 1, 0);
- clocksource_gpt.mult =
- clocksource_khz2mult(tick_rate/1000, clocksource_gpt.shift);
- if (clocksource_register(&clocksource_gpt))
+ if (clocksource_register_hz(&clocksource_gpt, tick_rate))
printk(err2, clocksource_gpt.name);
}
#endif
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index 155fe43..8f149f5 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -102,7 +102,6 @@ static struct clocksource clocksource_32k = {
.rating = 250,
.read = omap_32k_read_dummy,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 10,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -167,12 +166,9 @@ static int __init omap_init_clocksource_32k(void)
if (sync_32k_ick)
clk_enable(sync_32k_ick);
- clocksource_32k.mult = clocksource_hz2mult(32768,
- clocksource_32k.shift);
-
offset_32k = clocksource_32k.read(&clocksource_32k);
- if (clocksource_register(&clocksource_32k))
+ if (clocksource_register_hz(&clocksource_32k, 32768))
printk(err, clocksource_32k.name);
}
return 0;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 12/24] ARM: PXA: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (10 preceding siblings ...)
2010-12-13 19:18 ` [PATCH 11/24] ARM: omap: " Russell King - ARM Linux
@ 2010-12-13 19:19 ` Russell King - ARM Linux
2010-12-14 3:09 ` Eric Miao
2010-12-13 19:19 ` [PATCH 13/24] ARM: s5pv310: " Russell King - ARM Linux
` (11 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:19 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-pxa/time.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 293e40a..caf92c0 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -127,7 +127,6 @@ static struct clocksource cksrc_pxa_oscr0 = {
.rating = 200,
.read = pxa_read_oscr,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -155,12 +154,9 @@ static void __init pxa_timer_init(void)
clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1;
ckevt_pxa_osmr0.cpumask = cpumask_of(0);
- cksrc_pxa_oscr0.mult =
- clocksource_hz2mult(clock_tick_rate, cksrc_pxa_oscr0.shift);
-
setup_irq(IRQ_OST0, &pxa_ost0_irq);
- clocksource_register(&cksrc_pxa_oscr0);
+ clocksource_register_hz(&cksrc_pxa_oscr0, clock_tick_rate);
clockevents_register_device(&ckevt_pxa_osmr0);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 12/24] ARM: PXA: update clock source registration
2010-12-13 19:19 ` [PATCH 12/24] ARM: PXA: " Russell King - ARM Linux
@ 2010-12-14 3:09 ` Eric Miao
2010-12-16 10:38 ` Russell King - ARM Linux
0 siblings, 1 reply; 39+ messages in thread
From: Eric Miao @ 2010-12-14 3:09 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Dec 14, 2010 at 3:19 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of the
> divisor shift/mult constants. ?Switch over to using this new interface.
>
Russell,
This has been already addressed in Haojian's previous patch posted and
merged in my tree:
http://git.kernel.org/?p=linux/kernel/git/ycmiao/pxa-linux-2.6.git;a=commitdiff;h=ee5ed917c3c412e0e13d1c198b5f09f82c03eea4
I'll send the pull request out early today to sort this out.
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> ?arch/arm/mach-pxa/time.c | ? ?6 +-----
> ?1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
> index 293e40a..caf92c0 100644
> --- a/arch/arm/mach-pxa/time.c
> +++ b/arch/arm/mach-pxa/time.c
> @@ -127,7 +127,6 @@ static struct clocksource cksrc_pxa_oscr0 = {
> ? ? ? ?.rating ? ? ? ? = 200,
> ? ? ? ?.read ? ? ? ? ? = pxa_read_oscr,
> ? ? ? ?.mask ? ? ? ? ? = CLOCKSOURCE_MASK(32),
> - ? ? ? .shift ? ? ? ? ?= 20,
> ? ? ? ?.flags ? ? ? ? ?= CLOCK_SOURCE_IS_CONTINUOUS,
> ?};
>
> @@ -155,12 +154,9 @@ static void __init pxa_timer_init(void)
> ? ? ? ? ? ? ? ?clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1;
> ? ? ? ?ckevt_pxa_osmr0.cpumask = cpumask_of(0);
>
> - ? ? ? cksrc_pxa_oscr0.mult =
> - ? ? ? ? ? ? ? clocksource_hz2mult(clock_tick_rate, cksrc_pxa_oscr0.shift);
> -
> ? ? ? ?setup_irq(IRQ_OST0, &pxa_ost0_irq);
>
> - ? ? ? clocksource_register(&cksrc_pxa_oscr0);
> + ? ? ? clocksource_register_hz(&cksrc_pxa_oscr0, clock_tick_rate);
> ? ? ? ?clockevents_register_device(&ckevt_pxa_osmr0);
> ?}
>
> --
> 1.6.2.5
>
>
^ permalink raw reply [flat|nested] 39+ messages in thread* [PATCH 12/24] ARM: PXA: update clock source registration
2010-12-14 3:09 ` Eric Miao
@ 2010-12-16 10:38 ` Russell King - ARM Linux
2010-12-20 15:10 ` Eric Miao
0 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-16 10:38 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Dec 14, 2010 at 11:09:21AM +0800, Eric Miao wrote:
> On Tue, Dec 14, 2010 at 3:19 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> > interfaces were added which simplify (and optimize) the selection of the
> > divisor shift/mult constants. ?Switch over to using this new interface.
> >
>
> Russell,
>
> This has been already addressed in Haojian's previous patch posted and
> merged in my tree:
>
> http://git.kernel.org/?p=linux/kernel/git/ycmiao/pxa-linux-2.6.git;a=commitdiff;h=ee5ed917c3c412e0e13d1c198b5f09f82c03eea4
>
> I'll send the pull request out early today to sort this out.
That's not quite the same. clocksource_calc_mult_shift() was introduced
in November 2009, whereas clocksource_register_hz() was introduced in
May 2010. I'm updating everything to the latest interface.
The newer interface removes the burden of having to figure out what to
pass as the 'minsec' parameter, as well as simplifying the clocksource
registration code down to one line.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 12/24] ARM: PXA: update clock source registration
2010-12-16 10:38 ` Russell King - ARM Linux
@ 2010-12-20 15:10 ` Eric Miao
0 siblings, 0 replies; 39+ messages in thread
From: Eric Miao @ 2010-12-20 15:10 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Dec 16, 2010 at 6:38 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Tue, Dec 14, 2010 at 11:09:21AM +0800, Eric Miao wrote:
>> On Tue, Dec 14, 2010 at 3:19 AM, Russell King - ARM Linux
>> <linux@arm.linux.org.uk> wrote:
>> > In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
>> > interfaces were added which simplify (and optimize) the selection of the
>> > divisor shift/mult constants. ?Switch over to using this new interface.
>> >
>>
>> Russell,
>>
>> This has been already addressed in Haojian's previous patch posted and
>> merged in my tree:
>>
>> http://git.kernel.org/?p=linux/kernel/git/ycmiao/pxa-linux-2.6.git;a=commitdiff;h=ee5ed917c3c412e0e13d1c198b5f09f82c03eea4
>>
>> I'll send the pull request out early today to sort this out.
>
> That's not quite the same. ?clocksource_calc_mult_shift() was introduced
> in November 2009, whereas clocksource_register_hz() was introduced in
> May 2010. ?I'm updating everything to the latest interface.
>
> The newer interface removes the burden of having to figure out what to
> pass as the 'minsec' parameter, as well as simplifying the clocksource
> registration code down to one line.
>
>
OK. I'll drop the patch from my queue.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 13/24] ARM: s5pv310: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (11 preceding siblings ...)
2010-12-13 19:19 ` [PATCH 12/24] ARM: PXA: " Russell King - ARM Linux
@ 2010-12-13 19:19 ` Russell King - ARM Linux
2010-12-17 4:49 ` Kukjin Kim
2010-12-13 19:19 ` [PATCH 14/24] ARM: SA11x0: " Russell King - ARM Linux
` (10 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:19 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-s5pv310/time.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-s5pv310/time.c b/arch/arm/mach-s5pv310/time.c
index 01b012a..b262d46 100644
--- a/arch/arm/mach-s5pv310/time.c
+++ b/arch/arm/mach-s5pv310/time.c
@@ -211,7 +211,6 @@ struct clocksource pwm_clocksource = {
.rating = 250,
.read = s5pv310_pwm4_read,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS ,
};
@@ -230,10 +229,7 @@ static void __init s5pv310_clocksource_init(void)
s5pv310_pwm_init(4, ~0);
s5pv310_pwm_start(4, 1);
- pwm_clocksource.mult =
- clocksource_khz2mult(clock_rate/1000, pwm_clocksource.shift);
-
- if (clocksource_register(&pwm_clocksource))
+ if (clocksource_register_hz(&pwm_clocksource, clock_rate))
panic("%s: can't register clocksource\n", pwm_clocksource.name);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 13/24] ARM: s5pv310: update clock source registration
2010-12-13 19:19 ` [PATCH 13/24] ARM: s5pv310: " Russell King - ARM Linux
@ 2010-12-17 4:49 ` Kukjin Kim
0 siblings, 0 replies; 39+ messages in thread
From: Kukjin Kim @ 2010-12-17 4:49 UTC (permalink / raw)
To: linux-arm-kernel
Russell King wrote:
>
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
> arch/arm/mach-s5pv310/time.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv310/time.c b/arch/arm/mach-s5pv310/time.c
> index 01b012a..b262d46 100644
> --- a/arch/arm/mach-s5pv310/time.c
> +++ b/arch/arm/mach-s5pv310/time.c
> @@ -211,7 +211,6 @@ struct clocksource pwm_clocksource = {
> .rating = 250,
> .read = s5pv310_pwm4_read,
> .mask = CLOCKSOURCE_MASK(32),
> - .shift = 20,
> .flags = CLOCK_SOURCE_IS_CONTINUOUS ,
> };
>
> @@ -230,10 +229,7 @@ static void __init s5pv310_clocksource_init(void)
> s5pv310_pwm_init(4, ~0);
> s5pv310_pwm_start(4, 1);
>
> - pwm_clocksource.mult =
> - clocksource_khz2mult(clock_rate/1000,
pwm_clocksource.shift);
> -
> - if (clocksource_register(&pwm_clocksource))
> + if (clocksource_register_hz(&pwm_clocksource, clock_rate))
> panic("%s: can't register clocksource\n",
> pwm_clocksource.name);
> }
>
> --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 14/24] ARM: SA11x0: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (12 preceding siblings ...)
2010-12-13 19:19 ` [PATCH 13/24] ARM: s5pv310: " Russell King - ARM Linux
@ 2010-12-13 19:19 ` Russell King - ARM Linux
2010-12-13 19:20 ` [PATCH 15/24] ARM: tcc8k: " Russell King - ARM Linux
` (9 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:19 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-sa1100/time.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 74b6e0e..96154f5 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -81,7 +81,6 @@ static struct clocksource cksrc_sa1100_oscr = {
.rating = 200,
.read = sa1100_read_oscr,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -105,12 +104,9 @@ static void __init sa1100_timer_init(void)
clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_sa1100_osmr0) + 1;
ckevt_sa1100_osmr0.cpumask = cpumask_of(0);
- cksrc_sa1100_oscr.mult =
- clocksource_hz2mult(CLOCK_TICK_RATE, cksrc_sa1100_oscr.shift);
-
setup_irq(IRQ_OST0, &sa1100_timer_irq);
- clocksource_register(&cksrc_sa1100_oscr);
+ clocksource_register_hz(&cksrc_sa1100_oscr, CLOCK_TICK_RATE);
clockevents_register_device(&ckevt_sa1100_osmr0);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 15/24] ARM: tcc8k: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (13 preceding siblings ...)
2010-12-13 19:19 ` [PATCH 14/24] ARM: SA11x0: " Russell King - ARM Linux
@ 2010-12-13 19:20 ` Russell King - ARM Linux
2010-12-13 19:20 ` [PATCH 16/24] ARM: U300: " Russell King - ARM Linux
` (8 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:20 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-tcc8k/time.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-tcc8k/time.c b/arch/arm/mach-tcc8k/time.c
index 78d0600..e0a8d60 100644
--- a/arch/arm/mach-tcc8k/time.c
+++ b/arch/arm/mach-tcc8k/time.c
@@ -35,7 +35,6 @@ static struct clocksource clocksource_tcc = {
.rating = 200,
.read = tcc_get_cycles,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 28,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -103,9 +102,7 @@ static int __init tcc_clockevent_init(struct clk *clock)
{
unsigned int c = clk_get_rate(clock);
- clocksource_tcc.mult = clocksource_hz2mult(c,
- clocksource_tcc.shift);
- clocksource_register(&clocksource_tcc);
+ clocksource_register_hz(&clocksource_tcc, c);
clockevent_tcc.mult = div_sc(c, NSEC_PER_SEC,
clockevent_tcc.shift);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 16/24] ARM: U300: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (14 preceding siblings ...)
2010-12-13 19:20 ` [PATCH 15/24] ARM: tcc8k: " Russell King - ARM Linux
@ 2010-12-13 19:20 ` Russell King - ARM Linux
2010-12-14 4:02 ` Linus WALLEIJ
2010-12-13 19:20 ` [PATCH 17/24] ARM: nuc: " Russell King - ARM Linux
` (7 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:20 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-u300/timer.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c
index 3fc4472..377ff7f 100644
--- a/arch/arm/mach-u300/timer.c
+++ b/arch/arm/mach-u300/timer.c
@@ -412,9 +412,7 @@ static void __init u300_timer_init(void)
writel(U300_TIMER_APP_EGPT2_TIMER_ENABLE,
U300_TIMER_APP_VBASE + U300_TIMER_APP_EGPT2);
- clocksource_calc_mult_shift(&clocksource_u300_1mhz,
- rate, APPTIMER_MIN_RANGE);
- if (clocksource_register(&clocksource_u300_1mhz))
+ if (clocksource_register_hz(&clocksource_u300_1mhz, rate))
printk(KERN_ERR "timer: failed to initialize clock "
"source %s\n", clocksource_u300_1mhz.name);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 16/24] ARM: U300: update clock source registration
2010-12-13 19:20 ` [PATCH 16/24] ARM: U300: " Russell King - ARM Linux
@ 2010-12-14 4:02 ` Linus WALLEIJ
0 siblings, 0 replies; 39+ messages in thread
From: Linus WALLEIJ @ 2010-12-14 4:02 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of
> the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
I remember pushing TGLX about simplifying mult/shift calculation
very early, it's nice to see it being ever more consolidated!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 17/24] ARM: nuc: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (15 preceding siblings ...)
2010-12-13 19:20 ` [PATCH 16/24] ARM: U300: " Russell King - ARM Linux
@ 2010-12-13 19:20 ` Russell King - ARM Linux
2010-12-13 19:21 ` [PATCH 18/24] ARM: iop: " Russell King - ARM Linux
` (6 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:20 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-w90x900/time.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c
index b80f769..4b089cb 100644
--- a/arch/arm/mach-w90x900/time.c
+++ b/arch/arm/mach-w90x900/time.c
@@ -153,7 +153,6 @@ static struct clocksource clocksource_nuc900 = {
.rating = 200,
.read = nuc900_get_cycles,
.mask = CLOCKSOURCE_MASK(TDR_SHIFT),
- .shift = 10,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -176,9 +175,7 @@ static void __init nuc900_clocksource_init(void)
val |= (COUNTEN | PERIOD | PRESCALE);
__raw_writel(val, REG_TCSR1);
- clocksource_nuc900.mult =
- clocksource_khz2mult((rate / 1000), clocksource_nuc900.shift);
- clocksource_register(&clocksource_nuc900);
+ clocksource_register_hz(&clocksource_nuc900, rate);
}
static void __init nuc900_timer_init(void)
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 18/24] ARM: iop: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (16 preceding siblings ...)
2010-12-13 19:20 ` [PATCH 17/24] ARM: nuc: " Russell King - ARM Linux
@ 2010-12-13 19:21 ` Russell King - ARM Linux
2010-12-13 19:21 ` [PATCH 19/24] ARM: mxc: " Russell King - ARM Linux
` (5 subsequent siblings)
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:21 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/plat-iop/time.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index 558cdfa..432a5b7 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -172,7 +172,5 @@ void __init iop_init_time(unsigned long tick_rate)
write_trr1(0xffffffff);
write_tcr1(0xffffffff);
write_tmr1(timer_ctl);
- clocksource_calc_mult_shift(&iop_clocksource, tick_rate,
- IOP_MIN_RANGE);
- clocksource_register(&iop_clocksource);
+ clocksource_register_hz(&iop_clocksource, tick_rate);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 19/24] ARM: mxc: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (17 preceding siblings ...)
2010-12-13 19:21 ` [PATCH 18/24] ARM: iop: " Russell King - ARM Linux
@ 2010-12-13 19:21 ` Russell King - ARM Linux
2010-12-14 10:46 ` Sascha Hauer
2010-12-13 19:21 ` [PATCH 20/24] ARM: nomadik: " Russell King - ARM Linux
` (4 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:21 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/plat-mxc/epit.c | 5 +----
arch/arm/plat-mxc/time.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c
index ee9582f..d69d343 100644
--- a/arch/arm/plat-mxc/epit.c
+++ b/arch/arm/plat-mxc/epit.c
@@ -93,7 +93,6 @@ static struct clocksource clocksource_epit = {
.rating = 200,
.read = epit_read,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -101,9 +100,7 @@ static int __init epit_clocksource_init(struct clk *timer_clk)
{
unsigned int c = clk_get_rate(timer_clk);
- clocksource_epit.mult = clocksource_hz2mult(c,
- clocksource_epit.shift);
- clocksource_register(&clocksource_epit);
+ clocksource_register_hz(&clocksource_epit, c);
return 0;
}
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index f9a1b05..9f0c261 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -120,7 +120,6 @@ static struct clocksource clocksource_mxc = {
.rating = 200,
.read = mx1_2_get_cycles,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -131,9 +130,7 @@ static int __init mxc_clocksource_init(struct clk *timer_clk)
if (timer_is_v2())
clocksource_mxc.read = v2_get_cycles;
- clocksource_mxc.mult = clocksource_hz2mult(c,
- clocksource_mxc.shift);
- clocksource_register(&clocksource_mxc);
+ clocksource_register_hz(&clocksource_mxc, c);
return 0;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 19/24] ARM: mxc: update clock source registration
2010-12-13 19:21 ` [PATCH 19/24] ARM: mxc: " Russell King - ARM Linux
@ 2010-12-14 10:46 ` Sascha Hauer
0 siblings, 0 replies; 39+ messages in thread
From: Sascha Hauer @ 2010-12-14 10:46 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 13, 2010 at 07:21:26PM +0000, Russell King - ARM Linux wrote:
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 20/24] ARM: nomadik: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (18 preceding siblings ...)
2010-12-13 19:21 ` [PATCH 19/24] ARM: mxc: " Russell King - ARM Linux
@ 2010-12-13 19:21 ` Russell King - ARM Linux
2010-12-14 4:04 ` Linus WALLEIJ
2010-12-13 19:22 ` [PATCH 21/24] ARM: spear: " Russell King - ARM Linux
` (3 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:21 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/plat-nomadik/timer.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c
index 63cdc60..b0bd6df 100644
--- a/arch/arm/plat-nomadik/timer.c
+++ b/arch/arm/plat-nomadik/timer.c
@@ -222,7 +222,6 @@ void __init nmdk_timer_init(void)
} else {
cr |= MTU_CRn_PRESCALE_1;
}
- clocksource_calc_mult_shift(&nmdk_clksrc, rate, MTU_MIN_RANGE);
/* Timer 0 is the free running clocksource */
writel(cr, mtu_base + MTU_CR(0));
@@ -233,7 +232,7 @@ void __init nmdk_timer_init(void)
/* Now the clock source is ready */
nmdk_clksrc.read = nmdk_read_timer;
- if (clocksource_register(&nmdk_clksrc))
+ if (clocksource_register_hz(&nmdk_clksrc, rate))
pr_err("timer: failed to initialize clock source %s\n",
nmdk_clksrc.name);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 20/24] ARM: nomadik: update clock source registration
2010-12-13 19:21 ` [PATCH 20/24] ARM: nomadik: " Russell King - ARM Linux
@ 2010-12-14 4:04 ` Linus WALLEIJ
0 siblings, 0 replies; 39+ messages in thread
From: Linus WALLEIJ @ 2010-12-14 4:04 UTC (permalink / raw)
To: linux-arm-kernel
> From: Russell King [mailto:rmk at arm.linux.org.uk] On Behalf Of Russell
>
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of
> the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 21/24] ARM: spear: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (19 preceding siblings ...)
2010-12-13 19:21 ` [PATCH 20/24] ARM: nomadik: " Russell King - ARM Linux
@ 2010-12-13 19:22 ` Russell King - ARM Linux
2010-12-14 4:04 ` viresh kumar
2010-12-13 19:22 ` [PATCH 22/24] ARM: orion: " Russell King - ARM Linux
` (2 subsequent siblings)
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:22 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/plat-spear/time.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
index ab21165..839c88d 100644
--- a/arch/arm/plat-spear/time.c
+++ b/arch/arm/plat-spear/time.c
@@ -81,8 +81,6 @@ static struct clocksource clksrc = {
.rating = 200, /* its a pretty decent clock */
.read = clocksource_read_cycles,
.mask = 0xFFFF, /* 16 bits */
- .mult = 0, /* to be computed */
- .shift = 0, /* to be computed */
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -105,10 +103,8 @@ static void spear_clocksource_init(void)
val |= CTRL_ENABLE ;
writew(val, gpt_base + CR(CLKSRC));
- clocksource_calc_mult_shift(&clksrc, tick_rate, SPEAR_MIN_RANGE);
-
/* register the clocksource */
- clocksource_register(&clksrc);
+ clocksource_register_hz(&clksrc, tick_rate);
}
static struct clock_event_device clkevt = {
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 21/24] ARM: spear: update clock source registration
2010-12-13 19:22 ` [PATCH 21/24] ARM: spear: " Russell King - ARM Linux
@ 2010-12-14 4:04 ` viresh kumar
0 siblings, 0 replies; 39+ messages in thread
From: viresh kumar @ 2010-12-14 4:04 UTC (permalink / raw)
To: linux-arm-kernel
On 12/14/2010 12:52 AM, Russell King - ARM Linux wrote:
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/plat-spear/time.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
> index ab21165..839c88d 100644
> --- a/arch/arm/plat-spear/time.c
> +++ b/arch/arm/plat-spear/time.c
> @@ -81,8 +81,6 @@ static struct clocksource clksrc = {
> .rating = 200, /* its a pretty decent clock */
> .read = clocksource_read_cycles,
> .mask = 0xFFFF, /* 16 bits */
> - .mult = 0, /* to be computed */
> - .shift = 0, /* to be computed */
> .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> };
>
> @@ -105,10 +103,8 @@ static void spear_clocksource_init(void)
> val |= CTRL_ENABLE ;
> writew(val, gpt_base + CR(CLKSRC));
>
> - clocksource_calc_mult_shift(&clksrc, tick_rate, SPEAR_MIN_RANGE);
> -
> /* register the clocksource */
> - clocksource_register(&clksrc);
> + clocksource_register_hz(&clksrc, tick_rate);
> }
>
> static struct clock_event_device clkevt = {
Acked-by: Viresh Kumar <viresh.kumar@st.com>
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 22/24] ARM: orion: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (20 preceding siblings ...)
2010-12-13 19:22 ` [PATCH 21/24] ARM: spear: " Russell King - ARM Linux
@ 2010-12-13 19:22 ` Russell King - ARM Linux
2010-12-13 19:26 ` Nicolas Pitre
2010-12-13 19:22 ` [PATCH 23/24] ARM: stmp: " Russell King - ARM Linux
2010-12-13 19:23 ` [PATCH 24/24] ARM: realview/versatile: " Russell King - ARM Linux
23 siblings, 1 reply; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:22 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/plat-orion/time.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index 715a301..11e2583 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -102,7 +102,6 @@ static cycle_t orion_clksrc_read(struct clocksource *cs)
static struct clocksource orion_clksrc = {
.name = "orion_clocksource",
- .shift = 20,
.rating = 300,
.read = orion_clksrc_read,
.mask = CLOCKSOURCE_MASK(32),
@@ -245,8 +244,7 @@ void __init orion_time_init(unsigned int irq, unsigned int tclk)
writel(u & ~BRIDGE_INT_TIMER0, BRIDGE_MASK);
u = readl(TIMER_CTRL);
writel(u | TIMER0_EN | TIMER0_RELOAD_EN, TIMER_CTRL);
- orion_clksrc.mult = clocksource_hz2mult(tclk, orion_clksrc.shift);
- clocksource_register(&orion_clksrc);
+ clocksource_register_hz(&orion_clksrc, tclk);
/*
* Setup clockevent timer (interrupt-driven.)
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 22/24] ARM: orion: update clock source registration
2010-12-13 19:22 ` [PATCH 22/24] ARM: orion: " Russell King - ARM Linux
@ 2010-12-13 19:26 ` Nicolas Pitre
0 siblings, 0 replies; 39+ messages in thread
From: Nicolas Pitre @ 2010-12-13 19:26 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 13 Dec 2010, Russell King - ARM Linux wrote:
> In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
> interfaces were added which simplify (and optimize) the selection of the
> divisor shift/mult constants. Switch over to using this new interface.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
> ---
> arch/arm/plat-orion/time.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
> index 715a301..11e2583 100644
> --- a/arch/arm/plat-orion/time.c
> +++ b/arch/arm/plat-orion/time.c
> @@ -102,7 +102,6 @@ static cycle_t orion_clksrc_read(struct clocksource *cs)
>
> static struct clocksource orion_clksrc = {
> .name = "orion_clocksource",
> - .shift = 20,
> .rating = 300,
> .read = orion_clksrc_read,
> .mask = CLOCKSOURCE_MASK(32),
> @@ -245,8 +244,7 @@ void __init orion_time_init(unsigned int irq, unsigned int tclk)
> writel(u & ~BRIDGE_INT_TIMER0, BRIDGE_MASK);
> u = readl(TIMER_CTRL);
> writel(u | TIMER0_EN | TIMER0_RELOAD_EN, TIMER_CTRL);
> - orion_clksrc.mult = clocksource_hz2mult(tclk, orion_clksrc.shift);
> - clocksource_register(&orion_clksrc);
> + clocksource_register_hz(&orion_clksrc, tclk);
>
> /*
> * Setup clockevent timer (interrupt-driven.)
> --
> 1.6.2.5
>
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 23/24] ARM: stmp: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (21 preceding siblings ...)
2010-12-13 19:22 ` [PATCH 22/24] ARM: orion: " Russell King - ARM Linux
@ 2010-12-13 19:22 ` Russell King - ARM Linux
2010-12-13 19:23 ` [PATCH 24/24] ARM: realview/versatile: " Russell King - ARM Linux
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:22 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/plat-stmp3xxx/timer.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-stmp3xxx/timer.c b/arch/arm/plat-stmp3xxx/timer.c
index 063c7bc..c395630 100644
--- a/arch/arm/plat-stmp3xxx/timer.c
+++ b/arch/arm/plat-stmp3xxx/timer.c
@@ -89,7 +89,6 @@ static struct clocksource cksrc_stmp3xxx = {
.rating = 250,
.read = stmp3xxx_clock_read,
.mask = CLOCKSOURCE_MASK(16),
- .shift = 10,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -106,8 +105,6 @@ static struct irqaction stmp3xxx_timer_irq = {
*/
static void __init stmp3xxx_init_timer(void)
{
- cksrc_stmp3xxx.mult = clocksource_hz2mult(CLOCK_TICK_RATE,
- cksrc_stmp3xxx.shift);
ckevt_timrot.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC,
ckevt_timrot.shift);
ckevt_timrot.min_delta_ns = clockevent_delta2ns(2, &ckevt_timrot);
@@ -140,7 +137,7 @@ static void __init stmp3xxx_init_timer(void)
setup_irq(IRQ_TIMER0, &stmp3xxx_timer_irq);
- clocksource_register(&cksrc_stmp3xxx);
+ clocksource_register_hz(&cksrc_stmp3xxx, CLOCK_TICK_RATE);
clockevents_register_device(&ckevt_timrot);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread* [PATCH 24/24] ARM: realview/versatile: update clock source registration
2010-12-13 19:14 [PATCH 0/24] Update clocksource registration Russell King - ARM Linux
` (22 preceding siblings ...)
2010-12-13 19:22 ` [PATCH 23/24] ARM: stmp: " Russell King - ARM Linux
@ 2010-12-13 19:23 ` Russell King - ARM Linux
23 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2010-12-13 19:23 UTC (permalink / raw)
To: linux-arm-kernel
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/plat-versatile/timer-sp.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-versatile/timer-sp.c b/arch/arm/plat-versatile/timer-sp.c
index fb0d1c2..f09941b 100644
--- a/arch/arm/plat-versatile/timer-sp.c
+++ b/arch/arm/plat-versatile/timer-sp.c
@@ -46,7 +46,6 @@ static struct clocksource clocksource_sp804 = {
.rating = 200,
.read = sp804_read,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 20,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
@@ -63,8 +62,7 @@ void __init sp804_clocksource_init(void __iomem *base)
writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC,
clksrc_base + TIMER_CTRL);
- cs->mult = clocksource_khz2mult(TIMER_FREQ_KHZ, cs->shift);
- clocksource_register(cs);
+ clocksource_register_khz(cs, TIMER_FREQ_KHZ);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 39+ messages in thread