Renesas ARM Based SoC Cpufreq Updates for v3.17

* Add cpufreq-cpu0 driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTp4DHAAoJENfPZGlqN0++4ocP/344D6+amrbwK5yuN9cnrGMw
 /Pfse3Z3+ln8huipkeGn6SSsB6i328gFWNXXbdf5BfLKEcm2LnOZB8s+S+qLD0jQ
 gZ0V52FdIwJONk1yA37KT2RDCzxthdtFEwYepD1a8KxJTI5H4n25qeMLFoqHxGYA
 cRT2fUybAWHX++qfUsFTa/WbiGxAEPIXwiTYn9Jvk1OaDuYlFsgn5grJe3LMfrfa
 pC5y8YQk9cXe35oPt8Vf8QYJqQgBX/3Aet5jNdZqh94OqneruJbn6qvuF86WUz7F
 t5ZCsRC8drDvY4ZOB2Y/vpAc9OpO9aiAlO+y5qePgs6PEx7d9Sj1CsixNi5SsSzq
 ntlsW0sK9PP4GgF/BxepUTTUT06lUus9QHKwPog80L2fcRckWrCCwL0/eJMNTZr2
 HCzhVwu1SmQGo1xvJchNnIZAITAjK/sGHT4MbPl3kByM3Ew/1qM+KqyZEX3e614M
 h9DQxwIjpWnVgOig7pBe/Gz0pKMdlpQMxXaR79Au8dwg30/J5KkbKCVexguJlkV5
 VsXPXcXkB/zJnLNJ42LpnN49DWhIW3smYxyCA0YqSwXVUVHRub+jL5SVM8pXOb/N
 N1hD/e7/rCV0EhuianutTTDNBzU5hBBjAvdWf1vz4/K9n7M+d4m16skt7W/QbBVz
 WG0hJjbbCRu72kPyKoCF
 =lNkv
 -----END PGP SIGNATURE-----

Merge tag 'renesas-cpufreq-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

Merge "Renesas ARM Based SoC Cpufreq Updates for v3.17" from Simon Horman

* Add cpufreq-cpu0 device registration

* tag 'renesas-cpufreq-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: add cpufreq-cpu0 driver for common SH-Mobile

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2014-07-06 17:08:18 -07:00
commit 5bf521b813
3 changed files with 39 additions and 0 deletions

View file

@ -48,6 +48,7 @@ obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
# PM objects
obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o
obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o

View file

@ -0,0 +1,31 @@
/*
* CPUFreq support code for SH-Mobile ARM
*
* Copyright (C) 2014 Gaku Inami
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
int __init shmobile_cpufreq_init(void)
{
struct device_node *np;
np = of_cpu_device_node_get(0);
if (np == NULL) {
pr_err("failed to find cpu0 node\n");
return 0;
}
if (of_get_property(np, "operating-points", NULL))
platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
of_node_put(np);
return 0;
}

View file

@ -45,12 +45,19 @@ int shmobile_cpuidle_init(void);
static inline int shmobile_cpuidle_init(void) { return 0; }
#endif
#ifdef CONFIG_CPU_FREQ
int shmobile_cpufreq_init(void);
#else
static inline int shmobile_cpufreq_init(void) { return 0; }
#endif
extern void __iomem *shmobile_scu_base;
static inline void __init shmobile_init_late(void)
{
shmobile_suspend_init();
shmobile_cpuidle_init();
shmobile_cpufreq_init();
}
#endif /* __ARCH_MACH_COMMON_H */