imx6q-cpufreq.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. /*
  2. * Copyright (C) 2013 Freescale Semiconductor, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/clk.h>
  9. #include <linux/cpu.h>
  10. #include <linux/cpufreq.h>
  11. #include <linux/cpu_cooling.h>
  12. #include <linux/err.h>
  13. #include <linux/module.h>
  14. #include <linux/nvmem-consumer.h>
  15. #include <linux/of.h>
  16. #include <linux/of_address.h>
  17. #include <linux/pm_opp.h>
  18. #include <linux/platform_device.h>
  19. #include <linux/regulator/consumer.h>
  20. #define PU_SOC_VOLTAGE_NORMAL 1250000
  21. #define PU_SOC_VOLTAGE_HIGH 1275000
  22. #define FREQ_1P2_GHZ 1200000000
  23. static struct regulator *arm_reg;
  24. static struct regulator *pu_reg;
  25. static struct regulator *soc_reg;
  26. enum IMX6_CPUFREQ_CLKS {
  27. ARM,
  28. PLL1_SYS,
  29. STEP,
  30. PLL1_SW,
  31. PLL2_PFD2_396M,
  32. /* MX6UL requires two more clks */
  33. PLL2_BUS,
  34. SECONDARY_SEL,
  35. };
  36. #define IMX6Q_CPUFREQ_CLK_NUM 5
  37. #define IMX6UL_CPUFREQ_CLK_NUM 7
  38. static int num_clks;
  39. static struct clk_bulk_data clks[] = {
  40. { .id = "arm" },
  41. { .id = "pll1_sys" },
  42. { .id = "step" },
  43. { .id = "pll1_sw" },
  44. { .id = "pll2_pfd2_396m" },
  45. { .id = "pll2_bus" },
  46. { .id = "secondary_sel" },
  47. };
  48. static struct device *cpu_dev;
  49. static struct thermal_cooling_device *cdev;
  50. static bool free_opp;
  51. static struct cpufreq_frequency_table *freq_table;
  52. static unsigned int max_freq;
  53. static unsigned int transition_latency;
  54. static u32 *imx6_soc_volt;
  55. static u32 soc_opp_count;
  56. static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
  57. {
  58. struct dev_pm_opp *opp;
  59. unsigned long freq_hz, volt, volt_old;
  60. unsigned int old_freq, new_freq;
  61. bool pll1_sys_temp_enabled = false;
  62. int ret;
  63. new_freq = freq_table[index].frequency;
  64. freq_hz = new_freq * 1000;
  65. old_freq = clk_get_rate(clks[ARM].clk) / 1000;
  66. opp = dev_pm_opp_find_freq_ceil(cpu_dev, &freq_hz);
  67. if (IS_ERR(opp)) {
  68. dev_err(cpu_dev, "failed to find OPP for %ld\n", freq_hz);
  69. return PTR_ERR(opp);
  70. }
  71. volt = dev_pm_opp_get_voltage(opp);
  72. dev_pm_opp_put(opp);
  73. volt_old = regulator_get_voltage(arm_reg);
  74. dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld mV\n",
  75. old_freq / 1000, volt_old / 1000,
  76. new_freq / 1000, volt / 1000);
  77. /* scaling up? scale voltage before frequency */
  78. if (new_freq > old_freq) {
  79. if (!IS_ERR(pu_reg)) {
  80. ret = regulator_set_voltage_tol(pu_reg, imx6_soc_volt[index], 0);
  81. if (ret) {
  82. dev_err(cpu_dev, "failed to scale vddpu up: %d\n", ret);
  83. return ret;
  84. }
  85. }
  86. ret = regulator_set_voltage_tol(soc_reg, imx6_soc_volt[index], 0);
  87. if (ret) {
  88. dev_err(cpu_dev, "failed to scale vddsoc up: %d\n", ret);
  89. return ret;
  90. }
  91. ret = regulator_set_voltage_tol(arm_reg, volt, 0);
  92. if (ret) {
  93. dev_err(cpu_dev,
  94. "failed to scale vddarm up: %d\n", ret);
  95. return ret;
  96. }
  97. }
  98. /*
  99. * The setpoints are selected per PLL/PDF frequencies, so we need to
  100. * reprogram PLL for frequency scaling. The procedure of reprogramming
  101. * PLL1 is as below.
  102. * For i.MX6UL, it has a secondary clk mux, the cpu frequency change
  103. * flow is slightly different from other i.MX6 OSC.
  104. * The cpu frequeny change flow for i.MX6(except i.MX6UL) is as below:
  105. * - Enable pll2_pfd2_396m_clk and reparent pll1_sw_clk to it
  106. * - Reprogram pll1_sys_clk and reparent pll1_sw_clk back to it
  107. * - Disable pll2_pfd2_396m_clk
  108. */
  109. if (of_machine_is_compatible("fsl,imx6ul") ||
  110. of_machine_is_compatible("fsl,imx6ull")) {
  111. /*
  112. * When changing pll1_sw_clk's parent to pll1_sys_clk,
  113. * CPU may run at higher than 528MHz, this will lead to
  114. * the system unstable if the voltage is lower than the
  115. * voltage of 528MHz, so lower the CPU frequency to one
  116. * half before changing CPU frequency.
  117. */
  118. clk_set_rate(clks[ARM].clk, (old_freq >> 1) * 1000);
  119. clk_set_parent(clks[PLL1_SW].clk, clks[PLL1_SYS].clk);
  120. if (freq_hz > clk_get_rate(clks[PLL2_PFD2_396M].clk))
  121. clk_set_parent(clks[SECONDARY_SEL].clk,
  122. clks[PLL2_BUS].clk);
  123. else
  124. clk_set_parent(clks[SECONDARY_SEL].clk,
  125. clks[PLL2_PFD2_396M].clk);
  126. clk_set_parent(clks[STEP].clk, clks[SECONDARY_SEL].clk);
  127. clk_set_parent(clks[PLL1_SW].clk, clks[STEP].clk);
  128. if (freq_hz > clk_get_rate(clks[PLL2_BUS].clk)) {
  129. clk_set_rate(clks[PLL1_SYS].clk, new_freq * 1000);
  130. clk_set_parent(clks[PLL1_SW].clk, clks[PLL1_SYS].clk);
  131. }
  132. } else {
  133. clk_set_parent(clks[STEP].clk, clks[PLL2_PFD2_396M].clk);
  134. clk_set_parent(clks[PLL1_SW].clk, clks[STEP].clk);
  135. if (freq_hz > clk_get_rate(clks[PLL2_PFD2_396M].clk)) {
  136. clk_set_rate(clks[PLL1_SYS].clk, new_freq * 1000);
  137. clk_set_parent(clks[PLL1_SW].clk, clks[PLL1_SYS].clk);
  138. } else {
  139. /* pll1_sys needs to be enabled for divider rate change to work. */
  140. pll1_sys_temp_enabled = true;
  141. clk_prepare_enable(clks[PLL1_SYS].clk);
  142. }
  143. }
  144. /* Ensure the arm clock divider is what we expect */
  145. ret = clk_set_rate(clks[ARM].clk, new_freq * 1000);
  146. if (ret) {
  147. int ret1;
  148. dev_err(cpu_dev, "failed to set clock rate: %d\n", ret);
  149. ret1 = regulator_set_voltage_tol(arm_reg, volt_old, 0);
  150. if (ret1)
  151. dev_warn(cpu_dev,
  152. "failed to restore vddarm voltage: %d\n", ret1);
  153. return ret;
  154. }
  155. /* PLL1 is only needed until after ARM-PODF is set. */
  156. if (pll1_sys_temp_enabled)
  157. clk_disable_unprepare(clks[PLL1_SYS].clk);
  158. /* scaling down? scale voltage after frequency */
  159. if (new_freq < old_freq) {
  160. ret = regulator_set_voltage_tol(arm_reg, volt, 0);
  161. if (ret) {
  162. dev_warn(cpu_dev,
  163. "failed to scale vddarm down: %d\n", ret);
  164. ret = 0;
  165. }
  166. ret = regulator_set_voltage_tol(soc_reg, imx6_soc_volt[index], 0);
  167. if (ret) {
  168. dev_warn(cpu_dev, "failed to scale vddsoc down: %d\n", ret);
  169. ret = 0;
  170. }
  171. if (!IS_ERR(pu_reg)) {
  172. ret = regulator_set_voltage_tol(pu_reg, imx6_soc_volt[index], 0);
  173. if (ret) {
  174. dev_warn(cpu_dev, "failed to scale vddpu down: %d\n", ret);
  175. ret = 0;
  176. }
  177. }
  178. }
  179. return 0;
  180. }
  181. static void imx6q_cpufreq_ready(struct cpufreq_policy *policy)
  182. {
  183. cdev = of_cpufreq_cooling_register(policy);
  184. if (!cdev)
  185. dev_err(cpu_dev,
  186. "running cpufreq without cooling device: %ld\n",
  187. PTR_ERR(cdev));
  188. }
  189. static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
  190. {
  191. int ret;
  192. policy->clk = clks[ARM].clk;
  193. ret = cpufreq_generic_init(policy, freq_table, transition_latency);
  194. policy->suspend_freq = max_freq;
  195. return ret;
  196. }
  197. static int imx6q_cpufreq_exit(struct cpufreq_policy *policy)
  198. {
  199. cpufreq_cooling_unregister(cdev);
  200. return 0;
  201. }
  202. static struct cpufreq_driver imx6q_cpufreq_driver = {
  203. .flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK,
  204. .verify = cpufreq_generic_frequency_table_verify,
  205. .target_index = imx6q_set_target,
  206. .get = cpufreq_generic_get,
  207. .init = imx6q_cpufreq_init,
  208. .exit = imx6q_cpufreq_exit,
  209. .name = "imx6q-cpufreq",
  210. .ready = imx6q_cpufreq_ready,
  211. .attr = cpufreq_generic_attr,
  212. .suspend = cpufreq_generic_suspend,
  213. };
  214. #define OCOTP_CFG3 0x440
  215. #define OCOTP_CFG3_SPEED_SHIFT 16
  216. #define OCOTP_CFG3_SPEED_1P2GHZ 0x3
  217. #define OCOTP_CFG3_SPEED_996MHZ 0x2
  218. #define OCOTP_CFG3_SPEED_852MHZ 0x1
  219. static void imx6q_opp_check_speed_grading(struct device *dev)
  220. {
  221. struct device_node *np;
  222. void __iomem *base;
  223. u32 val;
  224. np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-ocotp");
  225. if (!np)
  226. return;
  227. base = of_iomap(np, 0);
  228. if (!base) {
  229. dev_err(dev, "failed to map ocotp\n");
  230. goto put_node;
  231. }
  232. /*
  233. * SPEED_GRADING[1:0] defines the max speed of ARM:
  234. * 2b'11: 1200000000Hz;
  235. * 2b'10: 996000000Hz;
  236. * 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz.
  237. * 2b'00: 792000000Hz;
  238. * We need to set the max speed of ARM according to fuse map.
  239. */
  240. val = readl_relaxed(base + OCOTP_CFG3);
  241. val >>= OCOTP_CFG3_SPEED_SHIFT;
  242. val &= 0x3;
  243. if (val < OCOTP_CFG3_SPEED_996MHZ)
  244. if (dev_pm_opp_disable(dev, 996000000))
  245. dev_warn(dev, "failed to disable 996MHz OPP\n");
  246. if (of_machine_is_compatible("fsl,imx6q") ||
  247. of_machine_is_compatible("fsl,imx6qp")) {
  248. if (val != OCOTP_CFG3_SPEED_852MHZ)
  249. if (dev_pm_opp_disable(dev, 852000000))
  250. dev_warn(dev, "failed to disable 852MHz OPP\n");
  251. if (val != OCOTP_CFG3_SPEED_1P2GHZ)
  252. if (dev_pm_opp_disable(dev, 1200000000))
  253. dev_warn(dev, "failed to disable 1.2GHz OPP\n");
  254. }
  255. iounmap(base);
  256. put_node:
  257. of_node_put(np);
  258. }
  259. #define OCOTP_CFG3_6UL_SPEED_696MHZ 0x2
  260. #define OCOTP_CFG3_6ULL_SPEED_792MHZ 0x2
  261. #define OCOTP_CFG3_6ULL_SPEED_900MHZ 0x3
  262. static int imx6ul_opp_check_speed_grading(struct device *dev)
  263. {
  264. u32 val;
  265. int ret = 0;
  266. if (of_find_property(dev->of_node, "nvmem-cells", NULL)) {
  267. ret = nvmem_cell_read_u32(dev, "speed_grade", &val);
  268. if (ret)
  269. return ret;
  270. } else {
  271. struct device_node *np;
  272. void __iomem *base;
  273. np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp");
  274. if (!np)
  275. np = of_find_compatible_node(NULL, NULL,
  276. "fsl,imx6ull-ocotp");
  277. if (!np)
  278. return -ENOENT;
  279. base = of_iomap(np, 0);
  280. of_node_put(np);
  281. if (!base) {
  282. dev_err(dev, "failed to map ocotp\n");
  283. return -EFAULT;
  284. }
  285. val = readl_relaxed(base + OCOTP_CFG3);
  286. iounmap(base);
  287. }
  288. /*
  289. * Speed GRADING[1:0] defines the max speed of ARM:
  290. * 2b'00: Reserved;
  291. * 2b'01: 528000000Hz;
  292. * 2b'10: 696000000Hz on i.MX6UL, 792000000Hz on i.MX6ULL;
  293. * 2b'11: 900000000Hz on i.MX6ULL only;
  294. * We need to set the max speed of ARM according to fuse map.
  295. */
  296. val >>= OCOTP_CFG3_SPEED_SHIFT;
  297. val &= 0x3;
  298. if (of_machine_is_compatible("fsl,imx6ul")) {
  299. if (val != OCOTP_CFG3_6UL_SPEED_696MHZ)
  300. if (dev_pm_opp_disable(dev, 696000000))
  301. dev_warn(dev, "failed to disable 696MHz OPP\n");
  302. }
  303. if (of_machine_is_compatible("fsl,imx6ull")) {
  304. if (val != OCOTP_CFG3_6ULL_SPEED_792MHZ)
  305. if (dev_pm_opp_disable(dev, 792000000))
  306. dev_warn(dev, "failed to disable 792MHz OPP\n");
  307. if (val != OCOTP_CFG3_6ULL_SPEED_900MHZ)
  308. if (dev_pm_opp_disable(dev, 900000000))
  309. dev_warn(dev, "failed to disable 900MHz OPP\n");
  310. }
  311. return ret;
  312. }
  313. static int imx6q_cpufreq_probe(struct platform_device *pdev)
  314. {
  315. struct device_node *np;
  316. struct dev_pm_opp *opp;
  317. unsigned long min_volt, max_volt;
  318. int num, ret;
  319. const struct property *prop;
  320. const __be32 *val;
  321. u32 nr, i, j;
  322. cpu_dev = get_cpu_device(0);
  323. if (!cpu_dev) {
  324. pr_err("failed to get cpu0 device\n");
  325. return -ENODEV;
  326. }
  327. np = of_node_get(cpu_dev->of_node);
  328. if (!np) {
  329. dev_err(cpu_dev, "failed to find cpu0 node\n");
  330. return -ENOENT;
  331. }
  332. if (of_machine_is_compatible("fsl,imx6ul") ||
  333. of_machine_is_compatible("fsl,imx6ull"))
  334. num_clks = IMX6UL_CPUFREQ_CLK_NUM;
  335. else
  336. num_clks = IMX6Q_CPUFREQ_CLK_NUM;
  337. ret = clk_bulk_get(cpu_dev, num_clks, clks);
  338. if (ret)
  339. goto put_node;
  340. arm_reg = regulator_get(cpu_dev, "arm");
  341. pu_reg = regulator_get_optional(cpu_dev, "pu");
  342. soc_reg = regulator_get(cpu_dev, "soc");
  343. if (PTR_ERR(arm_reg) == -EPROBE_DEFER ||
  344. PTR_ERR(soc_reg) == -EPROBE_DEFER ||
  345. PTR_ERR(pu_reg) == -EPROBE_DEFER) {
  346. ret = -EPROBE_DEFER;
  347. dev_dbg(cpu_dev, "regulators not ready, defer\n");
  348. goto put_reg;
  349. }
  350. if (IS_ERR(arm_reg) || IS_ERR(soc_reg)) {
  351. dev_err(cpu_dev, "failed to get regulators\n");
  352. ret = -ENOENT;
  353. goto put_reg;
  354. }
  355. ret = dev_pm_opp_of_add_table(cpu_dev);
  356. if (ret < 0) {
  357. dev_err(cpu_dev, "failed to init OPP table: %d\n", ret);
  358. goto put_reg;
  359. }
  360. if (of_machine_is_compatible("fsl,imx6ul") ||
  361. of_machine_is_compatible("fsl,imx6ull")) {
  362. ret = imx6ul_opp_check_speed_grading(cpu_dev);
  363. if (ret == -EPROBE_DEFER)
  364. return ret;
  365. if (ret) {
  366. dev_err(cpu_dev, "failed to read ocotp: %d\n",
  367. ret);
  368. return ret;
  369. }
  370. } else {
  371. imx6q_opp_check_speed_grading(cpu_dev);
  372. }
  373. /* Because we have added the OPPs here, we must free them */
  374. free_opp = true;
  375. num = dev_pm_opp_get_opp_count(cpu_dev);
  376. if (num < 0) {
  377. ret = num;
  378. dev_err(cpu_dev, "no OPP table is found: %d\n", ret);
  379. goto out_free_opp;
  380. }
  381. ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table);
  382. if (ret) {
  383. dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret);
  384. goto out_free_opp;
  385. }
  386. /* Make imx6_soc_volt array's size same as arm opp number */
  387. imx6_soc_volt = devm_kcalloc(cpu_dev, num, sizeof(*imx6_soc_volt),
  388. GFP_KERNEL);
  389. if (imx6_soc_volt == NULL) {
  390. ret = -ENOMEM;
  391. goto free_freq_table;
  392. }
  393. prop = of_find_property(np, "fsl,soc-operating-points", NULL);
  394. if (!prop || !prop->value)
  395. goto soc_opp_out;
  396. /*
  397. * Each OPP is a set of tuples consisting of frequency and
  398. * voltage like <freq-kHz vol-uV>.
  399. */
  400. nr = prop->length / sizeof(u32);
  401. if (nr % 2 || (nr / 2) < num)
  402. goto soc_opp_out;
  403. for (j = 0; j < num; j++) {
  404. val = prop->value;
  405. for (i = 0; i < nr / 2; i++) {
  406. unsigned long freq = be32_to_cpup(val++);
  407. unsigned long volt = be32_to_cpup(val++);
  408. if (freq_table[j].frequency == freq) {
  409. imx6_soc_volt[soc_opp_count++] = volt;
  410. break;
  411. }
  412. }
  413. }
  414. soc_opp_out:
  415. /* use fixed soc opp volt if no valid soc opp info found in dtb */
  416. if (soc_opp_count != num) {
  417. dev_warn(cpu_dev, "can NOT find valid fsl,soc-operating-points property in dtb, use default value!\n");
  418. for (j = 0; j < num; j++)
  419. imx6_soc_volt[j] = PU_SOC_VOLTAGE_NORMAL;
  420. if (freq_table[num - 1].frequency * 1000 == FREQ_1P2_GHZ)
  421. imx6_soc_volt[num - 1] = PU_SOC_VOLTAGE_HIGH;
  422. }
  423. if (of_property_read_u32(np, "clock-latency", &transition_latency))
  424. transition_latency = CPUFREQ_ETERNAL;
  425. /*
  426. * Calculate the ramp time for max voltage change in the
  427. * VDDSOC and VDDPU regulators.
  428. */
  429. ret = regulator_set_voltage_time(soc_reg, imx6_soc_volt[0], imx6_soc_volt[num - 1]);
  430. if (ret > 0)
  431. transition_latency += ret * 1000;
  432. if (!IS_ERR(pu_reg)) {
  433. ret = regulator_set_voltage_time(pu_reg, imx6_soc_volt[0], imx6_soc_volt[num - 1]);
  434. if (ret > 0)
  435. transition_latency += ret * 1000;
  436. }
  437. /*
  438. * OPP is maintained in order of increasing frequency, and
  439. * freq_table initialised from OPP is therefore sorted in the
  440. * same order.
  441. */
  442. max_freq = freq_table[--num].frequency;
  443. opp = dev_pm_opp_find_freq_exact(cpu_dev,
  444. freq_table[0].frequency * 1000, true);
  445. min_volt = dev_pm_opp_get_voltage(opp);
  446. dev_pm_opp_put(opp);
  447. opp = dev_pm_opp_find_freq_exact(cpu_dev, max_freq * 1000, true);
  448. max_volt = dev_pm_opp_get_voltage(opp);
  449. dev_pm_opp_put(opp);
  450. ret = regulator_set_voltage_time(arm_reg, min_volt, max_volt);
  451. if (ret > 0)
  452. transition_latency += ret * 1000;
  453. ret = cpufreq_register_driver(&imx6q_cpufreq_driver);
  454. if (ret) {
  455. dev_err(cpu_dev, "failed register driver: %d\n", ret);
  456. goto free_freq_table;
  457. }
  458. of_node_put(np);
  459. return 0;
  460. free_freq_table:
  461. dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
  462. out_free_opp:
  463. if (free_opp)
  464. dev_pm_opp_of_remove_table(cpu_dev);
  465. put_reg:
  466. if (!IS_ERR(arm_reg))
  467. regulator_put(arm_reg);
  468. if (!IS_ERR(pu_reg))
  469. regulator_put(pu_reg);
  470. if (!IS_ERR(soc_reg))
  471. regulator_put(soc_reg);
  472. clk_bulk_put(num_clks, clks);
  473. put_node:
  474. of_node_put(np);
  475. return ret;
  476. }
  477. static int imx6q_cpufreq_remove(struct platform_device *pdev)
  478. {
  479. cpufreq_unregister_driver(&imx6q_cpufreq_driver);
  480. dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
  481. if (free_opp)
  482. dev_pm_opp_of_remove_table(cpu_dev);
  483. regulator_put(arm_reg);
  484. if (!IS_ERR(pu_reg))
  485. regulator_put(pu_reg);
  486. regulator_put(soc_reg);
  487. clk_bulk_put(num_clks, clks);
  488. return 0;
  489. }
  490. static struct platform_driver imx6q_cpufreq_platdrv = {
  491. .driver = {
  492. .name = "imx6q-cpufreq",
  493. },
  494. .probe = imx6q_cpufreq_probe,
  495. .remove = imx6q_cpufreq_remove,
  496. };
  497. module_platform_driver(imx6q_cpufreq_platdrv);
  498. MODULE_ALIAS("platform:imx6q-cpufreq");
  499. MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
  500. MODULE_DESCRIPTION("Freescale i.MX6Q cpufreq driver");
  501. MODULE_LICENSE("GPL");