]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/cpufreq/cpufreq-dt-platdev.c
KVM: SVM: Move spec control call after restore of GS
[mirror_ubuntu-artful-kernel.git] / drivers / cpufreq / cpufreq-dt-platdev.c
CommitLineData
f56aad1d
VK
1/*
2 * Copyright (C) 2016 Linaro.
3 * Viresh Kumar <viresh.kumar@linaro.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#include <linux/err.h>
11#include <linux/of.h>
12#include <linux/platform_device.h>
13
297a6622
VK
14#include "cpufreq-dt.h"
15
e92bb166 16static const struct of_device_id machines[] __initconst = {
117d4f59
VK
17 { .compatible = "allwinner,sun4i-a10", },
18 { .compatible = "allwinner,sun5i-a10s", },
19 { .compatible = "allwinner,sun5i-a13", },
20 { .compatible = "allwinner,sun5i-r8", },
21 { .compatible = "allwinner,sun6i-a31", },
22 { .compatible = "allwinner,sun6i-a31s", },
23 { .compatible = "allwinner,sun7i-a20", },
24 { .compatible = "allwinner,sun8i-a23", },
25 { .compatible = "allwinner,sun8i-a33", },
26 { .compatible = "allwinner,sun8i-a83t", },
27 { .compatible = "allwinner,sun8i-h3", },
28
e11b6293
HT
29 { .compatible = "apm,xgene-shadowcat", },
30
650ec6cf
LW
31 { .compatible = "arm,integrator-ap", },
32 { .compatible = "arm,integrator-cp", },
33
a0df7734 34 { .compatible = "hisilicon,hi3660", },
3920be47
VK
35 { .compatible = "hisilicon,hi6220", },
36
7ead83f6
VK
37 { .compatible = "fsl,imx27", },
38 { .compatible = "fsl,imx51", },
39 { .compatible = "fsl,imx53", },
40 { .compatible = "fsl,imx7d", },
41
a59511d1 42 { .compatible = "marvell,berlin", },
dcd2ea41
RJ
43 { .compatible = "marvell,pxa250", },
44 { .compatible = "marvell,pxa270", },
a59511d1 45
2249c00a
VK
46 { .compatible = "samsung,exynos3250", },
47 { .compatible = "samsung,exynos4210", },
48 { .compatible = "samsung,exynos4212", },
49 { .compatible = "samsung,exynos4412", },
50 { .compatible = "samsung,exynos5250", },
51#ifndef CONFIG_BL_SWITCHER
52 { .compatible = "samsung,exynos5420", },
c4b40572 53 { .compatible = "samsung,exynos5433", },
2249c00a
VK
54 { .compatible = "samsung,exynos5800", },
55#endif
7694ca6e 56
a399dc9f
VK
57 { .compatible = "renesas,emev2", },
58 { .compatible = "renesas,r7s72100", },
59 { .compatible = "renesas,r8a73a4", },
60 { .compatible = "renesas,r8a7740", },
f0da898b
GU
61 { .compatible = "renesas,r8a7743", },
62 { .compatible = "renesas,r8a7745", },
a399dc9f
VK
63 { .compatible = "renesas,r8a7778", },
64 { .compatible = "renesas,r8a7779", },
65 { .compatible = "renesas,r8a7790", },
66 { .compatible = "renesas,r8a7791", },
ffdf8b86 67 { .compatible = "renesas,r8a7792", },
a399dc9f
VK
68 { .compatible = "renesas,r8a7793", },
69 { .compatible = "renesas,r8a7794", },
70 { .compatible = "renesas,sh73a0", },
71
014400c1
FX
72 { .compatible = "rockchip,rk2928", },
73 { .compatible = "rockchip,rk3036", },
74 { .compatible = "rockchip,rk3066a", },
75 { .compatible = "rockchip,rk3066b", },
76 { .compatible = "rockchip,rk3188", },
77 { .compatible = "rockchip,rk3228", },
78 { .compatible = "rockchip,rk3288", },
79 { .compatible = "rockchip,rk3366", },
80 { .compatible = "rockchip,rk3368", },
81 { .compatible = "rockchip,rk3399", },
82
d9c99acb
MG
83 { .compatible = "sigma,tango4" },
84
1758b337
MY
85 { .compatible = "socionext,uniphier-pro5", },
86 { .compatible = "socionext,uniphier-pxs2", },
87 { .compatible = "socionext,uniphier-ld6b", },
88 { .compatible = "socionext,uniphier-ld11", },
89 { .compatible = "socionext,uniphier-ld20", },
90
7694ca6e
VK
91 { .compatible = "ti,omap2", },
92 { .compatible = "ti,omap3", },
93 { .compatible = "ti,omap4", },
94 { .compatible = "ti,omap5", },
5e4249c6
VK
95
96 { .compatible = "xlnx,zynq-7000", },
bd37e022 97
ab838056
BX
98 { .compatible = "zte,zx296718", },
99
bd37e022 100 { }
f56aad1d
VK
101};
102
103static int __init cpufreq_dt_platdev_init(void)
104{
105 struct device_node *np = of_find_node_by_path("/");
ca5eda5d 106 const struct of_device_id *match;
f56aad1d
VK
107
108 if (!np)
109 return -ENODEV;
110
ca5eda5d
MY
111 match = of_match_node(machines, np);
112 of_node_put(np);
113 if (!match)
f56aad1d
VK
114 return -ENODEV;
115
297a6622
VK
116 return PTR_ERR_OR_ZERO(platform_device_register_data(NULL, "cpufreq-dt",
117 -1, match->data,
118 sizeof(struct cpufreq_dt_platform_data)));
f56aad1d
VK
119}
120device_initcall(cpufreq_dt_platdev_init);