1. 21 2月, 2012 1 次提交
    • R
      ARM: OMAP: fix voltage domain build errors with PM_OPP disabled · 3ddd4d0c
      Russell King 提交于
      The voltage domain code wants the voltage tables, which are in the
      opp*.c files.  These files aren't built when PM_OPP is disabled,
      causing the following build errors at link time:
      
      twl-common.c:(.init.text+0x2e48): undefined reference to `omap34xx_vddmpu_volt_data'
      twl-common.c:(.init.text+0x2e4c): undefined reference to `omap34xx_vddcore_volt_data'
      twl-common.c:(.init.text+0x2e5c): undefined reference to `omap36xx_vddmpu_volt_data'
      twl-common.c:(.init.text+0x2e60): undefined reference to `omap36xx_vddcore_volt_data'
      twl-common.c:(.init.text+0x2830): undefined reference to `omap44xx_vdd_mpu_volt_data'
      twl-common.c:(.init.text+0x283c): undefined reference to `omap44xx_vdd_iva_volt_data'
      twl-common.c:(.init.text+0x2844): undefined reference to `omap44xx_vdd_core_volt_data'
      Acked-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3ddd4d0c
  2. 13 2月, 2012 11 次提交
    • R
      ARM: omap: resolve nebulous 'Error setting wl12xx data' · 70d669de
      Russell King 提交于
      It's useful to print the error code when a called function fails so a
      diagnosis of why it failed is possible.  In this case, it fails because
      we try to register some data for the wl12xx driver, but as the driver
      is not configured, a stub function is used which simply returns -ENOSYS.
      
      Let's do the simple thing for -rc and print the error code.
      
      Also, the return code from platform_register_device() at each of these
      sites was not being checked.  Add some checking, and again print the
      error code.
      
      This should be fixed properly for the next merge window so we don't
      issue error messages merely because a driver is not configured.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      70d669de
    • R
      ARM: omap: fix wrapped error messages in omap_hwmod.c · 4f8a428d
      Russell King 提交于
      While trying to debug my OMAP platforms, they emitted this message:
      
      omap_hwmod: %s: enabled state can only be entered from initialized, idle, or disabled state
      
      The following backtrace said it was from a function called '_enable',
      which didn't provide much clue.  Grepping didn't find it either.
      
      The message is wrapped, so unwrap the message so grep can find it.  Do
      the same for three other messages in this file.
      Acked-by: NPaul Walmsley <paul@pwsan.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4f8a428d
    • R
      ARM: omap: fix section mismatch warnings in mux.c caused by hsmmc.c · 8930b4e3
      Russell King 提交于
      The previous commit causes new section mismatch warnings:
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdb30): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_gpio()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_gpio().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_gpio is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdb4c): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_gpio()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_gpio().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_gpio is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdb60): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdb6c): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdb78): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdb90): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdb9c): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdba8): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdbc0): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdbcc): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdbd8): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdbf8): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc04): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc10): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc28): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc34): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc40): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc58): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc64): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc70): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xdc7c): Section mismatch in reference from the function omap_init_hsmmc() to the function .init.text:omap_mux_init_signal()
      The function omap_init_hsmmc() references
      the function __init omap_mux_init_signal().
      This is often because omap_init_hsmmc lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      
      Again, as for omap2_hsmmc_init(), these functions are callable at
      runtime via the gpio-twl4030.c driver, and so these can't be marked
      __init.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      8930b4e3
    • R
      ARM: omap: fix section mismatch warning for sdp3430_twl_gpio_setup() · a98f77bb
      Russell King 提交于
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xd0f0): Section mismatch in reference from the function sdp3430_twl_gpio_setup() to the function .init.text:omap2_hsmmc_init()
      The function sdp3430_twl_gpio_setup() references
      the function __init omap2_hsmmc_init().
      This is often because sdp3430_twl_gpio_setup lacks a __init
      annotation or the annotation of omap2_hsmmc_init is wrong.
      
      sdp3430_twl_gpio_setup() is called via platform data from the
      gpio-twl4030 module, which can be inserted and removed at runtime.
      This makes sdp3430_twl_gpio_setup() callable at runtime, and prevents
      it being marked with an __init annotation.
      
      As it calls omap2_hsmmc_init() unconditionally, the only resolution to
      this warning is to remove the __init markings from omap2_hsmmc_init()
      and its called functions.  This addresses the functions in hsmmc.c.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a98f77bb
    • R
      ARM: omap: fix section mismatch error for omap_4430sdp_display_init() · e3958fe0
      Russell King 提交于
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xb798): Section mismatch in reference from the function omap_4430sdp_display_init() to the function .init.text:omap_display_init()
      The function omap_4430sdp_display_init() references
      the function __init omap_display_init().
      This is often because omap_4430sdp_display_init lacks a __init
      annotation or the annotation of omap_display_init is wrong.
      
      Fix this by adding __init to omap_4430sdp_display_init().
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e3958fe0
    • R
      ARM: omap: fix section mismatch warning for omap_secondary_startup() · 45176f4c
      Russell King 提交于
      WARNING: vmlinux.o(.text+0x1c664): Section mismatch in reference from the function omap_secondary_startup() to the function .cpuinit.text:secondary_startup()
      The function omap_secondary_startup() references
      the function __cpuinit secondary_startup().
      This is often because omap_secondary_startup lacks a __cpuinit
      annotation or the annotation of secondary_startup is wrong.
      
      Unfortunately, fixing this causes a new warning which is harder to
      solve:
      
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0x5328): Section mismatch in reference from the function omap4_hotplug_cpu() to the function .cpuinit.text:omap_secondary_startup()
      The function omap4_hotplug_cpu() references
      the function __cpuinit omap_secondary_startup().
      This is often because omap4_hotplug_cpu lacks a __cpuinit
      annotation or the annotation of omap_secondary_startup is wrong.
      
      because omap4_hotplug_cpu() is used by power management code as well,
      which may not end up using omap_secondary_startup().
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      45176f4c
    • R
      ARM: omap: preemptively fix section mismatch in omap4_sdp4430_wifi_mux_init() · d5de63f5
      Russell King 提交于
      Found by review.
      
      omap4_sdp4430_wifi_mux_init() is called by an __init marked function,
      and only calls omap_mux_init_gpio() and omap_mux_init_signal() which
      are both also an __init marked functions.
      
      The only reason this doesn't issue a warning is because the compiler
      inlines omap4_sdp4430_wifi_mux_init() into omap4_sdp4430_wifi_init().
      
      So, lets add the __init annotation to ensure this remains safe should
      the compiler choose not to inline.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d5de63f5
    • R
      ARM: omap: fix section mismatch warning in mux.c · 27d8d3bf
      Russell King 提交于
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0x15a4): Section mismatch in reference from the function omap_mux_init_signals() to the function .init.text:omap_mux_init_signal()
      The function omap_mux_init_signals() references
      the function __init omap_mux_init_signal().
      This is often because omap_mux_init_signals lacks a __init
      annotation or the annotation of omap_mux_init_signal is wrong.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      27d8d3bf
    • R
      ARM: omap: fix uninformative vc/i2c configuration error message · 0bf68f53
      Russell King 提交于
      On my OMAP4 platform, I'm getting this error message repeated several
      times at boot:
      
      omap_vc_i2c_init: I2C config for all channels must match.
      omap_vc_i2c_init: I2C config for all channels must match.
      
      This doesn't help identify what the problem is.  Fix this message to
      be more informative:
      
      omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
      omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).
      
      This allows us to identify which voltage domains have a problem, and
      what the I2C configuration state (a boolean, i2c_high_speed) setting
      being used actually is.
      
      From this we find that omap4_core_pmic has i2c_high_speed false, but
      omap4_iva_pmic and omap4_mpu_pmic both have it set true.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0bf68f53
    • R
      ARM: omap: fix vc.c PMIC error message · 2d5b4790
      Russell King 提交于
      While testing on my OMAP3430 platform, this error message was emitted:
      
      omap_vc_init_channel: PMIC info requried to configure vc forvdd_core not populated.Hence cannot initialize vc
      
      Trying to find this message was difficult because it was wrapped across
      several lines.  It also mis-spells "required", doesn't read very well,
      and has spaces lacking.  Let's replace it with a more concise:
      
      omap_vc_init_channel: No PMIC info for vdd_core
      
      While we're here, fix a simple spelling error in a comment.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2d5b4790
    • R
      ARM: omap: fix prm44xx.c OMAP44XX_IRQ_PRCM build error · e6fa35aa
      Russell King 提交于
      When CONFIG_OF is disabled, the compile fails with:
      
      arch/arm/mach-omap2/prm44xx.c:41: error: 'OMAP44XX_IRQ_PRCM' undeclared here (not in a function)
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e6fa35aa
  3. 10 2月, 2012 3 次提交
    • P
      ARM: OMAP2xxx: PM: fix OMAP2xxx-specific UART idle bug in v3.3 · 1e056ddd
      Paul Walmsley 提交于
      On OMAP2420-based systems, the PM code ignores the state of the UART
      functional clocks when determining what idle state to enter.  This
      breaks the serial port now that the UART driver's clock behavior can
      be controlled via the PM autosuspend timeout.
      
      To fix, remove the special-case idle handling for the UARTs in the
      OMAP2420/2430 PM idle code added by commit
      4af4016c ("OMAP3: PM: UART: disable
      clocks when idle and off-mode support").
      
      Tested on Nokia N800.  This patch is a collaboration between Tony
      Lindgren <tony@atomide.com> and Paul Walmsley <paul@pwsan.com>.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      1e056ddd
    • P
      tty: serial: OMAP: block idle while the UART is transferring data in PIO mode · be4b0281
      Paul Walmsley 提交于
      Prevent OMAP UARTs from going idle while they are still transferring
      data in PIO mode.  This works around an oversight in the OMAP UART
      hardware present in OMAP34xx and earlier: an idle UART won't send a
      wakeup when the TX FIFO threshold is reached.  This causes long delays
      during data transmission when the MPU powerdomain enters a low-power
      mode.  The MPU interrupt controller is not able to respond to
      interrupts when it's in a low-power state, so the TX buffer is not
      refilled until another wakeup event occurs.
      
      This fix changes the erratum i291 DMA idle workaround.  Rather than
      toggling between force-idle and no-idle, it will toggle between
      smart-idle and no-idle.  The important part of the workaround is the
      no-idle part, so this shouldn't result in any change in behavior.
      
      This fix should work on all OMAP UARTs.  Future patches intended for
      the 3.4 merge window will make this workaround conditional on a
      "feature" flag, and will use the OMAP36xx+ TX event wakeup support.
      
      Thanks to Kevin Hilman <khilman@ti.com> for mentioning the erratum i291
      workaround, which led to the development of this approach.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NGovindraj.R <govindraj.raja@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      be4b0281
    • R
      ARM: omap: fix oops in arch/arm/mach-omap2/vp.c when pmic is not found · d980e0f8
      Russell King 提交于
      When the PMIC is not found, voltdm->pmic will be NULL.  vp.c's
      initialization function tries to dereferences this, which causes an
      oops:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: Oops: 5 [#1] PREEMPT
      Modules linked in:
      CPU: 0    Not tainted  (3.3.0-rc2+ #204)
      PC is at omap_vp_init+0x5c/0x15c
      LR is at omap_vp_init+0x58/0x15c
      pc : [<c03db880>]    lr : [<c03db87c>]    psr: 60000013
      sp : c181ff30  ip : c181ff68  fp : c181ff64
      r10: c0407808  r9 : c040786c  r8 : c0407814
      r7 : c0026868  r6 : c00264fc  r5 : c040ad6c  r4 : 00000000
      r3 : 00000040  r2 : 000032c8  r1 : 0000fa00  r0 : 000032c8
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c5387d  Table: 80004019  DAC: 00000015
      Process swapper (pid: 1, stack limit = 0xc181e2e8)
      Stack: (0xc181ff30 to 0xc1820000)
      ff20:                                     c0381d00 c02e9c6d c0383582 c040786c
      ff40: c040ad6c c00264fc c0026868 c0407814 00000000 c03d9de4 c181ff8c c181ff68
      ff60: c03db448 c03db830 c02e982c c03fdfb8 c03fe004 c0039988 00000013 00000000
      ff80: c181ff9c c181ff90 c03d9df8 c03db390 c181ffdc c181ffa0 c0008798 c03d9df0
      ffa0: c181ffc4 c181ffb0 c0055a44 c0187050 c0039988 c03fdfb8 c03fe004 c0039988
      ffc0: 00000013 00000000 00000000 00000000 c181fff4 c181ffe0 c03d1284 c0008708
      ffe0: 00000000 c03d1208 00000000 c181fff8 c0039988 c03d1214 1077ce40 01f7ee08
      Backtrace:
      [<c03db824>] (omap_vp_init+0x0/0x15c) from [<c03db448>] (omap_voltage_late_init+0xc4/0xfc)
      [<c03db384>] (omap_voltage_late_init+0x0/0xfc) from [<c03d9df8>] (omap2_common_pm_late_init+0x14/0x54)
       r8:00000000 r7:00000013 r6:c0039988 r5:c03fe004 r4:c03fdfb8
      [<c03d9de4>] (omap2_common_pm_late_init+0x0/0x54) from [<c0008798>] (do_one_initcall+0x9c/0x164)
      [<c00086fc>] (do_one_initcall+0x0/0x164) from [<c03d1284>] (kernel_init+0x7c/0x120)
      [<c03d1208>] (kernel_init+0x0/0x120) from [<c0039988>] (do_exit+0x0/0x2cc)
       r5:c03d1208 r4:00000000
      Code: e5ca300b e5900034 ebf69027 e5994024 (e5941000)
      ---[ end trace aed617dddaf32c3d ]---
      Kernel panic - not syncing: Attempted to kill init!
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d980e0f8
  4. 08 2月, 2012 2 次提交
    • I
      ARM: OMAP3: cm-t35: fix section mismatch warning · 36863964
      Igor Grinberg 提交于
      WARNING: arch/arm/mach-omap2/built-in.o(.text+0xeae8):
      Section mismatch in reference from the function cm_t35_init_usbh()
      to the (unknown reference) .init.data:(unknown)
      The function cm_t35_init_usbh() references
      the (unknown reference) __initdata (unknown).
      This is often because cm_t35_init_usbh lacks a __initdata
      annotation or the annotation of (unknown) is wrong.
      Signed-off-by: NIgor Grinberg <grinberg@compulab.co.il>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      36863964
    • S
      ARM: OMAP2: Fix the OMAP2 only build break seen with 2011+ ARM tool-chains · fef67c51
      Santosh Shilimkar 提交于
      With the latest Sourcery G++ Lite 2011.03-41 and latest linaro
      tool-chains OMAP2 only build breaks with below error.
      
      arch/arm/mach-omap2/omap-smc.S: Assembler messages:
      arch/arm/mach-omap2/omap-smc.S:30: Error: selected processor does not support ARM mode `smc #0'
      arch/arm/mach-omap2/omap-smc.S:53: Error: selected processor does not support ARM mode `smc #0'
      arch/arm/mach-omap2/omap-smc.S:61: Error: selected processor does not support ARM mode `smc #0'
      arch/arm/mach-omap2/omap-smc.S:69: Error: selected processor does not support ARM mode `smc #0'
      arch/arm/mach-omap2/omap-smc.S:77: Error: selected processor does not support ARM mode `smc #0'
      make[1]: *** [arch/arm/mach-omap2/omap-smc.o] Error 1
      
      OMAP2 devices doesn't have the security support but the security support
      was getting built because of OMAP2PLUS. Don't build security code for
      OMAP2 devices.
      
      While at it, fix the secure-common line in the Makefile to use tabs
      instead of spaces.
      Reported-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      fef67c51
  5. 27 1月, 2012 6 次提交
    • J
      ARM: OMAP2+: arch/arm/mach-omap2/smartreflex.c: add missing iounmap · 14ea9601
      Julia Lawall 提交于
      Add missing iounmap in error handling code, in a case where the function
      already preforms iounmap on some other execution path.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression e;
      statement S,S1;
      int ret;
      @@
      e = \(ioremap\|ioremap_nocache\)(...)
      ... when != iounmap(e)
      if (<+...e...+>) S
      ... when any
          when != iounmap(e)
      *if (...)
         { ... when != iounmap(e)
           return ...; }
      ... when any
      iounmap(e);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      14ea9601
    • J
      ARM: OMAP2+: arch/arm/mach-omap2/devices.c: introduce missing kfree · e0feca89
      Julia Lawall 提交于
      pdata needs to be freed before leaving the function in an error case.
      
      A simplified version of the semantic match that finds the problem is as
      follows: (http://coccinelle.lip6.fr)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      identifier f1;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      x->f1
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      e0feca89
    • G
      ARM: OMAP: fix MMC2 loopback clock handling · d82e5190
      Grazvydas Ignotas 提交于
      Currently MMC2 setup code can only enable loopback clock and
      relies on reset value for boards that need to have it disabled.
      This causes a problem with certain bootloaders that always enable
      that clock, resulting with unwanted bootloader dependencies.
      
      Fix this by making it disable the clock if board data says so.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Acked-by: NIgor Grinberg <grinberg@compulab.co.il>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      d82e5190
    • G
      ARM: OMAP: fix erroneous mmc2 clock change on mmc3 setup · ffa1e4ed
      Grazvydas Ignotas 提交于
      hsmmc23_before_set_reg() can set MMCSDIO2ADPCLKISEL bit, which
      enables internal clock for MMC2. Currently this function is also called
      by code handling MMC3, and if .internal_clock is set in platform data
      (by default it currently is), it will set MMCSDIO2ADPCLKISEL for MMC2
      instead of MMC3 (MMC3 doesn't have such bit so nothing actually needs to
      be done). This breaks 2nd SD slot on pandora.
      
      Fix this by changing hsmmc23_before_set_reg() to only handle MMC2.
      Note that this removes .remux() call for MMC3, but no board currently
      needs it and it's also not called for MMC4 and MMC5.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ffa1e4ed
    • Y
      ARM: OMAP2+: GPMC: fix device size setup · 8ef5d844
      Yegor Yefremov 提交于
      following statement can only change device size from 8-bit(0) to 16-bit(1),
      but not vice versa:
      
      regval |= GPMC_CONFIG1_DEVICESIZE(wval);
      
      so as this field has 1 reserved bit, that could be used in future,
      just clear both bits and then OR with the desired value
      Signed-off-by: NYegor Yefremov <yegorslists@googlemail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      8ef5d844
    • V
      ARM: OMAP2+: timer: Fix crash due to wrong arg to __omap_dm_timer_read_counter · dbc3982a
      Vaibhav Hiremath 提交于
      Commit 2f0778af (ARM: 7205/2: sched_clock: allow sched_clock to be
      selected at runtime) had a typo for the case when CONFIG_OMAP_32K_TIMER
      is not set.
      
      In dmtimer_read_sched_clock(), wrong argument was getting passed to
      __omap_dm_timer_read_counter() function call; instead of "&clksrc",
      we were passing "clksrc.io_base", which results into kernel crash.
      
      To reproduce kernel crash, just disable the CONFIG_OMAP_32K_TIMER config
      option (and DEBUG_LL) and build/boot the kernel.
      This will use dmtimer as a kernel clocksource and lead to kernel
      crash during boot  -
      
      [    0.000000] OMAP clocksource: GPTIMER2 at 26000000 Hz
      [    0.000000] sched_clock: 32 bits at 26MHz, resolution 38ns, wraps every
      165191ms
      [    0.000000] Unable to handle kernel paging request at virtual address
      00030ef1
      [    0.000000] pgd = c0004000
      [    0.000000] [00030ef1] *pgd=00000000
      [    0.000000] Internal error: Oops: 5 [#1] SMP
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0    Not tainted  (3.3.0-rc1-11574-g0c76665-dirty #3)
      [    0.000000] PC is at dmtimer_read_sched_clock+0x18/0x4c
      [    0.000000] LR is at update_sched_clock+0x10/0x84
      [    0.000000] pc : [<c00243b8>]    lr : [<c0018684>]    psr: 200001d3
      [    0.000000] sp : c0641f38  ip : c0641e18  fp : 0000000a
      [    0.000000] r10: 151c3303  r9 : 00000026  r8 : 76276259
      [    0.000000] r7 : 00028547  r6 : c065ac80  r5 : 431bde82  r4 : c0655968
      [    0.000000] r3 : 00030ef1  r2 : fb032000  r1 : 00000028  r0 : 00000001
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      [tony@atomide.com: updated comments]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      dbc3982a
  6. 26 1月, 2012 12 次提交
  7. 23 1月, 2012 1 次提交
    • W
      ARM: 7291/1: cache: assume 64-byte L1 cachelines for ARMv7 CPUs · a092f2b1
      Will Deacon 提交于
      To ensure correct alignment of cacheline-aligned data, the maximum
      cacheline size needs to be known at compile time.
      
      Since Cortex-A8 and Cortex-A15 have 64-byte cachelines (and it is likely
      that there will be future ARMv7 implementations with the same line size)
      then it makes sense to assume that CPU_V7 implies a 64-byte L1 cacheline
      size. For CPUs with smaller caches, this will result in some harmless
      padding but will help with single zImage work and avoid hitting subtle
      bugs with misaligned data structures.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a092f2b1
  8. 21 1月, 2012 2 次提交
  9. 16 1月, 2012 1 次提交
  10. 13 1月, 2012 1 次提交
    • R
      ARM: Add arm_memblock_steal() to allocate memory away from the kernel · 716a3dc2
      Russell King 提交于
      Several platforms are now using the memblock_alloc+memblock_free+
      memblock_remove trick to obtain memory which won't be mapped in the
      kernel's page tables.  Most platforms do this (correctly) in the
      ->reserve callback.  However, OMAP has started to call these functions
      outside of this callback, and this is extremely unsafe - memory will
      not be unmapped, and could well be given out after memblock is no
      longer responsible for its management.
      
      So, provide arm_memblock_steal() to perform this function, and ensure
      that it panic()s if it is used inappropriately.  Convert everyone
      over, including OMAP.
      
      As a result, OMAP with OMAP4_ERRATA_I688 enabled will panic on boot
      with this change.  Mark this option as BROKEN and make it depend on
      BROKEN.  OMAP needs to be fixed, or 137d105d (ARM: OMAP4: Fix
      errata i688 with MPU interconnect barriers.) reverted until such
      time it can be fixed correctly.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      716a3dc2