1. 17 7月, 2015 1 次提交
  2. 16 7月, 2015 2 次提交
  3. 12 5月, 2015 1 次提交
    • T
      ARM: OMAP2+: Remove bogus struct clk comparison for timer clock · b0897972
      Tony Lindgren 提交于
      With recent changes to use determine_rate, the comparison of two
      clocks won't work without clk_is_match that does __clk_get_hw
      on the clocks first.
      
      As we've been unconditionally already calling clk_set_parent
      already because of the bogus comparison, let's just remove the
      check as suggested by Stephen Boyd <sboyd@codeaurora.org>.
      
      Cc: Michael Turquette <mturquette@linaro.org>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Acked-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b0897972
  4. 15 1月, 2015 1 次提交
  5. 06 1月, 2015 2 次提交
  6. 12 9月, 2014 1 次提交
  7. 08 5月, 2014 1 次提交
  8. 06 5月, 2014 1 次提交
  9. 01 3月, 2014 1 次提交
  10. 18 1月, 2014 1 次提交
  11. 22 11月, 2013 1 次提交
  12. 12 10月, 2013 1 次提交
  13. 11 10月, 2013 1 次提交
  14. 09 10月, 2013 2 次提交
  15. 04 10月, 2013 1 次提交
  16. 21 8月, 2013 1 次提交
  17. 13 8月, 2013 1 次提交
  18. 03 8月, 2013 1 次提交
  19. 04 7月, 2013 1 次提交
  20. 25 6月, 2013 1 次提交
  21. 13 6月, 2013 2 次提交
  22. 08 5月, 2013 1 次提交
  23. 07 5月, 2013 1 次提交
  24. 03 5月, 2013 1 次提交
    • R
      ARM: OMAP: use consistent error checking · c48cd659
      Russell King 提交于
      Consistently check errors using the usual method used in the kernel
      for much of its history.  For instance:
      
      int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
      {
      	int div;
      	div = gpmc_calc_divider(t->sync_clk);
      	if (div < 0)
      		return div;
      static int gpmc_set_async_mode(int cs, struct gpmc_timings *t)
      {
      ...
      	return gpmc_cs_set_timings(cs, t);
      
      .....
      	ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t);
      	if (IS_ERR_VALUE(ret))
      		return ret;
      
      So, gpmc_cs_set_timings() thinks any negative return value is an error,
      but where we check that in higher levels, only a limited range are
      errors...
      
      There is only _one_ use of IS_ERR_VALUE() in arch/arm which is really
      appropriate, and that is in arch/arm/include/asm/syscall.h:
      
      static inline long syscall_get_error(struct task_struct *task,
      				     struct pt_regs *regs)
      {
      	unsigned long error = regs->ARM_r0;
      	return IS_ERR_VALUE(error) ? error : 0;
      }
      
      because this function really does have to differentiate between error
      return values and addresses which look like negative numbers (eg, from
      mmap()).
      
      So, here's a patch to remove them from OMAP, except for the above.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      c48cd659
  25. 24 4月, 2013 1 次提交
  26. 12 4月, 2013 1 次提交
    • R
      ARM: convert arm/arm64 arch timer to use CLKSRC_OF init · 0583fe47
      Rob Herring 提交于
      This converts arm and arm64 to use CLKSRC_OF DT based initialization for
      the arch timer. A new function arch_timer_arch_init is added to allow for
      arch specific setup.
      
      This has a side effect of enabling sched_clock on omap5 and exynos5. There
      should not be any reason not to use the arch timers for sched_clock.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-omap@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      0583fe47
  27. 09 4月, 2013 1 次提交
  28. 02 4月, 2013 7 次提交
    • J
      ARM: OMAP4+: Fix sparse warning in system timers · 4615943c
      Jon Hunter 提交于
      Commit 6bb27d73 (ARM: delete struct sys_timer) changed the function
      created by the macro OMAP_SYS_32K_TIMER_INIT from static void to void.
      For OMAP4+ devices this created the following sparse warning ...
      
      arch/arm/mach-omap2/timer.c:585:1: warning: symbol
      	'omap4_sync32k_timer_init' was not declared. Should it be static?
      
      The function omap4_sync32k_timer_init() is not referenced outside of the
      file timer.c and so make this function static.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      4615943c
    • J
      ARM: OMAP2+: Store ID of system timers in timer structure · 8f6924dc
      Jon Hunter 提交于
      Currently, the timer ID is being passed to the function
      omap_dm_timer_init_one(). Instead of passing the ID separately, store it
      in the omap_dm_timer structure, that is also passed, and access the ID
      from this structure.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      8f6924dc
    • J
      ARM: OMAP3: Update clocksource timer selection · 2eb03937
      Jon Hunter 提交于
      When booting with device-tree for OMAP3 and AM335x devices and a gptimer
      is used as the clocksource (which is always the case for AM335x), a
      gptimer located in a power domain that is not always-on is selected.
      Ideally we should use a gptimer for clocksource that is located in a
      power domain that is always on (such as the wake-up domain) so that time
      can be maintained during a kernel suspend without keeping on additional
      power domains unnecessarily.
      
      In order to fix this so that we can select a gptimer located in a power
      domain that is always-on, the following changes were made ...
      1. Currently, only when selecting a gptimer to use for a clockevent
         timer, do we pass a timer property that can be used to select a
         specific gptimer. Change this so that we can pass a property when
         selecting a gptimer to use for a clocksource timer too.
      2. Currently, when selecting either a gptimer to use for a clockevent
         timer or a clocksource timer and no timer property is passed, then
         the first available timer is selected regardless of the properties
         it has. Change this so that if no properties are passed, then a timer
         that does not have additional features (such as always-on, dsp-irq,
         pwm, and secure) is selected.
      
      For OMAP3 and AM335x devices that use a gptimer for clocksource, change
      the selection of the gptimer so that by default the gptimer located in
      the always-on power domain is used for clocksource instead of
      clockevents.
      
      Please note that using a gptimer for both clocksource and clockevents
      can have a system power impact during idle. The reason being is that
      OMAP and AMxxx devices typically only have one gptimer in a power domain
      that is always-on. Therefore when the kernel is idle both the clocksource
      and clockevent timers will be active and this will keep additional power
      domains on. During kernel suspend, only the clocksource timer is active
      and therefore, it is better to use a gptimer in a power domain that is
      always-on for clocksource.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NIgor Grinberg <grinberg@compulab.co.il>
      2eb03937
    • J
      ARM: OMAP2+: Simplify system timers definitions · 00ea4d56
      Jon Hunter 提交于
      There is a lot of redundancy in the definitions for the various system
      timers for OMAP2+ devices. For example, the omap3_am33xx_gptimer_timer_init()
      function is the same as the omap3_gp_gptimer_timer_init() function and the
      function omap4_sync32k_timer_init() can be re-used for OMAP5 devices.
      Therefore, consolidate the definitions to simplify the code.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NIgor Grinberg <grinberg@compulab.co.il>
      00ea4d56
    • J
      ARM: OMAP2+: Simplify system timer clock definitions · 7bdc83f7
      Jon Hunter 提交于
      In commit c59b537d (ARM: OMAP2+: Simplify dmtimer clock aliases), new
      clock aliases for dmtimers were added to simplify the code. These clock
      aliases can also be used when configuring the system timers and allow us
      to remove the current definitions, simplifying the code.
      
      Please note that for OMAP4/5 devices (unlike OMAP2/3 devices), there is
      no clock alias for "timer_sys_ck" with NULL as the device name. Therefore
      we still need to use the alias "sys_clkin_ck" for these devices.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      7bdc83f7
    • J
      ARM: OMAP2+: Remove hard-coded test on timer ID · a7990a19
      Jon Hunter 提交于
      Currently, when configuring the clock-events and clock-source timers
      for OMAP2+ devices, we check whether the timer ID is 12 before
      attempting to set the parent clock for the timer.
      
      This test was added for OMAP3 general purpose devices (no security
      features enabled) that a 12th timer available but unlike the other
      timers only has a single functional clock source. Calling
      clk_set_parent() for this 12th timer would always return an error
      because there is only one choice for a parent clock. Therefore,
      this hard-coded timer ID test was added.
      
      To avoid this timer ID test, simply check to see if the timer's current
      parent clock is the desired parent clock and only call clk_set_parent()
      if this is not the case.
      
      Also if clk_get() fails, then use PTR_ERR() to return the error code.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      a7990a19
    • J
      ARM: OMAP2+: Display correct system timer name · e95ea43a
      Jon Hunter 提交于
      Currently on boot, when displaying the name of the gptimer used for
      clockevents and clocksource timers, the timer ID is shown. However,
      when booting with device-tree, the timer ID is not used to select a
      gptimer but a timer property. Hence, it is possible that the timer
      selected when booting with device-tree does not match the ID shown.
      Therefore, instead display the HWMOD name of the gptimer and use
      the HWMOD name as the name of clockevent and clocksource timer (if a
      gptimer is used).
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      e95ea43a
  29. 27 3月, 2013 1 次提交
    • R
      ARM: OMAP: clocks: Delay clk inits atleast until slab is initialized · ff931c82
      Rajendra Nayak 提交于
      clk inits on OMAP happen quite early, even before slab is available.
      The dependency comes from the fact that the timer init code starts to
      use clocks and hwmod and we need clocks to be initialized by then.
      
      There are various problems doing clk inits this early, one is,
      not being able to do dynamic clk registrations and hence the
      dependency on clk-private.h. The other is, inability to debug
      early kernel crashes without enabling DEBUG_LL and earlyprintk.
      
      Doing early clk init also exposed another instance of a kernel
      panic due to a BUG() when CONFIG_DEBUG_SLAB is enabled.
      
      [    0.000000] Kernel BUG at c01174f8 [verbose debug info unavailable]
      [    0.000000] Internal error: Oops - BUG: 0 [#1] SMP ARM
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0    Not tainted  (3.9.0-rc1-12179-g72d48f9 #6)
      [    0.000000] PC is at __kmalloc+0x1d4/0x248
      [    0.000000] LR is at __clk_init+0x2e0/0x364
      [    0.000000] pc : [<c01174f8>]    lr : [<c0441f54>]    psr: 600001d3
      [    0.000000] sp : c076ff28  ip : c065cefc  fp : c0441f54
      [    0.000000] r10: 0000001c  r9 : 000080d0  r8 : c076ffd4
      [    0.000000] r7 : c074b578  r6 : c0794d88  r5 : 00000040  r4 : 00000000
      [    0.000000] r3 : 00000000  r2 : c07cac70  r1 : 000080d0  r0 : 0000001c
      [    0.000000] Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
      [    0.000000] Control: 10c53c7d  Table: 8000404a  DAC: 00000017
      [    0.000000] Process swapper (pid: 0, stack limit = 0xc076e240)
      [    0.000000] Stack: (0xc076ff28 to 0xc0770000)
      [    0.000000] ff20:                   22222222 c0794ec8 c06546e8 00000000 00000040 c0794d88
      [    0.000000] ff40: c074b578 c076ffd4 c07951c8 c076e000 00000000 c0441f54 c074b578 c076ffd4
      [    0.000000] ff60: c0793828 00000040 c0794d88 c074b578 c076ffd4 c0776900 c076e000 c07272ac
      [    0.000000] ff80: 2f800000 c074c968 c07f93d0 c0719780 c076ffa0 c076ff98 00000000 00000000
      [    0.000000] ffa0: 00000000 00000000 00000000 00000001 c074cd6c c077b1ec 8000406a c0715724
      [    0.000000] ffc0: 00000000 00000000 00000000 00000000 00000000 c074c968 10c53c7d c0776974
      [    0.000000] ffe0: c074cd6c c077b1ec 8000406a 411fc092 00000000 80008074 00000000 00000000
      [    0.000000] [<c01174f8>] (__kmalloc+0x1d4/0x248) from [<c0441f54>] (__clk_init+0x2e0/0x364)
      [    0.000000] [<c0441f54>] (__clk_init+0x2e0/0x364) from [<c07272ac>] (omap4xxx_clk_init+0xbc/0x140)
      [    0.000000] [<c07272ac>] (omap4xxx_clk_init+0xbc/0x140) from [<c0719780>] (setup_arch+0x15c/0x284)
      [    0.000000] [<c0719780>] (setup_arch+0x15c/0x284) from [<c0715724>] (start_kernel+0x7c/0x334)
      [    0.000000] [<c0715724>] (start_kernel+0x7c/0x334) from [<80008074>] (0x80008074)
      [    0.000000] Code: e5883004 e1a00006 e28dd00c e8bd8ff0 (e7f001f2)
      [    0.000000] ---[ end trace 1b75b31a2719ed1c ]---
      [    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
      
      It was a know issue, that slab allocations would fail when common
      clock core tries to cache parent pointers for mux clocks on OMAP,
      and hence a patch 'clk: Allow late cache allocation for clk->parents,
      commit 7975059d' was added to work this problem around.
      A BUG() within kmalloc() with CONFIG_DEBUG_SLAB enabled was completely
      overlooked causing this regression.
      
      More details on the issue reported can be found here,
      http://www.mail-archive.com/linux-omap@vger.kernel.org/msg85932.html
      
      With all these issues around clk inits happening way too early, it
      makes sense to at least move them to a point where dynamic memory
      allocations are possible. So move them to a point just before the
      timer code starts using clocks and hwmod.
      
      This should at least pave way for clk inits on OMAP moving to dynamic
      clock registrations instead of using the static macros defined in
      clk-private.h.
      
      The issue with kernel panic while CONFIG_DEBUG_SLAB is enabled
      was reported by Piotr Haber and Tony Lindgren and this patch
      fixes the reported issue as well.
      Reported-by: NPiotr Haber <phaber@broadcom.com>
      Reported-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Reviewed-by: NMike Turquette <mturquette@linaro.org>
      Acked-by: NPaul Walmsley <paul@pwsan.com>
      Cc: stable@vger.kernel.org  # v3.8
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ff931c82
  30. 19 3月, 2013 1 次提交