1. 02 4月, 2013 3 次提交
    • 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
  2. 14 3月, 2013 1 次提交
    • R
      ARM: OMAP: use consistent error checking · 71856843
      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>
      71856843
  3. 24 2月, 2013 3 次提交
    • R
      ARM: cleanup: OMAP hwmod error checking · 4d485661
      Russell King 提交于
      omap_hwmod_lookup() only returns NULL on error, never an error pointer.
      Checking the returned pointer using IS_ERR_OR_NULL() is needless
      overhead.  Use a simple !ptr check instead.
      
      OMAP devices (oh->od) always have a valid platform device attached (see
      omap_device_alloc()) so there's no point validating the platform device
      pointer (we will have already oopsed long before if this is not the
      case here.)
      
      Lastly, oh->od is only ever NULL or a valid omap device pointer - 'oh'
      comes from the statically declared hwmod tables, and the pointer is
      only filled in by omap_device_alloc() at a point where the omap device
      pointer must be valid.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4d485661
    • R
      ARM: cleanup: pwrdm_can_ever_lose_context() checking · 62f0f39b
      Russell King 提交于
      pwrdm_can_ever_lose_context() is only ever called from the OMAP GPIO
      code, and only with a pointer returned from omap_hwmod_get_pwrdm().
      omap_hwmod_get_pwrdm() only ever returns NULL on error, so using
      IS_ERR_OR_NULL() to validate the passed pointer is silly.  Use a
      simpler !ptr check instead.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      62f0f39b
    • R
      ARM: cleanup: debugfs error handling · d808aa69
      Russell King 提交于
      Debugfs functions return NULL when they fail, or an error pointer
      when not configured.  The intention behind the error pointer is that
      it appears as a valid pointer to the caller, and so the caller
      continues inspite of debugfs not being available.
      
      Debugfs failure should only ever be checked with (!ptr) and not the
      IS_ERR*() functions.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d808aa69
  4. 22 1月, 2013 4 次提交
  5. 19 1月, 2013 3 次提交
  6. 08 1月, 2013 1 次提交
  7. 04 1月, 2013 1 次提交
    • G
      ARM: drivers: remove __dev* attributes. · 351a102d
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      351a102d
  8. 03 1月, 2013 5 次提交
  9. 02 1月, 2013 1 次提交
    • P
      ARM: OMAP AM33xx: hwmod data: resolve sparse warnings · 9816aa80
      Paul Walmsley 提交于
      Commit 70384a6a ("ARM: OMAP3+:
      hwmod: Add AM33XX HWMOD data for davinci_mdio module") adds two
      new sparse warnings:
      
      arch/arm/mach-omap2/omap_hwmod_33xx_data.c:2518:30: warning: symbol 'am33xx_mdio_addr_space' was not declared. Should it be static?
      arch/arm/mach-omap2/omap_hwmod_33xx_data.c:2526:26: warning: symbol 'am33xx_cpgmac0__mdio' was not declared. Should it be static?
      
      Fix by marking the two new records as static.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Mugunthan V N <mugunthanvnm@ti.com>
      Cc: Vaibhav Hiremath <hvaibhav@ti.com>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      9816aa80
  10. 25 12月, 2012 1 次提交
  11. 21 12月, 2012 3 次提交
  12. 18 12月, 2012 7 次提交
  13. 17 12月, 2012 2 次提交
  14. 15 12月, 2012 5 次提交
    • P
      ARM: OMAP3/4: cpuidle: fix sparse and checkpatch warnings · 9db316b6
      Paul Walmsley 提交于
      Fix the following sparse warnings in the OMAP3/4 CPUIdle code:
      
      arch/arm/mach-omap2/cpuidle34xx.c:272:1: warning: symbol 'omap3_idle_dev' was not declared. Should it be static?
      arch/arm/mach-omap2/cpuidle34xx.c:274:23: warning: symbol 'omap3_idle_driver' was not declared. Should it be static?
      arch/arm/mach-omap2/cpuidle44xx.c:164:1: warning: symbol 'omap4_idle_dev' was not declared. Should it be static?
      arch/arm/mach-omap2/cpuidle44xx.c:166:23: warning: symbol 'omap4_idle_driver' was not declared. Should it be static?
      
      Also fix the following checkpatch warnings:
      
      WARNING: please, no space before tabs
      #44: FILE: arch/arm/mach-omap2/cpuidle34xx.c:105:
      +^I.name = ^I"omap3_idle",$
      
      WARNING: please, no space before tabs
      #45: FILE: arch/arm/mach-omap2/cpuidle34xx.c:106:
      +^I.owner = ^ITHIS_MODULE,$
      
      ERROR: code indent should use tabs where possible
      #211: FILE: arch/arm/mach-omap2/cpuidle44xx.c:74:
      +                        /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */$
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      9db316b6
    • P
      ARM: OMAP4: clock data: DPLLs are missing bypass clocks in their parent lists · b8675e2c
      Paul Walmsley 提交于
      Booting OMAP4460 Pandaboard ES with a recent u-boot results in this
      warning:
      
      WARNING: at arch/arm/mach-omap2/dpll3xxx.c:427 omap3_noncore_dpll_enable+0xf4/0x110()
      
      The OMAP4 DPLL parent clock names only listed the reference clocks,
      not the bypass clocks.  Fix by adding the bypass clocks to the DPLL
      parent lists.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      b8675e2c
    • P
      ARM: OMAP4: clock data: div_iva_hs_clk is a power-of-two divider · 628a37d4
      Paul Walmsley 提交于
      The OMAP4 clock divider "div_iva_hs_clk" is listed in the clock data
      as an OMAP HSDIVIDER, but it's actually a power-of-two divider.  This
      causes a warning during boot on an OMAP4460 Pandaboard-ES with a
      recent u-boot:
      
      WARNING: at arch/arm/mach-omap2/clkt_clksel.c:143 omap2_clksel_recalc+0xf4/0x12c()
      clock: div_iva_hs_clk: could not find fieldval 0 for parent dpll_core_m5x2_ck
      
      Fix by converting the data for this clock to a power-of-two divider.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      628a37d4
    • J
      ARM: OMAP4: Fix EMU clock domain always on · 29f0667f
      Jon Hunter 提交于
      Commit d043d87c (ARM: OMAP2+: clockdomain: bypass clockdomain handling
      when disabling unused clks) skips the decrementing of a clock-domains
      use count if the clocks use count is zero. However, for OMAP4 devices
      this is causing the EMU clock-domain to be stuck ON as the use count is
      not getting decremented correctly.
      
      The scenario that leads to this problem is described below ...
      
      omap_hwmod_setup_all
      --> _setup
          --> clkdm_hwmod_enable
          	--> EMU clock domain usecount = 1
          --> _enable_clocks
              --> clk_enable
      	    --> trace_clk_div_div usecount = 1
                  --> clkdm_hwmod_enable
          	        --> EMU clock domain usecount = 2
      --> _idle
          --> _disable_clocks
      	--> clk_disable
                  --> trace_clk_div_div usecount = 0
                  --> clkdm_hwmod_disable
                      --> skips decrement of EMU clock domain usecount
      		    because trace_clk_div_div is 0!
          	        --> EMU clock domain usecount = 2
          --> clkdm_hwmod_disable
          	--> EMU clock domain usecount = 1
      
      Hence, due to the order that a clocks use count is decremented and the
      clock domain is disabled, it is possible that the clock domain can have
      a non-zero use count when the actual clock has a use count of 0.
      Therefore, we should only bypass the clock-domain handling when both the
      clock-domain and clock in the clock-domain have a use count of 0 and
      warn when the clock-domain has a zero use count and the clock has a
      non-zero use count.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      [paul@pwsan.com: fixed checkpatch warning]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      29f0667f
    • J
      ARM: OMAP4460: Workaround ABE DPLL failing to turn-on · 8c197ccf
      Jon Hunter 提交于
      With the latest mainline u-boot bootloader (v2012.10), timers (5-8) in
      the ABE power domain are failing to turn-on. The timers never come out
      of the disabled state when setting the module-mode field to enable.
      
      The problem was exposed when u-boot was updated to NOT configure and
      lock the ABE DPLL on start-up. If the ABE DPLL is configured and locked
      by u-boot the problem does not occur. However, if the ABE DPLL is in the
      idle low-power bypass state and we attempt to enable a timer in the ABE
      power domain, it remains stuck in the disabled state. It appears to be a
      problem the timer interface clock as this comes from the ABE DPLL.
      
      If we place the ABE DPLL in the MN-bypass state and not the idle
      low-power state, then this problem is not seen.
      
      This problem only appears to occur on OMAP4460 and not OMAP4430.
      
      Workaround this problem by locking the ABE DPLL for OMAP4460 in the
      kernel on boot. By locking the ABE DPLL, when clocks from the ABE DPLL
      are not being requested the DPLL will transition into a low-power stop
      mode.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      8c197ccf