1. 13 9月, 2012 7 次提交
    • T
      ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+ · dbc04161
      Tony Lindgren 提交于
      As the plat and mach includes need to disappear for single zImage work,
      we need to remove plat/hardware.h.
      
      Do this by splitting plat/hardware.h into omap1 and omap2+ specific files.
      
      The old plat/hardware.h already has omap1 only defines, so it gets moved
      to mach/hardware.h for omap1. For omap2+, we use the local soc.h
      that for now just includes the related SoC headers to keep this patch more
      readable.
      
      Note that the local soc.h still includes plat/cpu.h that can be dealt
      with in later patches. Let's also include plat/serial.h from common.h for
      all the board-*.c files. This allows making the include files local later
      on without patching these files again.
      
      Note that only minimal changes are done in this patch for the
      drivers/watchdog/omap_wdt.c driver to keep things compiling. Further
      patches are needed to eventually remove cpu_is_omap usage in the drivers.
      
      Also only minimal changes are done to sound/soc/omap/* to remove the
      unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's
      no need to include omap44xx.h.
      
      While at it, also sort some of the includes in the standard way.
      
      Cc: linux-watchdog@vger.kernel.org
      Cc: alsa-devel@alsa-project.org
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Liam Girdwood <lrg@ti.com>
      Acked-by: NWim Van Sebroeck <wim@iguana.be>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      dbc04161
    • T
      ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ · ec2c0825
      Tony Lindgren 提交于
      Remove hardcoded IRQs in irqs.h and related files as these
      are no longer needed.
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ec2c0825
    • T
      ARM: OMAP2+: Prepare for irqs.h removal · 7d7e1eba
      Tony Lindgren 提交于
      As the interrupts should only be defined in the platform_data, and
      eventually coming from device tree, there's no need to define them
      in header files.
      
      Let's remove the hardcoded references to irqs.h and fix up the includes
      so we don't rely on headers included in irqs.h. Note that we're
      defining OMAP_INTC_START as 0 to the interrupts. This will be needed
      when we enable SPARSE_IRQ. For some drivers we need to add
      #include <plat/cpu.h> for now until these drivers are fixed to
      remove cpu_is_omapxxxx() usage.
      
      While at it, sort som of the includes the standard way, and add
      the trailing commas where they are missing in the related data
      structures.
      
      Note that for drivers/staging/tidspbridge we just define things
      locally.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      7d7e1eba
    • T
      ARM: OMAP: Move gpio.h to include/linux/platform_data · 4b25408f
      Tony Lindgren 提交于
      This way we can remove includes of plat/gpio.h which won't work
      with the single zImage support.
      
      Note that we also remove the cpu_class_is_omap2() check
      in gpio-omap.c as the drivers should not call it as we need to
      make it local to arch/arm/mach-omap2 for single zImage support.
      
      While at it, arrange the related includes in the standard way.
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: linux-mtd@lists.infradead.org
      Cc: alsa-devel@alsa-project.org
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      4b25408f
    • T
      ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end · a940d9a1
      Tony Lindgren 提交于
      We can't use hardcoded interrupts for SPARSE_IRQ, and can replace
      the hardcoded gpio_base with twl_gpiochip.base after it's been
      allocated.
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      a940d9a1
    • T
      ARM: OMAP2+: Remove unused nand_irq for GPMC · 714df7b8
      Tony Lindgren 提交于
      This is no longer needed and assumes a fixed IRQ number
      that won't work with SPARSE_IRQ.
      Acked-by: NAfzal Mohammed <afzal@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      714df7b8
    • T
      ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c · 3003ce3e
      Tony Lindgren 提交于
      Make INTCPS_NR_IRQS local for mach-omap2/irq.c
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      3003ce3e
  2. 11 9月, 2012 5 次提交
  3. 07 9月, 2012 1 次提交
  4. 31 8月, 2012 6 次提交
  5. 23 8月, 2012 1 次提交
    • A
      ARM: omap: allow building omap44xx without SMP · c7a9b09b
      Arnd Bergmann 提交于
      The new omap4 cpuidle implementation currently requires
      ARCH_NEEDS_CPU_IDLE_COUPLED, which only works on SMP.
      
      This patch makes it possible to build a non-SMP kernel
      for that platform. This is not normally desired for
      end-users but can be useful for testing.
      
      Without this patch, building rand-0y2jSKT results in:
      
      drivers/cpuidle/coupled.c: In function 'cpuidle_coupled_poke':
      drivers/cpuidle/coupled.c:317:3: error: implicit declaration of function '__smp_call_function_single' [-Werror=implicit-function-declaration]
      
      It's not clear if this patch is the best solution for
      the problem at hand. I have made sure that we can now
      build the kernel in all configurations, but that does
      not mean it will actually work on an OMAP44xx.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      c7a9b09b
  6. 17 8月, 2012 1 次提交
  7. 09 8月, 2012 2 次提交
  8. 08 8月, 2012 2 次提交
    • K
      Revert "ARM: OMAP3: PM: call pre/post transition per powerdomain" · e0e29fd7
      Kevin Hilman 提交于
      This reverts commit 58f0829b.
      
      Converstion to per-pwrdm per/post transition calls was a bit
      premature.  Only tracking MPU, PER & CORE in the idle path means we
      lose the accounting for all the other powerdomains which may also
      transition in idle.  On OMAP3, due to autodeps, several powerdomains
      transition along with MPU (e.g. DSS, USBHOST), and the accounting for
      these was lost with this patch.  Since the accounting includes the
      context loss counters, drivers for devices in those power domains
      would never notice context lost, so would likely hang after any
      off-mode transitions.
      
      This patch should be revisited when the upcoming clkdm/pwrmdm/voltdm
      use-counting seires is merged since then we can properly do accounting
      without relying on a call in the idle path.
      
      In addition, the original patch had another bug because the PER
      powerdomain accounting was not updated until after the GPIO resume
      hook is called.  Since gpio_resume_after_idle() checks the context
      loss count (which is not yet updated) it would not properly restore
      context, leaving the GPIO banks in an undefined state.
      
      Cc: Jean Pihet <jean.pihet@newoldbits.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Reported-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      e0e29fd7
    • K
      ARM: OMAP3: TWL4030: ensure sys_nirq1 is mux'd and wakeup enabled · 265a2bc8
      Kevin Hilman 提交于
      The SYS_NIRQ1 pin is the interupt line for the PMIC part of the TWL6030
      and interrupts from the PMIC are needed as wakeup sources.
      
      Ensure this pin is mux'd as input and has wakeup enabled so PMIC
      interupts (e.g. RTC) can be used as wakeup sources.
      
      Tested on 3430/n900, OMAP3530/Overo Fire, 3730/Overo FireSTORM,
      3730/Beagle-xM.
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      265a2bc8
  9. 07 8月, 2012 4 次提交
    • M
      omap2: mux: remove comment for nonexistent member · 36b547aa
      Michael Jones 提交于
      remove comment for nonexistent member
      Signed-off-by: NMichael Jones <michael.jones@matrix-vision.de>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      36b547aa
    • S
      OMAP2+: Fix random config build break with !ARM_CPU_SUSPEND · acb11fe8
      Santosh Shilimkar 提交于
      The random config builds with PM and !ARM_CPU_SUSPEND breaks with below
      error on omap2plus_defconfig.
      
      arch/arm/mach-omap2/sleep44xx.S:323: undefined reference to `cpu_resume'
      arch/arm/mach-omap2/omap-mpuss-lowpower.c:278: undefined reference to `cpu_suspend'
      
      This is because recently merged OMAP5 platform shares the common files
      with OMAP4 but doesn't select ARM_CPU_SUSPEND. Without the ARM_CPU_SUSPEND
      the sleep code is meaningless.
      
      Fix the same by adding ARM_CPU_SUSPEND for OMAP5. The suggestion came from
      Russell King in an off-list discussion.
      
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Kevin Hilman <khilman@ti.com>
      Reported-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      acb11fe8
    • J
      ARM: OMAP3: igep0020: set GPIO mode for mux mcspi1_cs2 pin · a71eb61c
      Javier Martinez Canillas 提交于
      According to the IGEPv2 Rev.C data-sheet the LAN9221i pin 14 (IRQ) is
      connected to the OMAP3730 mcspi1_cs2 pin. Since this omap mux pin acts
      as an IRQ line, it has to be configured as an input GPIO.
      
      IGEPv2 platform code sets the smsc911x_cfg->gpio_irq to GPIO 176 but
      since the mux pin default mode is MODE7 (safe_mode) the driver fails
      when trying to register the IRQ with the following error message:
      
      [    1.994598] smsc911x: Driver version 2008-10-21
      [    3.704162] irq 272: nobody cared (try booting with the "irqpoll" option)
      [    3.711364] [<c001a114>] (unwind_backtrace+0x0/0xf0) from [<c009a0d4>] (__report_bad_irq+0x20/0xbc)
      [    3.720916] [<c009a0d4>] (__report_bad_irq+0x20/0xbc) from [<c009a41c>] (note_interrupt+0x1d8/0x238)
      [    3.730560] [<c009a41c>] (note_interrupt+0x1d8/0x238) from [<c0098234>] (handle_irq_event_percpu+0xc0/0x260)
      [    3.740936] [<c0098234>] (handle_irq_event_percpu+0xc0/0x260) from [<c0098410>] (handle_irq_event+0x3c/0x5c)
      [    3.751312] [<c0098410>] (handle_irq_event+0x3c/0x5c) from [<c009abe0>] (handle_level_irq+0xac/0x10c)
      [    3.761047] [<c009abe0>] (handle_level_irq+0xac/0x10c) from [<c0097a34>] (generic_handle_irq+0x30/0x48)
      [    3.770935] [<c0097a34>] (generic_handle_irq+0x30/0x48) from [<c02a6b74>] (gpio_irq_handler+0x180/0x1d4)
      [    3.780944] [<c02a6b74>] (gpio_irq_handler+0x180/0x1d4) from [<c0097a34>] (generic_handle_irq+0x30/0x48)
      [    3.790954] [<c0097a34>] (generic_handle_irq+0x30/0x48) from [<c0013e18>] (handle_IRQ+0x4c/0xac)
      [    3.800231] [<c0013e18>] (handle_IRQ+0x4c/0xac) from [<c000858c>] (omap3_intc_handle_irq+0x60/0x74)
      [    3.809783] [<c000858c>] (omap3_intc_handle_irq+0x60/0x74) from [<c04979e4>] (__irq_svc+0x44/0x60)
      [    3.819213] Exception stack(0xee42fde0 to 0xee42fe28)
      [    3.824554] fde0: 00000001 00000001 00000000 00000000 60000013 c06cce14 c06cce14 00000110
      [    3.833190] fe00: 00000000 c06ccdf4 60000013 ee41d000 fb058064 ee42fe28 c0089e08 c04976b4
      [    3.841796] fe20: 20000013 ffffffff
      [    3.845489] [<c04979e4>] (__irq_svc+0x44/0x60) from [<c04976b4>] (_raw_spin_unlock_irqrestore+0x34/0x44)
      [    3.855499] [<c04976b4>] (_raw_spin_unlock_irqrestore+0x34/0x44) from [<c0099744>] (__setup_irq+0x1b8/0x3f0)
      [    3.865875] [<c0099744>] (__setup_irq+0x1b8/0x3f0) from [<c0099a34>] (request_threaded_irq+0xb8/0x140)
      [    3.875701] [<c0099a34>] (request_threaded_irq+0xb8/0x140) from [<c0487950>] (smsc911x_drv_probe+0x75c/0x11a4)
      [    3.886260] [<c0487950>] (smsc911x_drv_probe+0x75c/0x11a4) from [<c02e9bcc>] (platform_drv_probe+0x18/0x1c)
      [    3.906707] [<c02e89b8>] (driver_probe_device+0x90/0x210) from [<c02e8bcc>] (__driver_attach+0x94/0x98)
      [    3.916625] [<c02e8bcc>] (__driver_attach+0x94/0x98) from [<c02e7298>] (bus_for_each_dev+0x50/0x7c)
      [    3.926177] [<c02e7298>] (bus_for_each_dev+0x50/0x7c) from [<c02e81d4>] (bus_add_driver+0x184/0x248)
      [    3.935821] [<c02e81d4>] (bus_add_driver+0x184/0x248) from [<c02e909c>] (driver_register+0x78/0x12c)
      [    3.945465] [<c02e909c>] (driver_register+0x78/0x12c) from [<c0008648>] (do_one_initcall+0x34/0x178)
      [    3.955108] [<c0008648>] (do_one_initcall+0x34/0x178) from [<c066e8f4>] (kernel_init+0xfc/0x1c0)
      [    3.964385] [<c066e8f4>] (kernel_init+0xfc/0x1c0) from [<c00140b0>] (kernel_thread_exit+0x0/0x8)
      [    3.973632] handlers:
      [    3.976043] [<c034e2cc>] smsc911x_irqhandler
      [    3.980560] Disabling IRQ #272
      Signed-off-by: NJavier Martinez Canillas <javier@dowhile0.org>
      Acked-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
      Tested-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      a71eb61c
    • I
      Revert "ARM: OMAP3530evm: set pendown_state and debounce time for ads7846" · c31cc1b7
      Igor Grinberg 提交于
      1) The above commit introduced a common ->get_pendown_state() function
      into the generic code, but that function was board-specific for the
      OMAP3EVM and thus broke most other boards using this code.
      
      2) The above commit was mis-merged introducing another bug which
      prevents the ads7846 driver probe function to succeed.
      The omap_ads7846_init() function frees the pendown GPIO in case there is
      no ->get_pendown_state() function set by the caller (board specific
      code), so it can be requested later by the ads7846 driver.
      The above commit add a common ->get_pendown_state() function without
      removing the gpio_free() call and thus once the ads7846 driver tries
      to use the pendown GPIO, it crashes as the pendown GPIO has not been
      requested.
      
      3) The above commit introduces NO new functionality as
      get_pendown_state() function is already implemented in a suitable way by
      the ads7846 driver and the debounce time handling has already been
      fixed by commit 97ee9f01 (ARM: OMAP: fix the ads7846 init code).
      
      This reverts commit 16aced80.
      
      Conflicts:
      	arch/arm/mach-omap2/common-board-devices.c
      
      Solved by taking the working version prior to the above commit.
      
      Cc: Zumeng Chen <zumeng.chen@windriver.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NIgor Grinberg <grinberg@compulab.co.il>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      c31cc1b7
  10. 31 7月, 2012 1 次提交
  11. 26 7月, 2012 4 次提交
    • S
      ARM: OMAP4: CPUidle: Open broadcast clock-event device. · b93d70ae
      Santosh Shilimkar 提交于
      OMAP4 idle driver uses CLOCK_EVT_NOTIFY_BROADCAST_[ENTER/EXIT]
      for broadcast clock events. But _ENTER/_EXIT doesn't really open
      broadcast clock events and to explicitly setup the broadcast device,
      CLOCK_EVT_NOTIFY_BROADCAST_ON should be used.
      
      Add the missing CLOCK_EVT_NOTIFY_BROADCAST_ON clockevent notifications.
      This will setup the broadcast timer in either periodic/oneshot modes
      correctly. Recent clockevent infrastructure change 77b0d60c {leave the
      broadcast device in shutdown mode when not needed} exposed this bug
      leading to boot hangs in oneshot mode. Prior to this, periodic broadcast
      mode was also broken. This change fixes both the periodic/oneshot broadcast
      modes.
      
      Discussion thread :
      	https://lkml.org/lkml/2012/4/9/13Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      b93d70ae
    • K
      ARM: OMAP4: CPUidle: add synchronization for coupled idle states · 5b4d5bcc
      Kevin Hilman 提交于
      With coupled idle states, a failure for any CPU to hit a low power
      state must be coordinated such that all CPUs abort.
      
      On OMAP4, when entering a coupled state, CPU0 has to wait for CPU1 to
      enter its low power state before it can enter its low power state.
      
      This is implemented by letting CPU0 wait for the CPU1 powerdomain to
      hit off.  However, there are conditions where CPU1 might abort/fail
      and not hit off while CPU0 is waiting for it.  For example, a CPU1
      wakeup or a failed attempt to hit off due to hardware conditions.
      
      To avoid the deadlock where CPU0 would continually wait for CPU1 to
      hit off-mode, this patch adds a flag to signal when each CPU has come
      out of its low-power state.  CPU0 then checks whether CPU1 has hit off
      *or* has already completed its attempt to hit off.  If the latter,
      CPU0 must abort its attempt to hit a low-power state so the coupled
      state enter method can return.
      
      In addition, cpuidle_coupled_parallel_barrier() is used to ensure the
      clearing of the 'done' flag is synchronized on all CPUs.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      5b4d5bcc
    • S
      ARM: OMAP4: CPUidle: Use coupled cpuidle states to implement SMP cpuidle. · dd3ad97c
      Santosh Shilimkar 提交于
      OMAP4 CPUDILE driver is converted mainly based on notes from the
      coupled cpuidle patch series.
      
      The changes include :
      - Register both CPUs and C-states to cpuidle driver.
      - Set struct cpuidle_device.coupled_cpus
      - Set struct cpuidle_device.safe_state to non coupled state.
      - Set CPUIDLE_FLAG_COUPLED in struct cpuidle_state.flags for each
        state that affects multiple cpus.
      - Separate ->enter hooks for coupled & simple idle.
      - CPU0 wait loop for CPU1 power transition.
      - CPU1 wakeup mechanism for the idle exit.
      - Enabling ARCH_NEEDS_CPU_IDLE_COUPLED for OMAP4.
      
      Thanks to Kevin Hilman and Colin Cross on the suggestions/fixes
      on the intermediate version of this patch.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      dd3ad97c
    • S
      ARM: OMAP: timer: allow gp timer clock-event to be used on both cpus · 11d6ec2e
      Santosh Shilimkar 提交于
      For coupled cpuidle to work when both cpus are active, it needs a global timer
      that can handle events for both cpus.  This timer is used as the broadcast
      clock-event when the per-cpu timer hardware stop in low power states.
      Set the cpumask of clockevent_gpt to all cpus, set the rating correctly, and
      set the irq to allow the clockevent core to determine the affinity of the
      timer.
      Signed-off-by: NColin Cross <ccross@android.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      11d6ec2e
  12. 20 7月, 2012 1 次提交
  13. 10 7月, 2012 2 次提交
  14. 09 7月, 2012 3 次提交