arm_big_little.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. /*
  2. * ARM big.LITTLE Platforms CPUFreq support
  3. *
  4. * Copyright (C) 2013 ARM Ltd.
  5. * Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
  6. *
  7. * Copyright (C) 2013 Linaro.
  8. * Viresh Kumar <viresh.kumar@linaro.org>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. *
  14. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  15. * kind, whether express or implied; without even the implied warranty
  16. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. */
  19. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  20. #include <linux/clk.h>
  21. #include <linux/cpu.h>
  22. #include <linux/cpufreq.h>
  23. #include <linux/cpumask.h>
  24. #include <linux/export.h>
  25. #include <linux/module.h>
  26. #include <linux/mutex.h>
  27. #include <linux/of_platform.h>
  28. #include <linux/pm_opp.h>
  29. #include <linux/slab.h>
  30. #include <linux/topology.h>
  31. #include <linux/types.h>
  32. #include "arm_big_little.h"
  33. /* Currently we support only two clusters */
  34. #define A15_CLUSTER 0
  35. #define A7_CLUSTER 1
  36. #define MAX_CLUSTERS 2
  37. #ifdef CONFIG_BL_SWITCHER
  38. #include <asm/bL_switcher.h>
  39. static bool bL_switching_enabled;
  40. #define is_bL_switching_enabled() bL_switching_enabled
  41. #define set_switching_enabled(x) (bL_switching_enabled = (x))
  42. #else
  43. #define is_bL_switching_enabled() false
  44. #define set_switching_enabled(x) do { } while (0)
  45. #define bL_switch_request(...) do { } while (0)
  46. #define bL_switcher_put_enabled() do { } while (0)
  47. #define bL_switcher_get_enabled() do { } while (0)
  48. #endif
  49. #define ACTUAL_FREQ(cluster, freq) ((cluster == A7_CLUSTER) ? freq << 1 : freq)
  50. #define VIRT_FREQ(cluster, freq) ((cluster == A7_CLUSTER) ? freq >> 1 : freq)
  51. static struct cpufreq_arm_bL_ops *arm_bL_ops;
  52. static struct clk *clk[MAX_CLUSTERS];
  53. static struct cpufreq_frequency_table *freq_table[MAX_CLUSTERS + 1];
  54. static atomic_t cluster_usage[MAX_CLUSTERS + 1];
  55. static unsigned int clk_big_min; /* (Big) clock frequencies */
  56. static unsigned int clk_little_max; /* Maximum clock frequency (Little) */
  57. static DEFINE_PER_CPU(unsigned int, physical_cluster);
  58. static DEFINE_PER_CPU(unsigned int, cpu_last_req_freq);
  59. static struct mutex cluster_lock[MAX_CLUSTERS];
  60. static inline int raw_cpu_to_cluster(int cpu)
  61. {
  62. return topology_physical_package_id(cpu);
  63. }
  64. static inline int cpu_to_cluster(int cpu)
  65. {
  66. return is_bL_switching_enabled() ?
  67. MAX_CLUSTERS : raw_cpu_to_cluster(cpu);
  68. }
  69. static unsigned int find_cluster_maxfreq(int cluster)
  70. {
  71. int j;
  72. u32 max_freq = 0, cpu_freq;
  73. for_each_online_cpu(j) {
  74. cpu_freq = per_cpu(cpu_last_req_freq, j);
  75. if ((cluster == per_cpu(physical_cluster, j)) &&
  76. (max_freq < cpu_freq))
  77. max_freq = cpu_freq;
  78. }
  79. pr_debug("%s: cluster: %d, max freq: %d\n", __func__, cluster,
  80. max_freq);
  81. return max_freq;
  82. }
  83. static unsigned int clk_get_cpu_rate(unsigned int cpu)
  84. {
  85. u32 cur_cluster = per_cpu(physical_cluster, cpu);
  86. u32 rate = clk_get_rate(clk[cur_cluster]) / 1000;
  87. /* For switcher we use virtual A7 clock rates */
  88. if (is_bL_switching_enabled())
  89. rate = VIRT_FREQ(cur_cluster, rate);
  90. pr_debug("%s: cpu: %d, cluster: %d, freq: %u\n", __func__, cpu,
  91. cur_cluster, rate);
  92. return rate;
  93. }
  94. static unsigned int bL_cpufreq_get_rate(unsigned int cpu)
  95. {
  96. if (is_bL_switching_enabled()) {
  97. pr_debug("%s: freq: %d\n", __func__, per_cpu(cpu_last_req_freq,
  98. cpu));
  99. return per_cpu(cpu_last_req_freq, cpu);
  100. } else {
  101. return clk_get_cpu_rate(cpu);
  102. }
  103. }
  104. static unsigned int
  105. bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate)
  106. {
  107. u32 new_rate, prev_rate;
  108. int ret;
  109. bool bLs = is_bL_switching_enabled();
  110. mutex_lock(&cluster_lock[new_cluster]);
  111. if (bLs) {
  112. prev_rate = per_cpu(cpu_last_req_freq, cpu);
  113. per_cpu(cpu_last_req_freq, cpu) = rate;
  114. per_cpu(physical_cluster, cpu) = new_cluster;
  115. new_rate = find_cluster_maxfreq(new_cluster);
  116. new_rate = ACTUAL_FREQ(new_cluster, new_rate);
  117. } else {
  118. new_rate = rate;
  119. }
  120. pr_debug("%s: cpu: %d, old cluster: %d, new cluster: %d, freq: %d\n",
  121. __func__, cpu, old_cluster, new_cluster, new_rate);
  122. ret = clk_set_rate(clk[new_cluster], new_rate * 1000);
  123. if (!ret) {
  124. /*
  125. * FIXME: clk_set_rate hasn't returned an error here however it
  126. * may be that clk_change_rate failed due to hardware or
  127. * firmware issues and wasn't able to report that due to the
  128. * current design of the clk core layer. To work around this
  129. * problem we will read back the clock rate and check it is
  130. * correct. This needs to be removed once clk core is fixed.
  131. */
  132. if (clk_get_rate(clk[new_cluster]) != new_rate * 1000)
  133. ret = -EIO;
  134. }
  135. if (WARN_ON(ret)) {
  136. pr_err("clk_set_rate failed: %d, new cluster: %d\n", ret,
  137. new_cluster);
  138. if (bLs) {
  139. per_cpu(cpu_last_req_freq, cpu) = prev_rate;
  140. per_cpu(physical_cluster, cpu) = old_cluster;
  141. }
  142. mutex_unlock(&cluster_lock[new_cluster]);
  143. return ret;
  144. }
  145. mutex_unlock(&cluster_lock[new_cluster]);
  146. /* Recalc freq for old cluster when switching clusters */
  147. if (old_cluster != new_cluster) {
  148. pr_debug("%s: cpu: %d, old cluster: %d, new cluster: %d\n",
  149. __func__, cpu, old_cluster, new_cluster);
  150. /* Switch cluster */
  151. bL_switch_request(cpu, new_cluster);
  152. mutex_lock(&cluster_lock[old_cluster]);
  153. /* Set freq of old cluster if there are cpus left on it */
  154. new_rate = find_cluster_maxfreq(old_cluster);
  155. new_rate = ACTUAL_FREQ(old_cluster, new_rate);
  156. if (new_rate) {
  157. pr_debug("%s: Updating rate of old cluster: %d, to freq: %d\n",
  158. __func__, old_cluster, new_rate);
  159. if (clk_set_rate(clk[old_cluster], new_rate * 1000))
  160. pr_err("%s: clk_set_rate failed: %d, old cluster: %d\n",
  161. __func__, ret, old_cluster);
  162. }
  163. mutex_unlock(&cluster_lock[old_cluster]);
  164. }
  165. return 0;
  166. }
  167. /* Set clock frequency */
  168. static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
  169. unsigned int index)
  170. {
  171. u32 cpu = policy->cpu, cur_cluster, new_cluster, actual_cluster;
  172. unsigned int freqs_new;
  173. cur_cluster = cpu_to_cluster(cpu);
  174. new_cluster = actual_cluster = per_cpu(physical_cluster, cpu);
  175. freqs_new = freq_table[cur_cluster][index].frequency;
  176. if (is_bL_switching_enabled()) {
  177. if ((actual_cluster == A15_CLUSTER) &&
  178. (freqs_new < clk_big_min)) {
  179. new_cluster = A7_CLUSTER;
  180. } else if ((actual_cluster == A7_CLUSTER) &&
  181. (freqs_new > clk_little_max)) {
  182. new_cluster = A15_CLUSTER;
  183. }
  184. }
  185. return bL_cpufreq_set_rate(cpu, actual_cluster, new_cluster, freqs_new);
  186. }
  187. static inline u32 get_table_count(struct cpufreq_frequency_table *table)
  188. {
  189. int count;
  190. for (count = 0; table[count].frequency != CPUFREQ_TABLE_END; count++)
  191. ;
  192. return count;
  193. }
  194. /* get the minimum frequency in the cpufreq_frequency_table */
  195. static inline u32 get_table_min(struct cpufreq_frequency_table *table)
  196. {
  197. struct cpufreq_frequency_table *pos;
  198. uint32_t min_freq = ~0;
  199. cpufreq_for_each_entry(pos, table)
  200. if (pos->frequency < min_freq)
  201. min_freq = pos->frequency;
  202. return min_freq;
  203. }
  204. /* get the maximum frequency in the cpufreq_frequency_table */
  205. static inline u32 get_table_max(struct cpufreq_frequency_table *table)
  206. {
  207. struct cpufreq_frequency_table *pos;
  208. uint32_t max_freq = 0;
  209. cpufreq_for_each_entry(pos, table)
  210. if (pos->frequency > max_freq)
  211. max_freq = pos->frequency;
  212. return max_freq;
  213. }
  214. static int merge_cluster_tables(void)
  215. {
  216. int i, j, k = 0, count = 1;
  217. struct cpufreq_frequency_table *table;
  218. for (i = 0; i < MAX_CLUSTERS; i++)
  219. count += get_table_count(freq_table[i]);
  220. table = kzalloc(sizeof(*table) * count, GFP_KERNEL);
  221. if (!table)
  222. return -ENOMEM;
  223. freq_table[MAX_CLUSTERS] = table;
  224. /* Add in reverse order to get freqs in increasing order */
  225. for (i = MAX_CLUSTERS - 1; i >= 0; i--) {
  226. for (j = 0; freq_table[i][j].frequency != CPUFREQ_TABLE_END;
  227. j++) {
  228. table[k].frequency = VIRT_FREQ(i,
  229. freq_table[i][j].frequency);
  230. pr_debug("%s: index: %d, freq: %d\n", __func__, k,
  231. table[k].frequency);
  232. k++;
  233. }
  234. }
  235. table[k].driver_data = k;
  236. table[k].frequency = CPUFREQ_TABLE_END;
  237. pr_debug("%s: End, table: %p, count: %d\n", __func__, table, k);
  238. return 0;
  239. }
  240. static void _put_cluster_clk_and_freq_table(struct device *cpu_dev)
  241. {
  242. u32 cluster = raw_cpu_to_cluster(cpu_dev->id);
  243. if (!freq_table[cluster])
  244. return;
  245. clk_put(clk[cluster]);
  246. dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]);
  247. if (arm_bL_ops->free_opp_table)
  248. arm_bL_ops->free_opp_table(cpu_dev);
  249. dev_dbg(cpu_dev, "%s: cluster: %d\n", __func__, cluster);
  250. }
  251. static void put_cluster_clk_and_freq_table(struct device *cpu_dev)
  252. {
  253. u32 cluster = cpu_to_cluster(cpu_dev->id);
  254. int i;
  255. if (atomic_dec_return(&cluster_usage[cluster]))
  256. return;
  257. if (cluster < MAX_CLUSTERS)
  258. return _put_cluster_clk_and_freq_table(cpu_dev);
  259. for_each_present_cpu(i) {
  260. struct device *cdev = get_cpu_device(i);
  261. if (!cdev) {
  262. pr_err("%s: failed to get cpu%d device\n", __func__, i);
  263. return;
  264. }
  265. _put_cluster_clk_and_freq_table(cdev);
  266. }
  267. /* free virtual table */
  268. kfree(freq_table[cluster]);
  269. }
  270. static int _get_cluster_clk_and_freq_table(struct device *cpu_dev)
  271. {
  272. u32 cluster = raw_cpu_to_cluster(cpu_dev->id);
  273. int ret;
  274. if (freq_table[cluster])
  275. return 0;
  276. ret = arm_bL_ops->init_opp_table(cpu_dev);
  277. if (ret) {
  278. dev_err(cpu_dev, "%s: init_opp_table failed, cpu: %d, err: %d\n",
  279. __func__, cpu_dev->id, ret);
  280. goto out;
  281. }
  282. ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table[cluster]);
  283. if (ret) {
  284. dev_err(cpu_dev, "%s: failed to init cpufreq table, cpu: %d, err: %d\n",
  285. __func__, cpu_dev->id, ret);
  286. goto free_opp_table;
  287. }
  288. clk[cluster] = clk_get(cpu_dev, NULL);
  289. if (!IS_ERR(clk[cluster])) {
  290. dev_dbg(cpu_dev, "%s: clk: %p & freq table: %p, cluster: %d\n",
  291. __func__, clk[cluster], freq_table[cluster],
  292. cluster);
  293. return 0;
  294. }
  295. dev_err(cpu_dev, "%s: Failed to get clk for cpu: %d, cluster: %d\n",
  296. __func__, cpu_dev->id, cluster);
  297. ret = PTR_ERR(clk[cluster]);
  298. dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]);
  299. free_opp_table:
  300. if (arm_bL_ops->free_opp_table)
  301. arm_bL_ops->free_opp_table(cpu_dev);
  302. out:
  303. dev_err(cpu_dev, "%s: Failed to get data for cluster: %d\n", __func__,
  304. cluster);
  305. return ret;
  306. }
  307. static int get_cluster_clk_and_freq_table(struct device *cpu_dev)
  308. {
  309. u32 cluster = cpu_to_cluster(cpu_dev->id);
  310. int i, ret;
  311. if (atomic_inc_return(&cluster_usage[cluster]) != 1)
  312. return 0;
  313. if (cluster < MAX_CLUSTERS) {
  314. ret = _get_cluster_clk_and_freq_table(cpu_dev);
  315. if (ret)
  316. atomic_dec(&cluster_usage[cluster]);
  317. return ret;
  318. }
  319. /*
  320. * Get data for all clusters and fill virtual cluster with a merge of
  321. * both
  322. */
  323. for_each_present_cpu(i) {
  324. struct device *cdev = get_cpu_device(i);
  325. if (!cdev) {
  326. pr_err("%s: failed to get cpu%d device\n", __func__, i);
  327. return -ENODEV;
  328. }
  329. ret = _get_cluster_clk_and_freq_table(cdev);
  330. if (ret)
  331. goto put_clusters;
  332. }
  333. ret = merge_cluster_tables();
  334. if (ret)
  335. goto put_clusters;
  336. /* Assuming 2 cluster, set clk_big_min and clk_little_max */
  337. clk_big_min = get_table_min(freq_table[0]);
  338. clk_little_max = VIRT_FREQ(1, get_table_max(freq_table[1]));
  339. pr_debug("%s: cluster: %d, clk_big_min: %d, clk_little_max: %d\n",
  340. __func__, cluster, clk_big_min, clk_little_max);
  341. return 0;
  342. put_clusters:
  343. for_each_present_cpu(i) {
  344. struct device *cdev = get_cpu_device(i);
  345. if (!cdev) {
  346. pr_err("%s: failed to get cpu%d device\n", __func__, i);
  347. return -ENODEV;
  348. }
  349. _put_cluster_clk_and_freq_table(cdev);
  350. }
  351. atomic_dec(&cluster_usage[cluster]);
  352. return ret;
  353. }
  354. /* Per-CPU initialization */
  355. static int bL_cpufreq_init(struct cpufreq_policy *policy)
  356. {
  357. u32 cur_cluster = cpu_to_cluster(policy->cpu);
  358. struct device *cpu_dev;
  359. int ret;
  360. cpu_dev = get_cpu_device(policy->cpu);
  361. if (!cpu_dev) {
  362. pr_err("%s: failed to get cpu%d device\n", __func__,
  363. policy->cpu);
  364. return -ENODEV;
  365. }
  366. ret = get_cluster_clk_and_freq_table(cpu_dev);
  367. if (ret)
  368. return ret;
  369. ret = cpufreq_table_validate_and_show(policy, freq_table[cur_cluster]);
  370. if (ret) {
  371. dev_err(cpu_dev, "CPU %d, cluster: %d invalid freq table\n",
  372. policy->cpu, cur_cluster);
  373. put_cluster_clk_and_freq_table(cpu_dev);
  374. return ret;
  375. }
  376. if (cur_cluster < MAX_CLUSTERS) {
  377. int cpu;
  378. cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu));
  379. for_each_cpu(cpu, policy->cpus)
  380. per_cpu(physical_cluster, cpu) = cur_cluster;
  381. } else {
  382. /* Assumption: during init, we are always running on A15 */
  383. per_cpu(physical_cluster, policy->cpu) = A15_CLUSTER;
  384. }
  385. if (arm_bL_ops->get_transition_latency)
  386. policy->cpuinfo.transition_latency =
  387. arm_bL_ops->get_transition_latency(cpu_dev);
  388. else
  389. policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
  390. if (is_bL_switching_enabled())
  391. per_cpu(cpu_last_req_freq, policy->cpu) = clk_get_cpu_rate(policy->cpu);
  392. dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu);
  393. return 0;
  394. }
  395. static int bL_cpufreq_exit(struct cpufreq_policy *policy)
  396. {
  397. struct device *cpu_dev;
  398. cpu_dev = get_cpu_device(policy->cpu);
  399. if (!cpu_dev) {
  400. pr_err("%s: failed to get cpu%d device\n", __func__,
  401. policy->cpu);
  402. return -ENODEV;
  403. }
  404. put_cluster_clk_and_freq_table(cpu_dev);
  405. dev_dbg(cpu_dev, "%s: Exited, cpu: %d\n", __func__, policy->cpu);
  406. return 0;
  407. }
  408. static struct cpufreq_driver bL_cpufreq_driver = {
  409. .name = "arm-big-little",
  410. .flags = CPUFREQ_STICKY |
  411. CPUFREQ_HAVE_GOVERNOR_PER_POLICY |
  412. CPUFREQ_NEED_INITIAL_FREQ_CHECK,
  413. .verify = cpufreq_generic_frequency_table_verify,
  414. .target_index = bL_cpufreq_set_target,
  415. .get = bL_cpufreq_get_rate,
  416. .init = bL_cpufreq_init,
  417. .exit = bL_cpufreq_exit,
  418. .attr = cpufreq_generic_attr,
  419. };
  420. #ifdef CONFIG_BL_SWITCHER
  421. static int bL_cpufreq_switcher_notifier(struct notifier_block *nfb,
  422. unsigned long action, void *_arg)
  423. {
  424. pr_debug("%s: action: %ld\n", __func__, action);
  425. switch (action) {
  426. case BL_NOTIFY_PRE_ENABLE:
  427. case BL_NOTIFY_PRE_DISABLE:
  428. cpufreq_unregister_driver(&bL_cpufreq_driver);
  429. break;
  430. case BL_NOTIFY_POST_ENABLE:
  431. set_switching_enabled(true);
  432. cpufreq_register_driver(&bL_cpufreq_driver);
  433. break;
  434. case BL_NOTIFY_POST_DISABLE:
  435. set_switching_enabled(false);
  436. cpufreq_register_driver(&bL_cpufreq_driver);
  437. break;
  438. default:
  439. return NOTIFY_DONE;
  440. }
  441. return NOTIFY_OK;
  442. }
  443. static struct notifier_block bL_switcher_notifier = {
  444. .notifier_call = bL_cpufreq_switcher_notifier,
  445. };
  446. static int __bLs_register_notifier(void)
  447. {
  448. return bL_switcher_register_notifier(&bL_switcher_notifier);
  449. }
  450. static int __bLs_unregister_notifier(void)
  451. {
  452. return bL_switcher_unregister_notifier(&bL_switcher_notifier);
  453. }
  454. #else
  455. static int __bLs_register_notifier(void) { return 0; }
  456. static int __bLs_unregister_notifier(void) { return 0; }
  457. #endif
  458. int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops)
  459. {
  460. int ret, i;
  461. if (arm_bL_ops) {
  462. pr_debug("%s: Already registered: %s, exiting\n", __func__,
  463. arm_bL_ops->name);
  464. return -EBUSY;
  465. }
  466. if (!ops || !strlen(ops->name) || !ops->init_opp_table) {
  467. pr_err("%s: Invalid arm_bL_ops, exiting\n", __func__);
  468. return -ENODEV;
  469. }
  470. arm_bL_ops = ops;
  471. set_switching_enabled(bL_switcher_get_enabled());
  472. for (i = 0; i < MAX_CLUSTERS; i++)
  473. mutex_init(&cluster_lock[i]);
  474. ret = cpufreq_register_driver(&bL_cpufreq_driver);
  475. if (ret) {
  476. pr_info("%s: Failed registering platform driver: %s, err: %d\n",
  477. __func__, ops->name, ret);
  478. arm_bL_ops = NULL;
  479. } else {
  480. ret = __bLs_register_notifier();
  481. if (ret) {
  482. cpufreq_unregister_driver(&bL_cpufreq_driver);
  483. arm_bL_ops = NULL;
  484. } else {
  485. pr_info("%s: Registered platform driver: %s\n",
  486. __func__, ops->name);
  487. }
  488. }
  489. bL_switcher_put_enabled();
  490. return ret;
  491. }
  492. EXPORT_SYMBOL_GPL(bL_cpufreq_register);
  493. void bL_cpufreq_unregister(struct cpufreq_arm_bL_ops *ops)
  494. {
  495. if (arm_bL_ops != ops) {
  496. pr_err("%s: Registered with: %s, can't unregister, exiting\n",
  497. __func__, arm_bL_ops->name);
  498. return;
  499. }
  500. bL_switcher_get_enabled();
  501. __bLs_unregister_notifier();
  502. cpufreq_unregister_driver(&bL_cpufreq_driver);
  503. bL_switcher_put_enabled();
  504. pr_info("%s: Un-registered platform driver: %s\n", __func__,
  505. arm_bL_ops->name);
  506. arm_bL_ops = NULL;
  507. }
  508. EXPORT_SYMBOL_GPL(bL_cpufreq_unregister);
  509. MODULE_AUTHOR("Viresh Kumar <viresh.kumar@linaro.org>");
  510. MODULE_DESCRIPTION("Generic ARM big LITTLE cpufreq driver");
  511. MODULE_LICENSE("GPL v2");