1. 24 Dec, 2012 11 commits
    • Stephen Warren's avatar
      ARM: delete struct sys_timer · 6bb27d73
      Stephen Warren authored
      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: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      6bb27d73
    • Stephen Warren's avatar
      ARM: remove struct sys_timer suspend and resume fields · 7704c095
      Stephen Warren authored
      
      
      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: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      7704c095
    • Stephen Warren's avatar
      ARM: samsung: register syscore_ops for timer resume directly · 656c669b
      Stephen Warren authored
      
      
      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: default avatarStephen Warren <swarren@nvidia.com>
      656c669b
    • Stephen Warren's avatar
      ARM: ux500: convert timer suspend/resume to clock_event_device · 8726e96f
      Stephen Warren authored
      
      
      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: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      8726e96f
    • Stephen Warren's avatar
      ARM: sa1100: convert timer suspend/resume to clock_event_device · e3cbfb62
      Stephen Warren authored
      
      
      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: default avatarStephen Warren <swarren@nvidia.com>
      e3cbfb62
    • Stephen Warren's avatar
      ARM: pxa: convert timer suspend/resume to clock_event_device · 5b30d5bf
      Stephen Warren authored
      
      
      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: default avatarEric Miao <eric.y.miao@gmail.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      5b30d5bf
    • Stephen Warren's avatar
      ARM: at91: convert timer suspend/resume to clock_event_device · 49356ae9
      Stephen Warren authored
      
      
      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: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      49356ae9
    • Stephen Warren's avatar
      ARM: set arch_gettimeoffset directly · 23c197b7
      Stephen Warren authored
      
      
      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: default avatarStephen Warren <swarren@nvidia.com>
      23c197b7
    • Stephen Warren's avatar
      m68k: set arch_gettimeoffset directly · c8d5ba18
      Stephen Warren authored
      
      
      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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarPhil Blundell <philb@gnu.org>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      c8d5ba18
    • Stephen Warren's avatar
      time: convert arch_gettimeoffset to a pointer · 7b1f6207
      Stephen Warren authored
      
      
      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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarJesper Nilsson <jesper.nilsson@axis.com>
      Acked-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      7b1f6207
    • Stephen Warren's avatar
      cris: move usec/nsec conversion to do_slow_gettimeoffset · 547046f2
      Stephen Warren authored
      
      
      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: default avatarJesper Nilsson <jesper.nilsson@axis.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      547046f2
  2. 21 Dec, 2012 29 commits