1. 13 8月, 2018 1 次提交
  2. 19 5月, 2018 1 次提交
  3. 31 3月, 2018 1 次提交
  4. 09 3月, 2018 1 次提交
  5. 23 2月, 2018 2 次提交
  6. 22 2月, 2018 1 次提交
  7. 09 1月, 2018 2 次提交
  8. 20 10月, 2017 1 次提交
    • A
      clocksource: Improve GENERIC_CLOCKEVENTS dependency · 2f8a26c1
      Arnd Bergmann 提交于
      We regularly run into build errors when a clocksource driver selects
      CONFIG_TIMER_OF while CONFIG_GENERIC_CLOCKEVENTS is disabled:
      
      In file included from drivers/clocksource/timer-of.c:25:0:
      drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type
      
      At the moment, three drivers can show this behavior: ARMV7M_SYSTICK,
      CLKSRC_ST_LPC and CLKSRC_NPS. We could add further dependencies as we did
      many times, but I have looked a little bit more at what architectures
      are left that don't use GENERIC_CLOCKEVENTS, and this shows that there
      is a better solution.
      
      On arch/frv and arch/ia64, we never select CONFIG_GENERIC_CLOCKEVENTS
      and we also don't use ARCH_USES_GETTIMEOFFSET, which would
      block the clocksource Kconfig menu. On m68k, some platforms use
      CONFIG_GENERIC_CLOCKEVENTS, some use ARCH_USES_GETTIMEOFFSET, and some
      use neither of them. The good news is that there is no configuration that
      does not set CONFIG_GENERIC_CLOCKEVENTS but that wants to enable any of
      the Kconfig symbols in the menu, so we can simply replace the dependency
      with the stricter one. While in theory one could have a clocksource
      driver without the clockevent infrastructure, this seems unlikely
      to be relevant in the future any more.
      
      We can probably drop some of the other dependencies as well now,
      e.g. there should generally be no reason to depend on CONFIG_ARM
      unless the driver uses architecture specific assembly.
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      2f8a26c1
  9. 29 8月, 2017 1 次提交
    • D
      clocksource/drivers/imx-tpm: Add imx tpm timer support · 059ab7b8
      Dong Aisheng 提交于
      IMX Timer/PWM Module (TPM) supports both timer and pwm function while
      this patch only adds the timer support. PWM would be added later.
      
      The TPM counter, compare and capture registers are clocked by an
      asynchronous clock that can remain enabled in low power modes.
      
      NOTE: We observed in a very small probability, the bus fabric
      contention between GPU and A7 may results a few cycles delay
      of writing CNT registers which may cause the min_delta event got
      missed, so we need add a ETIME check here in case it happened.
      
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Anson Huang <Anson.Huang@nxp.com>
      Cc: Bai Ping <ping.bai@nxp.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      059ab7b8
  10. 11 8月, 2017 1 次提交
  11. 27 6月, 2017 1 次提交
  12. 19 6月, 2017 1 次提交
  13. 14 6月, 2017 3 次提交
  14. 12 6月, 2017 2 次提交
  15. 07 4月, 2017 3 次提交
    • L
      clocksource/drivers/gemini: Rename Gemini timer to Faraday · f5bf0ee4
      Linus Walleij 提交于
      After some research it turns out that the "Gemini" timer is
      actually a generic IP block from Faraday Technology named
      FTTMR010, so as to not make things too confusing we need to
      rename the driver and its symbols to make sense.
      
      The implementation remains the same in this patch but we fix
      the copy-paste error in the timer name "nomadik_mtu" as we're
      at it.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      f5bf0ee4
    • A
      clocksource/drivers/rockchip_timer: Implement clocksource timer · 5e0a39d0
      Alexander Kochetkov 提交于
      The clock supplying the arm-global-timer on the rk3188 is coming from the
      the cpu clock itself and thus changes its rate everytime cpufreq adjusts
      the cpu frequency making this timer unsuitable as a stable clocksource
      and sched clock.
      
      The rk3188, rk3288 and following socs share a separate timer block already
      handled by the rockchip-timer driver. Therefore adapt this driver to also
      be able to act as clocksource and sched clock on rk3188.
      
      In order to test clocksource you can run following commands and check
      how much time it take in real. On rk3188 it take about ~45 seconds.
      
          cpufreq-set -f 1.6GHZ
          date; sleep 60; date
      
      In order to use the patch you need to declare two timers in the dts
      file. The first timer will be initialized as clockevent provider
      and the second one as clocksource. The clockevent must be from
      alive subsystem as it used as backup for the local timers at sleep
      time.
      
      The patch does not break compatibility with older device tree files.
      The older device tree files contain only one timer. The timer
      will be initialized as clockevent, as expected.
      
      rk3288 (and probably anything newer) is irrelevant to this patch,
      as it has the arch timer interface. This patch may be useful
      for Cortex-A9/A5 based parts.
      Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      5e0a39d0
    • M
      arm64: arch_timer: Workaround for Cortex-A73 erratum 858921 · fa8d815f
      Marc Zyngier 提交于
      Cortex-A73 (all versions) counter read can return a wrong value
      when the counter crosses a 32bit boundary.
      
      The workaround involves performing the read twice, and to return
      one or the other depending on whether a transition has taken place.
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      fa8d815f
  16. 08 2月, 2017 5 次提交
    • D
      clocksource/drivers/arm_arch_timer: Work around Hisilicon erratum 161010101 · bb42ca47
      Ding Tianhong 提交于
      Erratum Hisilicon-161010101 says that the ARM generic timer counter "has
      the potential to contain an erroneous value when the timer value
      changes". Accesses to TVAL (both read and write) are also affected due
      to the implicit counter read. Accesses to CVAL are not affected.
      
      The workaround is to reread the system count registers until the value
      of the second read is larger than the first one by less than 32, the
      system counter can be guaranteed not to return wrong value twice by
      back-to-back read and the error value is always larger than the correct
      one by 32. Writes to TVAL are replaced with an equivalent write to CVAL.
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      [Mark: split patch, fix Kconfig, reword commit message]
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      bb42ca47
    • D
      clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure · 16d10ef2
      Ding Tianhong 提交于
      Currently we have code inline in the arch timer probe path to cater for
      Freescale erratum A-008585, complete with ifdeffery. This is a little
      ugly, and will get worse as we try to add more errata handling.
      
      This patch refactors the handling of Freescale erratum A-008585. Now the
      erratum is described in a generic arch_timer_erratum_workaround
      structure, and the probe path can iterate over these to detect errata
      and enable workarounds.
      
      This will simplify the addition and maintenance of code handling
      Hisilicon erratum 161010101.
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      [Mark: split patch, correct Kconfig, reword commit message]
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      16d10ef2
    • C
      clocksource/drivers/ostm: Add renesas-ostm timer driver · fb6002a8
      Chris Brandt 提交于
      This patch adds a OSTM driver for the Renesas architecture.
      The OS Timer (OSTM) has independent channels that can be
      used as a freerun or interval times.
      This driver uses the first probed device as a clocksource
      and then any additional devices as clock events.
      Signed-off-by: NChris Brandt <chris.brandt@renesas.com>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      fb6002a8
    • L
      clocksource/drivers/gemini: Add driver for the Cortina Gemini · 4750535b
      Linus Walleij 提交于
      This is a rewrite of the Gemini timer
      driver in arch/arm/mach-gemini/timer.c trying to do everything
      the device tree way:
      
      - Make every IO-access relative to a base address and dynamic
        so we can do a dynamic ioremap and get going.
      - Do not poke around directly in the global syscon registers,
        access them using the syscon regmap style design pattern for
        the one register we need to check.
      - Find register range and interrupt from the device tree.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      4750535b
    • D
      clockevents: Add a clkevt-of mechanism like clksrc-of · 376bc271
      Daniel Lezcano 提交于
      The current code uses the CLOCKSOURCE_OF_DECLARE macro to fill the clksrc
      table with a t-uple (name, init_function).
      
      Unfortunately it ends up to the clockevent and the clocksource being
      both initialized with this macro. It is not a problem by itself but there
      is not a clear distinction between a clockevent and a clocksource in the
      code initialization path. Somebody can argue there are the same IP block
      and the same DT node. But conceptually from the software side, there are
      two distincts entities and as is they should be initialized separetely.
      Some drivers which do not have a clocksource end up by using the
      CLOCKSOURCE_OF_DECLARE macro to declare a clockevent.
      
      Another result is the fuzzy organization in the clocksource directory,
      where the clockevents are implemented in the same file than the
      clocksources or file labelled timer-something implementing a clocksource.
      
      This patch provides another macro to specifically declare a clockevent in
      the same way than the clocksource and gives the opportunity to write two
      separate drivers, one for the clocksource and another for the clockevents.
      
      Hopefully, that can help to do some housework in the directory, perhaps
      split the drivers in to entities, for example:
      	- clksrc-rockchip.c
      	- clkevt-rockchip.c
      
      Also, it gives the possibility to declare clocksources separately in the
      DT and then use a clocksource from IP block while while clockevents are
      used from another IP block.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      376bc271
  17. 01 12月, 2016 1 次提交
  18. 21 10月, 2016 1 次提交
    • 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
  19. 24 9月, 2016 1 次提交
    • S
      arm64: arch_timer: Work around QorIQ Erratum A-008585 · f6dc1576
      Scott Wood 提交于
      Erratum A-008585 says that the ARM generic timer counter "has the
      potential to contain an erroneous value for a small number of core
      clock cycles every time the timer value changes".  Accesses to TVAL
      (both read and write) are also affected due to the implicit counter
      read.  Accesses to CVAL are not affected.
      
      The workaround is to reread TVAL and count registers until successive
      reads return the same value.  Writes to TVAL are replaced with an
      equivalent write to CVAL.
      
      The workaround is to reread TVAL and count registers until successive reads
      return the same value, and when writing TVAL to retry until counter
      reads before and after the write return the same value.
      
      The workaround is enabled if the fsl,erratum-a008585 property is found in
      the timer node in the device tree.  This can be overridden with the
      clocksource.arm_arch_timer.fsl-a008585 boot parameter, which allows KVM
      users to enable the workaround until a mechanism is implemented to
      automatically communicate this information.
      
      This erratum can be found on LS1043A and LS2080A.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NScott Wood <oss@buserror.net>
      [will: renamed read macro to reflect that it's not usually unstable]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f6dc1576
  20. 16 9月, 2016 1 次提交
  21. 28 6月, 2016 9 次提交