ARM: shmobile: add cpufreq-cpu0 driver for common SH-Mobile
[deliverable/linux.git] / arch / arm / mach-shmobile / cpufreq.c
CommitLineData
06e32c91
GI
1/*
2 * CPUFreq support code for SH-Mobile ARM
3 *
4 * Copyright (C) 2014 Gaku Inami
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/of.h>
12#include <linux/of_device.h>
13#include <linux/platform_device.h>
14
15int __init shmobile_cpufreq_init(void)
16{
17 struct device_node *np;
18
19 np = of_cpu_device_node_get(0);
20 if (np == NULL) {
21 pr_err("failed to find cpu0 node\n");
22 return 0;
23 }
24
25 if (of_get_property(np, "operating-points", NULL))
26 platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
27
28 of_node_put(np);
29
30 return 0;
31}
This page took 0.025773 seconds and 5 git commands to generate.