diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-03-09 11:41:49 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-03-26 09:56:52 -0400 |
commit | 9a1651dcc123e8650d8da0b31fd6dc94940a935d (patch) | |
tree | 29fa5ca2f46d5c2fa9ccf4b24fb80e1c2adff956 | |
parent | 9a3daf58f98bae1d40a3629a8e59c98589801a11 (diff) |
cpufreq: remove cris specific drivers
The cris architecture is getting removed, including the artpec3
and etraxfs SoCs, so these cpufreq drivers are now unused.
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/cpufreq/Makefile | 2 | ||||
-rw-r--r-- | drivers/cpufreq/cris-artpec3-cpufreq.c | 93 | ||||
-rw-r--r-- | drivers/cpufreq/cris-etraxfs-cpufreq.c | 92 |
3 files changed, 0 insertions, 187 deletions
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 43e42542aa19..b2cbdc016c77 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile | |||
@@ -101,8 +101,6 @@ obj-$(CONFIG_POWERNV_CPUFREQ) += powernv-cpufreq.o | |||
101 | ################################################################################## | 101 | ################################################################################## |
102 | # Other platform drivers | 102 | # Other platform drivers |
103 | obj-$(CONFIG_BMIPS_CPUFREQ) += bmips-cpufreq.o | 103 | obj-$(CONFIG_BMIPS_CPUFREQ) += bmips-cpufreq.o |
104 | obj-$(CONFIG_CRIS_MACH_ARTPEC3) += cris-artpec3-cpufreq.o | ||
105 | obj-$(CONFIG_ETRAXFS) += cris-etraxfs-cpufreq.o | ||
106 | obj-$(CONFIG_IA64_ACPI_CPUFREQ) += ia64-acpi-cpufreq.o | 104 | obj-$(CONFIG_IA64_ACPI_CPUFREQ) += ia64-acpi-cpufreq.o |
107 | obj-$(CONFIG_LOONGSON2_CPUFREQ) += loongson2_cpufreq.o | 105 | obj-$(CONFIG_LOONGSON2_CPUFREQ) += loongson2_cpufreq.o |
108 | obj-$(CONFIG_LOONGSON1_CPUFREQ) += loongson1-cpufreq.o | 106 | obj-$(CONFIG_LOONGSON1_CPUFREQ) += loongson1-cpufreq.o |
diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c deleted file mode 100644 index 455b4fb78cba..000000000000 --- a/drivers/cpufreq/cris-artpec3-cpufreq.c +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/module.h> | ||
4 | #include <linux/cpufreq.h> | ||
5 | #include <hwregs/reg_map.h> | ||
6 | #include <hwregs/reg_rdwr.h> | ||
7 | #include <hwregs/clkgen_defs.h> | ||
8 | #include <hwregs/ddr2_defs.h> | ||
9 | |||
10 | static int | ||
11 | cris_sdram_freq_notifier(struct notifier_block *nb, unsigned long val, | ||
12 | void *data); | ||
13 | |||
14 | static struct notifier_block cris_sdram_freq_notifier_block = { | ||
15 | .notifier_call = cris_sdram_freq_notifier | ||
16 | }; | ||
17 | |||
18 | static struct cpufreq_frequency_table cris_freq_table[] = { | ||
19 | {0, 0x01, 6000}, | ||
20 | {0, 0x02, 200000}, | ||
21 | {0, 0, CPUFREQ_TABLE_END}, | ||
22 | }; | ||
23 | |||
24 | static unsigned int cris_freq_get_cpu_frequency(unsigned int cpu) | ||
25 | { | ||
26 | reg_clkgen_rw_clk_ctrl clk_ctrl; | ||
27 | clk_ctrl = REG_RD(clkgen, regi_clkgen, rw_clk_ctrl); | ||
28 | return clk_ctrl.pll ? 200000 : 6000; | ||
29 | } | ||
30 | |||
31 | static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) | ||
32 | { | ||
33 | reg_clkgen_rw_clk_ctrl clk_ctrl; | ||
34 | clk_ctrl = REG_RD(clkgen, regi_clkgen, rw_clk_ctrl); | ||
35 | |||
36 | local_irq_disable(); | ||
37 | |||
38 | /* Even though we may be SMP they will share the same clock | ||
39 | * so all settings are made on CPU0. */ | ||
40 | if (cris_freq_table[state].frequency == 200000) | ||
41 | clk_ctrl.pll = 1; | ||
42 | else | ||
43 | clk_ctrl.pll = 0; | ||
44 | REG_WR(clkgen, regi_clkgen, rw_clk_ctrl, clk_ctrl); | ||
45 | |||
46 | local_irq_enable(); | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static int cris_freq_cpu_init(struct cpufreq_policy *policy) | ||
52 | { | ||
53 | return cpufreq_generic_init(policy, cris_freq_table, 1000000); | ||
54 | } | ||
55 | |||
56 | static struct cpufreq_driver cris_freq_driver = { | ||
57 | .get = cris_freq_get_cpu_frequency, | ||
58 | .verify = cpufreq_generic_frequency_table_verify, | ||
59 | .target_index = cris_freq_target, | ||
60 | .init = cris_freq_cpu_init, | ||
61 | .name = "cris_freq", | ||
62 | .attr = cpufreq_generic_attr, | ||
63 | }; | ||
64 | |||
65 | static int __init cris_freq_init(void) | ||
66 | { | ||
67 | int ret; | ||
68 | ret = cpufreq_register_driver(&cris_freq_driver); | ||
69 | cpufreq_register_notifier(&cris_sdram_freq_notifier_block, | ||
70 | CPUFREQ_TRANSITION_NOTIFIER); | ||
71 | return ret; | ||
72 | } | ||
73 | |||
74 | static int | ||
75 | cris_sdram_freq_notifier(struct notifier_block *nb, unsigned long val, | ||
76 | void *data) | ||
77 | { | ||
78 | int i; | ||
79 | struct cpufreq_freqs *freqs = data; | ||
80 | if (val == CPUFREQ_PRECHANGE) { | ||
81 | reg_ddr2_rw_cfg cfg = | ||
82 | REG_RD(ddr2, regi_ddr2_ctrl, rw_cfg); | ||
83 | cfg.ref_interval = (freqs->new == 200000 ? 1560 : 46); | ||
84 | |||
85 | if (freqs->new == 200000) | ||
86 | for (i = 0; i < 50000; i++); | ||
87 | REG_WR(bif_core, regi_bif_core, rw_sdram_timing, timing); | ||
88 | } | ||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | |||
93 | module_init(cris_freq_init); | ||
diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c deleted file mode 100644 index 4c4b5dd685e3..000000000000 --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/module.h> | ||
4 | #include <linux/cpufreq.h> | ||
5 | #include <hwregs/reg_map.h> | ||
6 | #include <arch/hwregs/reg_rdwr.h> | ||
7 | #include <arch/hwregs/config_defs.h> | ||
8 | #include <arch/hwregs/bif_core_defs.h> | ||
9 | |||
10 | static int | ||
11 | cris_sdram_freq_notifier(struct notifier_block *nb, unsigned long val, | ||
12 | void *data); | ||
13 | |||
14 | static struct notifier_block cris_sdram_freq_notifier_block = { | ||
15 | .notifier_call = cris_sdram_freq_notifier | ||
16 | }; | ||
17 | |||
18 | static struct cpufreq_frequency_table cris_freq_table[] = { | ||
19 | {0, 0x01, 6000}, | ||
20 | {0, 0x02, 200000}, | ||
21 | {0, 0, CPUFREQ_TABLE_END}, | ||
22 | }; | ||
23 | |||
24 | static unsigned int cris_freq_get_cpu_frequency(unsigned int cpu) | ||
25 | { | ||
26 | reg_config_rw_clk_ctrl clk_ctrl; | ||
27 | clk_ctrl = REG_RD(config, regi_config, rw_clk_ctrl); | ||
28 | return clk_ctrl.pll ? 200000 : 6000; | ||
29 | } | ||
30 | |||
31 | static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) | ||
32 | { | ||
33 | reg_config_rw_clk_ctrl clk_ctrl; | ||
34 | clk_ctrl = REG_RD(config, regi_config, rw_clk_ctrl); | ||
35 | |||
36 | local_irq_disable(); | ||
37 | |||
38 | /* Even though we may be SMP they will share the same clock | ||
39 | * so all settings are made on CPU0. */ | ||
40 | if (cris_freq_table[state].frequency == 200000) | ||
41 | clk_ctrl.pll = 1; | ||
42 | else | ||
43 | clk_ctrl.pll = 0; | ||
44 | REG_WR(config, regi_config, rw_clk_ctrl, clk_ctrl); | ||
45 | |||
46 | local_irq_enable(); | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static int cris_freq_cpu_init(struct cpufreq_policy *policy) | ||
52 | { | ||
53 | return cpufreq_generic_init(policy, cris_freq_table, 1000000); | ||
54 | } | ||
55 | |||
56 | static struct cpufreq_driver cris_freq_driver = { | ||
57 | .get = cris_freq_get_cpu_frequency, | ||
58 | .verify = cpufreq_generic_frequency_table_verify, | ||
59 | .target_index = cris_freq_target, | ||
60 | .init = cris_freq_cpu_init, | ||
61 | .name = "cris_freq", | ||
62 | .attr = cpufreq_generic_attr, | ||
63 | }; | ||
64 | |||
65 | static int __init cris_freq_init(void) | ||
66 | { | ||
67 | int ret; | ||
68 | ret = cpufreq_register_driver(&cris_freq_driver); | ||
69 | cpufreq_register_notifier(&cris_sdram_freq_notifier_block, | ||
70 | CPUFREQ_TRANSITION_NOTIFIER); | ||
71 | return ret; | ||
72 | } | ||
73 | |||
74 | static int | ||
75 | cris_sdram_freq_notifier(struct notifier_block *nb, unsigned long val, | ||
76 | void *data) | ||
77 | { | ||
78 | int i; | ||
79 | struct cpufreq_freqs *freqs = data; | ||
80 | if (val == CPUFREQ_PRECHANGE) { | ||
81 | reg_bif_core_rw_sdram_timing timing = | ||
82 | REG_RD(bif_core, regi_bif_core, rw_sdram_timing); | ||
83 | timing.cpd = (freqs->new == 200000 ? 0 : 1); | ||
84 | |||
85 | if (freqs->new == 200000) | ||
86 | for (i = 0; i < 50000; i++) ; | ||
87 | REG_WR(bif_core, regi_bif_core, rw_sdram_timing, timing); | ||
88 | } | ||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | module_init(cris_freq_init); | ||