1. 27 11月, 2014 1 次提交
  2. 25 11月, 2014 1 次提交
  3. 06 11月, 2014 1 次提交
    • D
      spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM · 2b9375b9
      Dmitry Eremin-Solenikov 提交于
      If PM_RUNTIME is enabled, it is easy to trigger the following backtrace
      on pxa2xx hosts:
      
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 1 at /home/lumag/linux/arch/arm/mach-pxa/clock.c:35 clk_disable+0xa0/0xa8()
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-00007-g1b3d2ee-dirty #104
      [<c000de68>] (unwind_backtrace) from [<c000c078>] (show_stack+0x10/0x14)
      [<c000c078>] (show_stack) from [<c001d75c>] (warn_slowpath_common+0x6c/0x8c)
      [<c001d75c>] (warn_slowpath_common) from [<c001d818>] (warn_slowpath_null+0x1c/0x24)
      [<c001d818>] (warn_slowpath_null) from [<c0015e80>] (clk_disable+0xa0/0xa8)
      [<c0015e80>] (clk_disable) from [<c02507f8>] (pxa2xx_spi_suspend+0x2c/0x34)
      [<c02507f8>] (pxa2xx_spi_suspend) from [<c0200360>] (platform_pm_suspend+0x2c/0x54)
      [<c0200360>] (platform_pm_suspend) from [<c0207fec>] (dpm_run_callback.isra.14+0x2c/0x74)
      [<c0207fec>] (dpm_run_callback.isra.14) from [<c0209254>] (__device_suspend+0x120/0x2f8)
      [<c0209254>] (__device_suspend) from [<c0209a94>] (dpm_suspend+0x50/0x208)
      [<c0209a94>] (dpm_suspend) from [<c00455ac>] (suspend_devices_and_enter+0x8c/0x3a0)
      [<c00455ac>] (suspend_devices_and_enter) from [<c0045ad4>] (pm_suspend+0x214/0x2a8)
      [<c0045ad4>] (pm_suspend) from [<c04b5c34>] (test_suspend+0x14c/0x1dc)
      [<c04b5c34>] (test_suspend) from [<c000880c>] (do_one_initcall+0x8c/0x1fc)
      [<c000880c>] (do_one_initcall) from [<c04aecfc>] (kernel_init_freeable+0xf4/0x1b4)
      [<c04aecfc>] (kernel_init_freeable) from [<c0378078>] (kernel_init+0x8/0xec)
      [<c0378078>] (kernel_init) from [<c0009590>] (ret_from_fork+0x14/0x24)
      ---[ end trace 46524156d8faa4f6 ]---
      
      This happens because suspend function tries to disable a clock that is
      already disabled by runtime_suspend callback. Add if
      (!pm_runtime_suspended()) checks to suspend/resume path.
      
      Fixes: 7d94a505 (spi/pxa2xx: add support for runtime PM)
      Signed-off-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Reported-by: NAndrea Adami <andrea.adami@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      2b9375b9
  4. 18 9月, 2014 1 次提交
  5. 20 8月, 2014 1 次提交
  6. 17 6月, 2014 1 次提交
  7. 01 6月, 2014 1 次提交
  8. 30 4月, 2014 1 次提交
  9. 15 4月, 2014 1 次提交
  10. 23 2月, 2014 1 次提交
  11. 16 1月, 2014 1 次提交
  12. 13 1月, 2014 1 次提交
  13. 28 11月, 2013 1 次提交
  14. 24 11月, 2013 1 次提交
  15. 17 10月, 2013 1 次提交
  16. 26 9月, 2013 1 次提交
  17. 05 9月, 2013 1 次提交
    • M
      spi/pxa2xx: check status register as well to determine if the device is off · 269e4a41
      Mika Westerberg 提交于
      The current interrupt handler calls pm_runtime_suspended() to check if the
      device is suspended or not. However, runtime PM status of the device is
      only set to suspended once all PM runtime suspend hooks have executed.
      
      In case of Intel Lynxpoint we have the device bound to the ACPI power
      domain and its runtime suspend hook will put the device to D3hot (or D3cold
      if possible). This means that the device is powered off before its state is
      set to runtime suspended. While in this state the device might get an
      interrupt that is meant for another device (as the interrupt line is
      shared), and because the device is powered off accessing its registers will
      return 0xffffffff that the driver misinterprets as an invalid state.
      
      When this happens user will see messages like below on the console:
      
        pxa2xx-spi INT33C0:00: bad message state in interrupt handler
      
      Fix this by checking the status register for ~0 and returning IRQ_NONE in
      that case.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      269e4a41
  18. 30 7月, 2013 1 次提交
  19. 15 7月, 2013 1 次提交
  20. 21 6月, 2013 1 次提交
    • M
      spi/pxa2xx: fix memory corruption due to wrong size used in devm_kzalloc() · cc0ee987
      Mika Westerberg 提交于
      ACPI part of the driver accidentally used sizeof(*ssp) instead of the
      correct sizeof(*pdata). This leads to nasty memory corruptions like the one
      below:
      
          BUG: unable to handle kernel paging request at 0000000749fd30b8
          IP: [<ffffffff813fe8a1>] __list_del_entry+0x31/0xd0
          PGD 0
          Oops: 0000 [#1] PREEMPT SMP
          Modules linked in:
          CPU: 0 PID: 30 Comm: kworker/0:1 Not tainted 3.10.0-rc6v3.10-rc6_sdhci_modprobe+ #443
          task: ffff8801483a0940 ti: ffff88014839e000 task.ti: ffff88014839e000
          RIP: 0010:[<ffffffff813fe8a1>]  [<ffffffff813fe8a1>] __list_del_entry+0x31/0xd0
          RSP: 0000:ffff88014839fde8  EFLAGS: 00010046
          RAX: ffff880149fd30b0 RBX: ffff880149fd3040 RCX: dead000000200200
          RDX: 0000000749fd30b0 RSI: ffff880149fd3058 RDI: ffff88014834d640
          RBP: ffff88014839fde8 R08: ffff88014834d640 R09: 0000000000000001
          R10: ffff8801483a0940 R11: 0000000000000001 R12: ffff880149fd3040
          R13: ffffffff810e0b30 R14: ffff8801483a0940 R15: ffff88014834d640
          FS:  0000000000000000(0000) GS:ffff880149e00000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
          CR2: 0000000000000168 CR3: 0000000001e0b000 CR4: 00000000001407f0
          DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
          DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
          Stack:
           ffff88014839fe48 ffffffff810e0baf ffffffff81120abd ffff88014839fe20
           ffff8801483a0940 ffff8801483a0940 ffff8801483a0940 ffff8801486b1c90
           ffff88014834d640 ffffffff810e0b30 0000000000000000 0000000000000000
          Call Trace:
           [<ffffffff810e0baf>] worker_thread+0x7f/0x390
           [<ffffffff81120abd>] ? trace_hardirqs_on+0xd/0x10
           [<ffffffff810e0b30>] ? manage_workers.isra.22+0x2b0/0x2b0
           [<ffffffff810e6c09>] kthread+0xd9/0xe0
           [<ffffffff810f93df>] ? local_clock+0x3f/0x50
           [<ffffffff810e6b30>] ? kthread_create_on_node+0x110/0x110
           [<ffffffff818c5dec>] ret_from_fork+0x7c/0xb0
           [<ffffffff810e6b30>] ? kthread_create_on_node+0x110/0x110
      
      Fix this by using the right structure size in devm_kzalloc().
      Reported-by: NJerome Blin <jerome.blin@intel.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org # 3.9+
      cc0ee987
  21. 30 5月, 2013 1 次提交
  22. 13 5月, 2013 4 次提交
  23. 08 4月, 2013 1 次提交
  24. 02 4月, 2013 1 次提交
  25. 13 3月, 2013 1 次提交
  26. 08 2月, 2013 6 次提交
  27. 26 1月, 2013 3 次提交
  28. 08 1月, 2013 1 次提交
    • M
      spi/pxa2xx: embed the ssp_device to platform data · 851bacf5
      Mika Westerberg 提交于
      The spi-pxa2xx-pci glue driver had to implement pxa_ssp_request()/free() in
      order to support the spi-pxa2xx platform driver. Since the ACPI enabled
      platforms can use the same platform driver we would need to implement
      pxa_ssp_request()/free() in some central place that can be shared by the
      ACPI and PCI glue code.
      
      Instead of doing that we can make pxa_ssp_request()/free() to be available
      only when CONFIG_ARCH_PXA is set. On other arches these are being stubbed
      out in preference to passing the ssp_device from the platform data
      directly.
      
      We also change the SPI bus number to be taken from ssp->port_id instead of
      platform device id. This way the supporting code that passes the ssp can
      decide the number (or it can set it to the same as pdev->id).
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      851bacf5
  29. 08 12月, 2012 1 次提交
  30. 06 6月, 2011 1 次提交