19 Apr, 2017

1 commit

  • In preparation for ACPI GTDT support, this patch adds structs to
    describe the MMIO timers indepedent of the firmware interface.

    Subsequent patches will use these to split the FW/HW probing logic, so
    that the HW probing logic can be shared by ACPI and DT.

    Signed-off-by: Fu Wei
    Reviewed-by: Hanjun Guo
    Signed-off-by: Mark Rutland

    Fu Wei
     

10 Apr, 2017

2 commits


03 May, 2016

3 commits


14 Dec, 2015

1 commit


31 Dec, 2014

1 commit


26 Sep, 2013

2 commits

  • The ARM architected timer can generate events (used for waking up
    CPUs executing the wfe instruction) at a frequency represented as a
    power-of-2 divisor of the clock rate.

    An event stream might be used:
    - To implement wfe-based timeouts for userspace locking implementations.
    - To impose a timeout on a wfe for safeguarding against any programming
    error in case an expected event is not generated.

    This patch computes the event stream frequency aiming for a period
    of 100us between events. It uses ARM/ARM64 specific backends to configure
    and enable the event stream.

    Cc: Lorenzo Pieralisi
    Reviewed-by: Catalin Marinas
    Acked-by: Olof Johansson
    Signed-off-by: Will Deacon
    [sudeep: moving ARM/ARM64 changes into separate patches
    and adding Kconfig option]
    Signed-off-by: Sudeep KarkadaNagesha

    Will Deacon
     
  • Add macros to describe the bitfields in the ARM architected timer
    control register to make code easy to understand.

    Reviewed-by: Lorenzo Pieralisi
    Reviewed-by: Will Deacon
    Acked-by: Catalin Marinas
    Acked-by: Olof Johansson
    Signed-off-by: Sudeep KarkadaNagesha

    Sudeep KarkadaNagesha
     

01 Aug, 2013

2 commits

  • Add support for the memory mapped timers by filling in the
    read/write functions and adding some parsing code. Note that we
    only register one clocksource, preferring the cp15 based
    clocksource over the mmio one.

    To keep things simple we register one global clockevent. This
    covers the case of UP and SMP systems with only mmio hardware and
    systems where the memory mapped timers are used as the broadcast
    timer in low power modes.

    The DT binding allows for per-CPU memory mapped timers in case we
    want to support that in the future, but the code isn't added
    here. We also don't do much for hypervisor support, although it
    should be possible to support it by searching for at least two
    frames where one frame has the virtual capability and then
    updating KVM timers to support it.

    Cc: Mark Rutland
    Cc: Marc Zyngier
    Cc: Rob Herring
    Signed-off-by: Stephen Boyd
    Signed-off-by: Daniel Lezcano
    Acked-by: Mark Rutland

    Stephen Boyd
     
  • Using an enum for the register we wish to access allows newer
    compilers to determine if we've forgotten a case in our switch
    statement. This allows us to remove the BUILD_BUG() instances in
    the arm64 port, avoiding problems where optimizations may not
    happen.

    To try and force better code generation we're currently marking
    the accessor functions as inline, but newer compilers can ignore
    the inline keyword unless it's marked __always_inline. Luckily on
    arm and arm64 inline is __always_inline, but let's make
    everything __always_inline to be explicit.

    Suggested-by: Thomas Gleixner
    Cc: Thomas Gleixner
    Cc: Mark Rutland
    Cc: Marc Zyngier
    Signed-off-by: Stephen Boyd
    Signed-off-by: Daniel Lezcano
    Acked-by: Mark Rutland

    Stephen Boyd
     

07 Jun, 2013

1 commit

  • Switching between reading the virtual or physical counters is
    problematic, as some core code wants a view of time before we're fully
    set up. Using a function pointer and switching the source after the
    first read can make time appear to go backwards, and having a check in
    the read function is an unfortunate block on what we want to be a fast
    path.

    Instead, this patch makes us always use the virtual counters. If we're a
    guest, or don't have hyp mode, we'll use the virtual timers, and as such
    don't care about CNTVOFF as long as it doesn't change in such a way as
    to make time appear to travel backwards. As the guest will use the
    virtual timers, a (potential) KVM host must use the physical timers
    (which can wake up the host even if they fire while a guest is
    executing), and hence a host must have CNTVOFF set to zero so as to have
    a consistent view of time between the physical timers and virtual
    counters.

    Signed-off-by: Mark Rutland
    Acked-by: Catalin Marinas
    Acked-by: Marc Zyngier
    Acked-by: Santosh Shilimkar
    Cc: Rob Herring

    Mark Rutland
     

12 Apr, 2013

1 commit

  • This converts arm and arm64 to use CLKSRC_OF DT based initialization for
    the arch timer. A new function arch_timer_arch_init is added to allow for
    arch specific setup.

    This has a side effect of enabling sched_clock on omap5 and exynos5. There
    should not be any reason not to use the arch timers for sched_clock.

    Signed-off-by: Rob Herring
    Cc: Russell King
    Cc: Kukjin Kim
    Cc: Tony Lindgren
    Cc: Simon Horman
    Cc: Magnus Damm
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: John Stultz
    Cc: Thomas Gleixner
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: linux-omap@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Acked-by: Santosh Shilimkar

    Rob Herring
     

12 Feb, 2013

1 commit


31 Jan, 2013

1 commit

  • The core functionality of the arch_timer driver is not directly tied to
    anything under arch/arm, and can be split out.

    This patch factors out the core of the arch_timer driver, so it can be
    shared with other architectures. A couple of functions are added so
    that architecture-specific code can interact with the driver without
    needing to touch its internals.

    The ARM_ARCH_TIMER config variable is moved out to
    drivers/clocksource/Kconfig, existing uses in arch/arm are replaced with
    HAVE_ARM_ARCH_TIMER, which selects it.

    Signed-off-by: Mark Rutland
    Acked-by: Catalin Marinas
    Acked-by: Marc Zyngier

    Mark Rutland