Advertisement
Guest User

final cpufreq-cpu0 patch

a guest
Apr 10th, 2013
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. From 6d022ed7a2f5b1868289a72508cc4af749040fd6 Mon Sep 17 00:00:00 2001
  2. From: Nishanth Menon <nm@ti.com>
  3. Date: Tue, 9 Apr 2013 19:26:40 -0500
  4. Subject: [PATCH 3/3] ARM: OMAP3+: use cpu0-cpufreq driver in device tree
  5. supported boot
  6.  
  7. With OMAP3+ and AM33xx supported SoC having defined CPU device tree
  8. entries with operating-points and clock nodes defined, we can now use
  9. the SoC generic cpufreq-cpu0 driver by registering appropriate device.
  10.  
  11. Signed-off-by: Nishanth Menon <nm@ti.com>
  12. ---
  13. arch/arm/mach-omap2/pm.c | 11 ++++++++---
  14. 1 file changed, 8 insertions(+), 3 deletions(-)
  15.  
  16. diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
  17. index 8d15f9a..6cf95160 100644
  18. --- a/arch/arm/mach-omap2/pm.c
  19. +++ b/arch/arm/mach-omap2/pm.c
  20. @@ -267,7 +267,12 @@ static void __init omap4_init_voltages(void)
  21.  
  22. static inline void omap_init_cpufreq(void)
  23. {
  24. - struct platform_device_info devinfo = { .name = "omap-cpufreq", };
  25. + struct platform_device_info devinfo = { };
  26. +
  27. + if (!of_have_populated_dt())
  28. + devinfo.name = "omap-cpufreq";
  29. + else
  30. + devinfo.name = "cpufreq-cpu0";
  31. platform_device_register_full(&devinfo);
  32. }
  33.  
  34. @@ -301,9 +306,9 @@ int __init omap2_common_pm_late_init(void)
  35. /* Smartreflex device init */
  36. omap_devinit_smartreflex();
  37.  
  38. - /* cpufreq dummy device instantiation */
  39. - omap_init_cpufreq();
  40. }
  41. + /* cpufreq dummy device instantiation */
  42. + omap_init_cpufreq();
  43.  
  44. #ifdef CONFIG_SUSPEND
  45. suspend_set_ops(&omap_pm_ops);
  46. --
  47. 1.7.9.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement