22 Nov, 2011

1 commit

  • The i8253 clockevent & clocksource driver uses PIT_LATCH
    except for two cases where it uses LATCH:

    1)
    /* VIA686a test code... reset the latch if count > max + 1 */
    if (count > LATCH) {

    LATCH is based on CLOCK_TICK_RATE which is defined as
    PIT_TICK_RATE on x86 so this should just be the later.

    2)
    ...
    switch (mode) {
    case CLOCK_EVT_MODE_PERIODIC:
    /* binary, mode 2, LSB/MSB, ch 0 */
    outb_p(0x34, PIT_MODE);
    outb_p(LATCH & 0xff , PIT_CH0); /* LSB */
    outb_p(LATCH >> 8 , PIT_CH0); /* MSB */
    ...

    MIPS and ARM are the only other arches that use this driver. In
    the MIPS case CLOCK_TICK_RATE is defined as the same value as
    PIT_TICK_RATE. For ARM, the only machine that uses it is
    Footbridge which has a totally bogus CLOCK_TICK_RATE according
    to the comments. Furthermore, the clockevent_i8253_init()
    initializes the clockevent with PIT_TIC_RATE, so there's
    no reason to use the generic LATCH.

    This is part of work to remove and depecrate the global
    CLOCK_TICK_RATE symbol.

    Signed-off-by: Deepak Saxena
    Signed-off-by: John Stultz

    Deepak Saxena
     

01 Jul, 2011

1 commit

  • arm, mips and x86 implement i8253 based clockevents. All the same code
    copied. Create a common implementation in drivers/clocksource/i8253.c.

    About time to rename drivers/clocksource/ to something else.

    Signed-off-by: Thomas Gleixner
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: John Stultz
    Link: http://lkml.kernel.org/r/20110609130621.921710458@linutronix.de

    Thomas Gleixner
     

10 Jun, 2011

1 commit


09 Jun, 2011

3 commits

  • Now that all extra ifdeffed implementations are gone, depend the lock
    export on PCSPKR_PLATFORM

    Signed-off-by: Thomas Gleixner
    Cc: Ralf Baechle
    Cc: Russell King

    Thomas Gleixner
     
  • Move them to drivers/clocksource/i8253.c and remove the
    implementations in arch/

    [ tglx: Avoid the extra file in lib - folded arch patches in. The
    export will become conditional in a later step ]

    Signed-off-by: Ralf Baechle
    Link: http://lkml.kernel.org/r/20110601180610.221426078@duck.linux-mips.net
    Cc: Russell King
    Signed-off-by: Thomas Gleixner

    Ralf Baechle
     
  • Signed-off-by: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Link: http://lkml.kernel.org/r/20110601180610.054254048@duck.linux-mips.net
    Signed-off-by: Thomas Gleixner

    arch/arm/mach-footbridge/isa-timer.c | 2 +-
    arch/mips/cobalt/time.c | 2 +-
    arch/mips/jazz/irq.c | 2 +-
    arch/mips/kernel/i8253.c | 2 +-
    arch/mips/mti-malta/malta-time.c | 2 +-
    arch/mips/sgi-ip22/ip22-time.c | 2 +-
    arch/mips/sni/time.c | 2 +-
    arch/x86/kernel/apic/apic.c | 2 +-
    arch/x86/kernel/apm_32.c | 2 +-
    arch/x86/kernel/hpet.c | 2 +-
    arch/x86/kernel/i8253.c | 2 +-
    arch/x86/kernel/time.c | 2 +-
    drivers/block/hd.c | 2 +-
    drivers/clocksource/i8253.c | 2 +-
    drivers/input/gameport/gameport.c | 2 +-
    drivers/input/joystick/analog.c | 2 +-
    drivers/input/misc/pcspkr.c | 2 +-
    include/linux/i8253.h | 11 +++++++++++
    sound/drivers/pcsp/pcsp.h | 2 +-
    19 files changed, 29 insertions(+), 18 deletions(-)

    Ralf Baechle
     

14 May, 2011

1 commit