1. 07 4月, 2017 11 次提交
  2. 12 3月, 2017 1 次提交
  3. 02 3月, 2017 1 次提交
  4. 12 2月, 2017 1 次提交
  5. 08 2月, 2017 7 次提交
  6. 17 1月, 2017 1 次提交
  7. 25 12月, 2016 2 次提交
  8. 19 12月, 2016 1 次提交
  9. 01 12月, 2016 4 次提交
    • A
      clocksource: nps: avoid maybe-uninitialized warning · a26b0d49
      Arnd Bergmann 提交于
      We get a harmless false-positive warning with the newly added nps
      clocksource driver:
      
      drivers/clocksource/timer-nps.c: In function 'nps_setup_clocksource':
      drivers/clocksource/timer-nps.c:102:6: error: 'nps_timer1_freq' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      Gcc here fails to identify that IS_ERR() is only true if PTR_ERR()
      has a nonzero value. Using PTR_ERR_OR_ZERO() to convert the result
      first makes this obvious and shuts up the warning.
      
      Fixes: 0ee4d9922df5 ("clocksource: Add clockevent support to NPS400 driver")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      a26b0d49
    • N
      clocksource: Add clockevent support to NPS400 driver · 60263dcd
      Noam Camus 提交于
      Till now we used clockevent from generic ARC driver.
      This was enough as long as we worked with simple multicore SoC.
      When we are working with multithread SoC each HW thread can be
      scheduled to receive timer interrupt using timer mask register.
      This patch will provide a way to control clock events per HW thread.
      
      The design idea is that for each core there is dedicated register
      (TSI) serving all 16 HW threads.
      The register is a bitmask with one bit for each HW thread.
      When HW thread wants that next expiration of timer interrupt will
      hit it then the proper bit should be set in this dedicated register.
      When timer expires all HW threads within this core which their bit
      is set at the TSI register will be interrupted.
      
      Driver can be used from device tree by:
      compatible = "ezchip,nps400-timer0" <-- for clocksource
      compatible = "ezchip,nps400-timer1" <-- for clockevent
      
      Note that name convention for timer0/timer1 was taken from legacy
      ARC design. This design is our base before adding HW threads.
      For backward compatibility we keep "ezchip,nps400-timer" for clocksource
      Signed-off-by: NNoam Camus <noamca@mellanox.com>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NRob Herring <robh@kernel.org>
      60263dcd
    • N
      clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer · 0465fb49
      Noam Camus 提交于
      nps_setup_clocksource() should take node as only argument as defined by
      typedef int (*of_init_fn_1_ret)(struct device_node *)
      
      Therefore need to replace:
      int __init nps_setup_clocksource(struct device_node *node, struct clk *clk)
      with
      int __init nps_setup_clocksource(struct device_node *node)
      
      This patch also serve as preparation for next patch which add support
      for clockevents to nps400.
      Specifically we add new function nps_get_timer_clk() to serve clocksource
      and later clockevent registration.
      Signed-off-by: NNoam Camus <noamca@mellanox.com>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      0465fb49
    • V
      clocksource: import ARC timer driver · c4c9a040
      Vineet Gupta 提交于
      This adds support for
      
       - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP
         from @CNT to @LIMIT, before optionally triggering an interrupt.
         These are programmed using ARC auxiliary register interface.
         These are present in all ARC cores (ARC700 and ARC HS38)
         TIMER0 serves as clockevent for all ARC linux builds.
         TIMER1 is used for clocksource in arc700 builds.
      
       - CONFIG_ARC_TIMERS_64BIT: 64-bit counters, RTC and GFRC found in
         ARC HS38 cores. These are independnet IP blocks with different
         programming model respectively.
      
      Link: http://lkml.kernel.org/r/20161111231132.GA4186@maiAcked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      c4c9a040
  10. 22 11月, 2016 1 次提交
  11. 21 11月, 2016 2 次提交
  12. 21 10月, 2016 2 次提交
    • C
      Revert "clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init" · 59387683
      Chen-Yu Tsai 提交于
      struct clocksource is also used by the clk notifier callback, to
      unregister and re-register the clocksource with a different clock rate.
      clocksource_mmio_init does not pass back a pointer to the struct used,
      and the clk notifier callback assumes that the struct clocksource in
      struct sun5i_timer_clksrc is valid. This results in a kernel NULL
      pointer dereference when the hstimer clock is changed:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000004
      [<c03a4678>] (clocksource_unbind) from [<c03a46d4>] (clocksource_unregister+0x2c/0x44)
      [<c03a46d4>] (clocksource_unregister) from [<c0a6f350>] (sun5i_rate_cb_clksrc+0x34/0x3c)
      [<c0a6f350>] (sun5i_rate_cb_clksrc) from [<c035ea50>] (notifier_call_chain+0x44/0x84)
      [<c035ea50>] (notifier_call_chain) from [<c035edc0>] (__srcu_notifier_call_chain+0x44/0x60)
      [<c035edc0>] (__srcu_notifier_call_chain) from [<c035edf4>] (srcu_notifier_call_chain+0x18/0x20)
      [<c035edf4>] (srcu_notifier_call_chain) from [<c0670174>] (__clk_notify+0x70/0x7c)
      [<c0670174>] (__clk_notify) from [<c06702c0>] (clk_propagate_rate_change+0xa4/0xc4)
      [<c06702c0>] (clk_propagate_rate_change) from [<c0670288>] (clk_propagate_rate_change+0x6c/0xc4)
      
      Revert the commit for now. clocksource_mmio_init can be made to pass back
      a pointer, but the code churn and usage of an inner struct might not be
      worth it.
      
      Fixes: 157dfade ("clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init")
      Reported-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Cc: linux-sunxi@googlegroups.com
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/20161018054918.26855-1-wens@csie.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      59387683
    • R
      clocksource: Add J-Core timer/clocksource driver · 9995f4f1
      Rich Felker 提交于
      At the hardware level, the J-Core PIT is integrated with the interrupt
      controller, but it is represented as its own device and has an
      independent programming interface. It provides a 12-bit countdown
      timer, which is not presently used, and a periodic timer. The interval
      length for the latter is programmable via a 32-bit throttle register
      whose units are determined by a bus-period register. The periodic
      timer is used to implement both periodic and oneshot clock event
      modes; in oneshot mode the interrupt handler simply disables the timer
      as soon as it fires.
      
      Despite its device tree node representing an interrupt for the PIT,
      the actual irq generated is programmable, not hard-wired. The driver
      is responsible for programming the PIT to generate the hardware irq
      number that the DT assigns to it.
      
      On SMP configurations, J-Core provides cpu-local instances of the PIT;
      no broadcast timer is needed. This driver supports the creation of the
      necessary per-cpu clock_event_device instances.
      
      A nanosecond-resolution clocksource is provided using the J-Core "RTC"
      registers, which give a 64-bit seconds count and 32-bit nanoseconds
      that wrap every second. The driver converts these to a full-range
      32-bit nanoseconds count.
      Signed-off-by: NRich Felker <dalias@libc.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: devicetree@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Link: http://lkml.kernel.org/r/b591ff12cc5ebf63d1edc98da26046f95a233814.1476393790.git.dalias@libc.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      9995f4f1
  13. 18 10月, 2016 1 次提交
  14. 24 9月, 2016 2 次提交
  15. 22 9月, 2016 1 次提交
  16. 21 9月, 2016 2 次提交