31 Mar, 2015

4 commits

  • The parent clock of the sun5i timer is the AHB clock, which rate
    might change because of other devices requirements.

    This is for example the case on the Allwinner A31, where the DMA
    controller needs a minimum rate higher than the default, that is
    enforced after the timer driver has probed.

    Add clock notifiers to make sure we reflect the clock rate
    changes in the timer rates.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1427796746-373-5-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Ingo Molnar

    Maxime Ripard
     
  • Refactor the code in order to remove the global variables and
    split the clock source and clock events registration in order to
    ease the addition of the clock notifiers needed to handle the
    parent clock rate changes.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1427796746-373-4-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Ingo Molnar

    Maxime Ripard
     
  • of_iomap doesn't do a request_mem_region() on the memory area
    defined in the DT it maps. Switch to of_io_request_and_map() to
    make sure we're the only users.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1427796746-373-3-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Ingo Molnar

    Maxime Ripard
     
  • The current code uses setup_irq(), while it could perfectly use
    the much simpler request_irq(). Switch to that.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1427796746-373-2-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Ingo Molnar

    Maxime Ripard
     

26 Mar, 2015

1 commit

  • The sun5i timer is used as the sched-clock on certain systems, and ever
    since we started using cpufreq, the cpu clock (that is one of the
    timer's clock indirect parent) now changes as well, along with the
    actual sched_clock() rate.

    This is not accurate and not desirable.

    We can safely remove the sun5i sched-clock on those systems, since we
    have other reliable sched_clock() sources in the system.

    Tested-by: Hans de Goede
    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    [ Improved the changelog. ]
    Cc: richard@nod.at
    Link: http://lkml.kernel.org/r/1427362029-6511-4-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Ingo Molnar

    Maxime Ripard
     

05 Mar, 2015

1 commit

  • The interrupt is enabled before the handler is set. Even this bug
    did not appear, it is potentially dangerous as it can lead to a
    NULL pointer dereference.

    Fix the error by enabling the interrupt after
    clockevents_config_and_register() is called.

    Cc: stable@vger.kernel.org
    Signed-off-by: Yongbae Park
    Signed-off-by: Daniel Lezcano

    Yongbae Park
     

22 Apr, 2014

1 commit


19 Jan, 2014

1 commit

  • The 32-bit sched_clock() interface supports 64 bits since
    3.13-rc1. Upgrade to the 64-bit function to allow us to remove
    the 32-bit registration interface.

    Signed-off-by: Stephen Boyd
    Acked-by: Daniel Lezcano
    Cc: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1389922686-6249-1-git-send-email-sboyd@codeaurora.org
    Signed-off-by: Ingo Molnar

    Stephen Boyd
     

11 Dec, 2013

1 commit

  • Most of the Allwinner SoCs (at this time, all but the A10) also have a
    High Speed timers that are not using the 24MHz oscillator as a source
    but rather the AHB clock running much faster.

    The IP is slightly different between the A10s/A13 and the one used in
    the A20/A31, since the latter have 4 timers available, while the former
    have only 2 of them.

    [dlezcano] : Fixed conflict with b788beda "Order Kconfig options
    alphabetically"

    Signed-off-by: Maxime Ripard
    Tested-by: Emilio López
    Signed-off-by: Daniel Lezcano

    Maxime Ripard