1. 01 4月, 2013 6 次提交
  2. 21 3月, 2013 1 次提交
  3. 19 3月, 2013 8 次提交
  4. 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
  5. 06 3月, 2013 1 次提交
  6. 05 3月, 2013 6 次提交
  7. 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
  8. 15 2月, 2013 1 次提交
    • A
      ARM: omap2: include linux/errno.h in hwmod_reset · 55ccb1a8
      Arnd Bergmann 提交于
      The newly created omap_hwmod_reset.c is missing an
      include of linux/errno.h in commit c02060d8 "ARM:
      OMAP4+: AESS: enable internal auto-gating during
      initial setup". It still works in omap2_defconfig,
      but not in all other combinations.
      
      Without this patch, building allmodconfig results in:
      
      arch/arm/mach-omap2/omap_hwmod_reset.c: In function 'omap_hwmod_aess_preprogram':
      arch/arm/mach-omap2/omap_hwmod_reset.c:47:11: error: 'EINVAL' undeclared (first use in this function)
      arch/arm/mach-omap2/omap_hwmod_reset.c:47:11: note: each undeclared identifier is reported only once for each function it appears in
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Sebastien Guiriec <s-guiriec@ti.com>
      55ccb1a8
  9. 14 2月, 2013 2 次提交
  10. 13 2月, 2013 1 次提交
    • P
      ARM: OMAP2+: fix some omap_device_build() calls that aren't compiled by default · 6efc3fe0
      Paul Walmsley 提交于
      Commit c1d1cd59 ("ARM: OMAP2+:
      omap_device: remove obsolete pm_lats and early_device code") missed a
      few omap_device_build() calls that aren't included as part of the default
      OMAP2+ Kconfig, omap2plus_defconfig.
      
      Ideally, all devices that are present on the SoC should be created by
      default, and only the corresponding device driver should be configured
      or deconfigured in Kconfig.  This allows drivers to be built as
      modules and loaded later, even if they weren't part of the original
      kernel build.  Unfortunately, we're not quite there yet.
      
      Thanks to Tony Lindgren for reporting this, found during his
      randconfig tests.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      6efc3fe0
  11. 11 2月, 2013 4 次提交
  12. 10 2月, 2013 2 次提交
  13. 09 2月, 2013 2 次提交
  14. 08 2月, 2013 2 次提交
    • H
      ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL check" bug · 169c82a2
      Hebbar Gururaja 提交于
      am33xx_cm_wait_module_ready() checks if register offset is NULL.
      
      int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
      {
      	int i = 0;
      
      	if (!clkctrl_offs)
      		return 0;
      
      In case of AM33xx, CLKCTRL register offset for different clock domains
      are not uniformly placed. An example of this would be the RTC clock
      domain with CLKCTRL offset at 0x00.
      In such cases the module ready check is skipped which leads to a data
      abort during boot-up when RTC registers is accessed.
      
      Remove this check here to avoid checking module readiness for modules
      with clkctrl register offset at 0x00.
      
      Koen Kooi notes that this patch fixes a crash on boot with
      CONFIG_RTC_DRV_OMAP=y with v3.8-rc5.
      Signed-off-by: NHebbar Gururaja <gururaja.hebbar@ti.com>
      Cc: Koen Kooi <koen@dominion.thruhere.net>
      [paul@pwsan.com: noted Koen's test in the patch description]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      169c82a2
    • H
      ARM: OMAP2+: AM33xx: hwmod: add missing HWMOD_NO_IDLEST flags · 092bda62
      Hebbar Gururaja 提交于
      struct omap_hwmod records belonging to wkup m3 domain is missing
      HWMOD_NO_IDLEST flags; add them.
      
      This patch is a prerequisite for a subsequent patch, 'ARM: OMAP2:
      am33xx-hwmod: Fix "register offset NULL check" bug'.  That patch would
      otherwise attempt to read from reserved bits.
      Signed-off-by: NHebbar Gururaja <gururaja.hebbar@ti.com>
      [paul@pwsan.com: add some more explanation in the patch description]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      092bda62