lkml.org 
[lkml]   [2011]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 7/8] clocksource: Convert m68k to use clocksource_register_hz/khz
    Date
    From: John Stultz <john.stultz@linaro.org>

    Cleanup m68k clocksource registration.

    This is untested, so any assistance in testing would be appreciated!

    CC: Geert Uytterhoeven <geert@linux-m68k.org>
    CC: Greg Ungerer <gerg@uclinux.org>
    CC: Lucas De Marchi <lucas.demarchi@profusion.mobi>
    Signed-off-by: John Stultz <john.stultz@linaro.org>
    ---
    arch/m68k/platform/coldfire/pit.c | 4 +---
    arch/m68k/platform/coldfire/sltimers.c | 4 +---
    arch/m68k/platform/coldfire/timers.c | 4 +---
    3 files changed, 3 insertions(+), 9 deletions(-)

    diff --git a/arch/m68k/platform/coldfire/pit.c b/arch/m68k/platform/coldfire/pit.c
    index c2b9809..02663d2 100644
    --- a/arch/m68k/platform/coldfire/pit.c
    +++ b/arch/m68k/platform/coldfire/pit.c
    @@ -144,7 +144,6 @@ static struct clocksource pit_clk = {
    .name = "pit",
    .rating = 100,
    .read = pit_read_clk,
    - .shift = 20,
    .mask = CLOCKSOURCE_MASK(32),
    };

    @@ -162,8 +161,7 @@ void hw_timer_init(void)

    setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq);

    - pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift);
    - clocksource_register(&pit_clk);
    + clocksource_register_hz(&pit_clk, FREQ);
    }

    /***************************************************************************/
    diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c
    index 6a85daf..b7f822b 100644
    --- a/arch/m68k/platform/coldfire/sltimers.c
    +++ b/arch/m68k/platform/coldfire/sltimers.c
    @@ -114,7 +114,6 @@ static struct clocksource mcfslt_clk = {
    .name = "slt",
    .rating = 250,
    .read = mcfslt_read_clk,
    - .shift = 20,
    .mask = CLOCKSOURCE_MASK(32),
    .flags = CLOCK_SOURCE_IS_CONTINUOUS,
    };
    @@ -136,8 +135,7 @@ void hw_timer_init(void)

    setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq);

    - mcfslt_clk.mult = clocksource_hz2mult(MCF_BUSCLK, mcfslt_clk.shift);
    - clocksource_register(&mcfslt_clk);
    + clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK);

    #ifdef CONFIG_HIGHPROFILE
    mcfslt_profile_init();
    diff --git a/arch/m68k/platform/coldfire/timers.c b/arch/m68k/platform/coldfire/timers.c
    index 60242f6..0d90da3 100644
    --- a/arch/m68k/platform/coldfire/timers.c
    +++ b/arch/m68k/platform/coldfire/timers.c
    @@ -88,7 +88,6 @@ static struct clocksource mcftmr_clk = {
    .name = "tmr",
    .rating = 250,
    .read = mcftmr_read_clk,
    - .shift = 20,
    .mask = CLOCKSOURCE_MASK(32),
    .flags = CLOCK_SOURCE_IS_CONTINUOUS,
    };
    @@ -109,8 +108,7 @@ void hw_timer_init(void)
    __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
    MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));

    - mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift);
    - clocksource_register(&mcftmr_clk);
    + clocksource_register_hz(&mcftmr_clk, FREQ);

    setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq);

    --
    1.7.3.2.146.gca209


    \
     
     \ /
      Last update: 2011-10-25 20:17    [W:0.032 / U:0.816 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site