Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'renesas-sh-drivers-for-v3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next

Pull SH driver update from Simon Horman:

- PM Runtime enhancements targeted for use with ARM-based Renesas R-Car
Gen2 SoCs

- Restrict INTC_USERIMASK to SH4A as it is only used there

* tag 'renesas-sh-drivers-for-v3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
drivers: sh: Enable PM runtime for new R-Car Gen2 SoCs
drivers: sh: pm_runtime implementation needs to suspend and resume devices
drivers: sh: Restrict INTC_USERIMASK to SH4A
drivers: sh: pm_runtime does not need idle callback

+35 -7
+1 -1
drivers/sh/intc/Kconfig
··· 6 6 7 7 config INTC_USERIMASK 8 8 bool "Userspace interrupt masking support" 9 - depends on ARCH_SHMOBILE || (SUPERH && CPU_SH4A) || COMPILE_TEST 9 + depends on (SUPERH && CPU_SH4A) || COMPILE_TEST 10 10 help 11 11 This enables support for hardware-assisted userspace hardirq 12 12 masking.
+34 -6
drivers/sh/pm_runtime.c
··· 21 21 #include <linux/slab.h> 22 22 23 23 #ifdef CONFIG_PM_RUNTIME 24 - 25 - static int default_platform_runtime_idle(struct device *dev) 24 + static int sh_pm_runtime_suspend(struct device *dev) 26 25 { 27 - /* suspend synchronously to disable clocks immediately */ 26 + int ret; 27 + 28 + ret = pm_generic_runtime_suspend(dev); 29 + if (ret) { 30 + dev_err(dev, "failed to suspend device\n"); 31 + return ret; 32 + } 33 + 34 + ret = pm_clk_suspend(dev); 35 + if (ret) { 36 + dev_err(dev, "failed to suspend clock\n"); 37 + pm_generic_runtime_resume(dev); 38 + return ret; 39 + } 40 + 28 41 return 0; 42 + } 43 + 44 + static int sh_pm_runtime_resume(struct device *dev) 45 + { 46 + int ret; 47 + 48 + ret = pm_clk_resume(dev); 49 + if (ret) { 50 + dev_err(dev, "failed to resume clock\n"); 51 + return ret; 52 + } 53 + 54 + return pm_generic_runtime_resume(dev); 29 55 } 30 56 31 57 static struct dev_pm_domain default_pm_domain = { 32 58 .ops = { 33 - .runtime_suspend = pm_clk_suspend, 34 - .runtime_resume = pm_clk_resume, 35 - .runtime_idle = default_platform_runtime_idle, 59 + .runtime_suspend = sh_pm_runtime_suspend, 60 + .runtime_resume = sh_pm_runtime_resume, 36 61 USE_PLATFORM_PM_SLEEP_OPS 37 62 }, 38 63 }; ··· 88 63 !of_machine_is_compatible("renesas,r8a7779") && 89 64 !of_machine_is_compatible("renesas,r8a7790") && 90 65 !of_machine_is_compatible("renesas,r8a7791") && 66 + !of_machine_is_compatible("renesas,r8a7792") && 67 + !of_machine_is_compatible("renesas,r8a7793") && 68 + !of_machine_is_compatible("renesas,r8a7794") && 91 69 !of_machine_is_compatible("renesas,sh7372") && 92 70 !of_machine_is_compatible("renesas,sh73a0")) 93 71 return 0;