1. 03 1月, 2013 1 次提交
    • S
      clocksource: add common of_clksrc_init() function · ae278a93
      Stephen Warren 提交于
      It is desirable to move all clocksource drivers to drivers/clocksource,
      yet each requires its own initialization function. We'd rather not
      pollute <linux/> with a header for each function. Instead, create a
      single of_clksrc_init() function which will determine which clocksource
      driver to initialize based on device tree.
      
      Based on a similar patch for drivers/irqchip by Thomas Petazzoni.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      ae278a93
  2. 25 12月, 2012 11 次提交
    • S
      ARM: delete struct sys_timer · 6bb27d73
      Stephen Warren 提交于
      Now that the only field in struct sys_timer is .init, delete the struct,
      and replace the machine descriptor .timer field with the initialization
      function itself.
      
      This will enable moving timer drivers into drivers/clocksource without
      having to place a public prototype of each struct sys_timer object into
      include/linux; the intent is to create a single of_clocksource_init()
      function that determines which timer driver to initialize by scanning
      the device dtree, much like the proposed irqchip_init() at:
      http://www.spinics.net/lists/arm-kernel/msg203686.html
      
      Includes mach-omap2 fixes from Igor Grinberg.
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      6bb27d73
    • S
      ARM: remove struct sys_timer suspend and resume fields · 7704c095
      Stephen Warren 提交于
      These fields duplicate e.g. struct clock_event_device's suspend and
      resume fields, so remove them now that nothing is using them. The aim
      is to remove all fields from struct sys_timer except .init, then replace
      the ARM machine descriptor's .timer field with a .init_time function
      instead, and delete struct sys_timer.
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      7704c095
    • S
      ARM: samsung: register syscore_ops for timer resume directly · 656c669b
      Stephen Warren 提交于
      Instead of using struct sys_timer's resume function, register syscore_ops
      directly in s3c2410_timer_init(). This will allow the sys_timer suspend/
      resume fields to be removed, and eventually lead to a complete removal of
      struct sys_timer.
      
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      656c669b
    • S
      ARM: ux500: convert timer suspend/resume to clock_event_device · 8726e96f
      Stephen Warren 提交于
      Move ux500's timer suspend/resume functions from struct sys_timer
      ux500_timer into struct clock_event_device nmdk_clkevt. This
      will allow the sys_timer suspend/resume fields to be removed, and
      eventually lead to a complete removal of struct sys_timer.
      
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      8726e96f
    • S
      ARM: sa1100: convert timer suspend/resume to clock_event_device · e3cbfb62
      Stephen Warren 提交于
      Move sa1100's timer suspend/resume functions from struct sys_timer
      sa1100_timer into struct clock_event_device ckevt_sa1100_osmr0. This
      will allow the sys_timer suspend/resume fields to be removed, and
      eventually lead to a complete removal of struct sys_timer.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      e3cbfb62
    • S
      ARM: pxa: convert timer suspend/resume to clock_event_device · 5b30d5bf
      Stephen Warren 提交于
      Move PXA's timer suspend/resume functions from struct sys_timer
      pxa_timer into struct clock_event_device ckevt_pxa_osmr0. This
      will allow the sys_timer suspend/resume fields to be removed, and
      eventually lead to a complete removal of struct sys_timer.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Acked-by: NEric Miao <eric.y.miao@gmail.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      5b30d5bf
    • S
      ARM: at91: convert timer suspend/resume to clock_event_device · 49356ae9
      Stephen Warren 提交于
      Move at91's timer suspend/resume functions from struct sys_timer
      at91sam926x_timer into struct clock_event_device pit_clkevt. This
      will allow the sys_timer suspend/resume fields to be removed, and
      eventually lead to a complete removal of struct sys_timer.
      
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      49356ae9
    • S
      ARM: set arch_gettimeoffset directly · 23c197b7
      Stephen Warren 提交于
      remove ARM's struct sys_timer .offset function pointer, and instead
      directly set the arch_gettimeoffset function pointer when the timer
      driver is initialized. This requires multiplying all function results
      by 1000, since the removed arm_gettimeoffset() did this. Also,
      s/unsigned long/u32/ just to make the function prototypes exactly
      match that of arch_gettimeoffset.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Hartley Sweeten <hsweeten@visionengravers.com>
      Cc: Ryan Mallon <rmallon@gmail.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      23c197b7
    • S
      m68k: set arch_gettimeoffset directly · c8d5ba18
      Stephen Warren 提交于
      remove m68k's mach_gettimeoffset function pointer, and instead directly
      set the arch_gettimeoffset function pointer. This requires multiplying
      all function results by 1000, since the removed m68k_gettimeoffset() did
      this. Also, s/unsigned long/u32/ just to make the function prototypes
      exactly match that of arch_gettimeoffset.
      
      Cc: Joshua Thompson <funaho@jurai.org>
      Cc: Sam Creasey <sammy@sammy.net>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NPhil Blundell <philb@gnu.org>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      c8d5ba18
    • S
      time: convert arch_gettimeoffset to a pointer · 7b1f6207
      Stephen Warren 提交于
      Currently, whenever CONFIG_ARCH_USES_GETTIMEOFFSET is enabled, each
      arch core provides a single implementation of arch_gettimeoffset(). In
      many cases, different sub-architectures, different machines, or
      different timer providers exist, and so the arch ends up implementing
      arch_gettimeoffset() as a call-through-pointer anyway. Examples are
      ARM, Cris, M68K, and it's arguable that the remaining architectures,
      M32R and Blackfin, should be doing this anyway.
      
      Modify arch_gettimeoffset so that it itself is a function pointer, which
      the arch initializes. This will allow later changes to move the
      initialization of this function into individual machine support or timer
      drivers. This is particularly useful for code in drivers/clocksource
      which should rely on an arch-independant mechanism to register their
      implementation of arch_gettimeoffset().
      
      This patch also converts the Cris architecture to set arch_gettimeoffset
      directly to the final implementation in time_init(), because Cris already
      had separate time_init() functions per sub-architecture. M68K and ARM
      are converted to set arch_gettimeoffset to the final implementation in
      later patches, because they already have function pointers in place for
      this purpose.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Acked-by: NJohn Stultz <johnstul@us.ibm.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      7b1f6207
    • S
      cris: move usec/nsec conversion to do_slow_gettimeoffset · 547046f2
      Stephen Warren 提交于
      Move usec to nsec conversion from arch_gettimeoffset() to
      do_slow_gettimeoffset(); in a future patch, do_slow_gettimeoffset()
      will be used directly as the implementation of arch_gettimeoffset(),
      so needs to perform all required calculations.
      
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: linux-cris-kernel@axis.com
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      547046f2
  3. 22 12月, 2012 28 次提交