pcc-cpufreq.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. /*
  2. * pcc-cpufreq.c - Processor Clocking Control firmware cpufreq interface
  3. *
  4. * Copyright (C) 2009 Red Hat, Matthew Garrett <mjg@redhat.com>
  5. * Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
  6. * Nagananda Chumbalkar <nagananda.chumbalkar@hp.com>
  7. *
  8. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  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 as published by
  12. * the Free Software Foundation; version 2 of the License.
  13. *
  14. * This program is distributed in the hope that it will be useful, but
  15. * WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or NON
  17. * INFRINGEMENT. See the GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write to the Free Software Foundation, Inc.,
  21. * 675 Mass Ave, Cambridge, MA 02139, USA.
  22. *
  23. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24. */
  25. #include <linux/kernel.h>
  26. #include <linux/module.h>
  27. #include <linux/init.h>
  28. #include <linux/smp.h>
  29. #include <linux/sched.h>
  30. #include <linux/cpufreq.h>
  31. #include <linux/compiler.h>
  32. #include <linux/slab.h>
  33. #include <linux/acpi.h>
  34. #include <linux/io.h>
  35. #include <linux/spinlock.h>
  36. #include <linux/uaccess.h>
  37. #include <acpi/processor.h>
  38. #define PCC_VERSION "1.00.00"
  39. #define POLL_LOOPS 300
  40. #define CMD_COMPLETE 0x1
  41. #define CMD_GET_FREQ 0x0
  42. #define CMD_SET_FREQ 0x1
  43. #define BUF_SZ 4
  44. #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
  45. "pcc-cpufreq", msg)
  46. struct pcc_register_resource {
  47. u8 descriptor;
  48. u16 length;
  49. u8 space_id;
  50. u8 bit_width;
  51. u8 bit_offset;
  52. u8 access_size;
  53. u64 address;
  54. } __attribute__ ((packed));
  55. struct pcc_memory_resource {
  56. u8 descriptor;
  57. u16 length;
  58. u8 space_id;
  59. u8 resource_usage;
  60. u8 type_specific;
  61. u64 granularity;
  62. u64 minimum;
  63. u64 maximum;
  64. u64 translation_offset;
  65. u64 address_length;
  66. } __attribute__ ((packed));
  67. static struct cpufreq_driver pcc_cpufreq_driver;
  68. struct pcc_header {
  69. u32 signature;
  70. u16 length;
  71. u8 major;
  72. u8 minor;
  73. u32 features;
  74. u16 command;
  75. u16 status;
  76. u32 latency;
  77. u32 minimum_time;
  78. u32 maximum_time;
  79. u32 nominal;
  80. u32 throttled_frequency;
  81. u32 minimum_frequency;
  82. };
  83. static void __iomem *pcch_virt_addr;
  84. static struct pcc_header __iomem *pcch_hdr;
  85. static DEFINE_SPINLOCK(pcc_lock);
  86. static struct acpi_generic_address doorbell;
  87. static u64 doorbell_preserve;
  88. static u64 doorbell_write;
  89. static u8 OSC_UUID[16] = {0x63, 0x9B, 0x2C, 0x9F, 0x70, 0x91, 0x49, 0x1f,
  90. 0xBB, 0x4F, 0xA5, 0x98, 0x2F, 0xA1, 0xB5, 0x46};
  91. struct pcc_cpu {
  92. u32 input_offset;
  93. u32 output_offset;
  94. };
  95. static struct pcc_cpu __percpu *pcc_cpu_info;
  96. static int pcc_cpufreq_verify(struct cpufreq_policy *policy)
  97. {
  98. cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
  99. policy->cpuinfo.max_freq);
  100. return 0;
  101. }
  102. static inline void pcc_cmd(void)
  103. {
  104. u64 doorbell_value;
  105. int i;
  106. acpi_read(&doorbell_value, &doorbell);
  107. acpi_write((doorbell_value & doorbell_preserve) | doorbell_write,
  108. &doorbell);
  109. for (i = 0; i < POLL_LOOPS; i++) {
  110. if (ioread16(&pcch_hdr->status) & CMD_COMPLETE)
  111. break;
  112. }
  113. }
  114. static inline void pcc_clear_mapping(void)
  115. {
  116. if (pcch_virt_addr)
  117. iounmap(pcch_virt_addr);
  118. pcch_virt_addr = NULL;
  119. }
  120. static unsigned int pcc_get_freq(unsigned int cpu)
  121. {
  122. struct pcc_cpu *pcc_cpu_data;
  123. unsigned int curr_freq;
  124. unsigned int freq_limit;
  125. u16 status;
  126. u32 input_buffer;
  127. u32 output_buffer;
  128. spin_lock(&pcc_lock);
  129. dprintk("get: get_freq for CPU %d\n", cpu);
  130. pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu);
  131. input_buffer = 0x1;
  132. iowrite32(input_buffer,
  133. (pcch_virt_addr + pcc_cpu_data->input_offset));
  134. iowrite16(CMD_GET_FREQ, &pcch_hdr->command);
  135. pcc_cmd();
  136. output_buffer =
  137. ioread32(pcch_virt_addr + pcc_cpu_data->output_offset);
  138. /* Clear the input buffer - we are done with the current command */
  139. memset_io((pcch_virt_addr + pcc_cpu_data->input_offset), 0, BUF_SZ);
  140. status = ioread16(&pcch_hdr->status);
  141. if (status != CMD_COMPLETE) {
  142. dprintk("get: FAILED: for CPU %d, status is %d\n",
  143. cpu, status);
  144. goto cmd_incomplete;
  145. }
  146. iowrite16(0, &pcch_hdr->status);
  147. curr_freq = (((ioread32(&pcch_hdr->nominal) * (output_buffer & 0xff))
  148. / 100) * 1000);
  149. dprintk("get: SUCCESS: (virtual) output_offset for cpu %d is "
  150. "0x%x, contains a value of: 0x%x. Speed is: %d MHz\n",
  151. cpu, (pcch_virt_addr + pcc_cpu_data->output_offset),
  152. output_buffer, curr_freq);
  153. freq_limit = (output_buffer >> 8) & 0xff;
  154. if (freq_limit != 0xff) {
  155. dprintk("get: frequency for cpu %d is being temporarily"
  156. " capped at %d\n", cpu, curr_freq);
  157. }
  158. spin_unlock(&pcc_lock);
  159. return curr_freq;
  160. cmd_incomplete:
  161. iowrite16(0, &pcch_hdr->status);
  162. spin_unlock(&pcc_lock);
  163. return -EINVAL;
  164. }
  165. static int pcc_cpufreq_target(struct cpufreq_policy *policy,
  166. unsigned int target_freq,
  167. unsigned int relation)
  168. {
  169. struct pcc_cpu *pcc_cpu_data;
  170. struct cpufreq_freqs freqs;
  171. u16 status;
  172. u32 input_buffer;
  173. int cpu;
  174. spin_lock(&pcc_lock);
  175. cpu = policy->cpu;
  176. pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu);
  177. dprintk("target: CPU %d should go to target freq: %d "
  178. "(virtual) input_offset is 0x%x\n",
  179. cpu, target_freq,
  180. (pcch_virt_addr + pcc_cpu_data->input_offset));
  181. freqs.new = target_freq;
  182. freqs.cpu = cpu;
  183. cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
  184. input_buffer = 0x1 | (((target_freq * 100)
  185. / (ioread32(&pcch_hdr->nominal) * 1000)) << 8);
  186. iowrite32(input_buffer,
  187. (pcch_virt_addr + pcc_cpu_data->input_offset));
  188. iowrite16(CMD_SET_FREQ, &pcch_hdr->command);
  189. pcc_cmd();
  190. /* Clear the input buffer - we are done with the current command */
  191. memset_io((pcch_virt_addr + pcc_cpu_data->input_offset), 0, BUF_SZ);
  192. status = ioread16(&pcch_hdr->status);
  193. if (status != CMD_COMPLETE) {
  194. dprintk("target: FAILED for cpu %d, with status: 0x%x\n",
  195. cpu, status);
  196. goto cmd_incomplete;
  197. }
  198. iowrite16(0, &pcch_hdr->status);
  199. cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
  200. dprintk("target: was SUCCESSFUL for cpu %d\n", cpu);
  201. spin_unlock(&pcc_lock);
  202. return 0;
  203. cmd_incomplete:
  204. iowrite16(0, &pcch_hdr->status);
  205. spin_unlock(&pcc_lock);
  206. return -EINVAL;
  207. }
  208. static int pcc_get_offset(int cpu)
  209. {
  210. acpi_status status;
  211. struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
  212. union acpi_object *pccp, *offset;
  213. struct pcc_cpu *pcc_cpu_data;
  214. struct acpi_processor *pr;
  215. int ret = 0;
  216. pr = per_cpu(processors, cpu);
  217. pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu);
  218. status = acpi_evaluate_object(pr->handle, "PCCP", NULL, &buffer);
  219. if (ACPI_FAILURE(status))
  220. return -ENODEV;
  221. pccp = buffer.pointer;
  222. if (!pccp || pccp->type != ACPI_TYPE_PACKAGE) {
  223. ret = -ENODEV;
  224. goto out_free;
  225. };
  226. offset = &(pccp->package.elements[0]);
  227. if (!offset || offset->type != ACPI_TYPE_INTEGER) {
  228. ret = -ENODEV;
  229. goto out_free;
  230. }
  231. pcc_cpu_data->input_offset = offset->integer.value;
  232. offset = &(pccp->package.elements[1]);
  233. if (!offset || offset->type != ACPI_TYPE_INTEGER) {
  234. ret = -ENODEV;
  235. goto out_free;
  236. }
  237. pcc_cpu_data->output_offset = offset->integer.value;
  238. memset_io((pcch_virt_addr + pcc_cpu_data->input_offset), 0, BUF_SZ);
  239. memset_io((pcch_virt_addr + pcc_cpu_data->output_offset), 0, BUF_SZ);
  240. dprintk("pcc_get_offset: for CPU %d: pcc_cpu_data "
  241. "input_offset: 0x%x, pcc_cpu_data output_offset: 0x%x\n",
  242. cpu, pcc_cpu_data->input_offset, pcc_cpu_data->output_offset);
  243. out_free:
  244. kfree(buffer.pointer);
  245. return ret;
  246. }
  247. static int __init pcc_cpufreq_do_osc(acpi_handle *handle)
  248. {
  249. acpi_status status;
  250. struct acpi_object_list input;
  251. struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
  252. union acpi_object in_params[4];
  253. union acpi_object *out_obj;
  254. u32 capabilities[2];
  255. u32 errors;
  256. u32 supported;
  257. int ret = 0;
  258. input.count = 4;
  259. input.pointer = in_params;
  260. input.count = 4;
  261. input.pointer = in_params;
  262. in_params[0].type = ACPI_TYPE_BUFFER;
  263. in_params[0].buffer.length = 16;
  264. in_params[0].buffer.pointer = OSC_UUID;
  265. in_params[1].type = ACPI_TYPE_INTEGER;
  266. in_params[1].integer.value = 1;
  267. in_params[2].type = ACPI_TYPE_INTEGER;
  268. in_params[2].integer.value = 2;
  269. in_params[3].type = ACPI_TYPE_BUFFER;
  270. in_params[3].buffer.length = 8;
  271. in_params[3].buffer.pointer = (u8 *)&capabilities;
  272. capabilities[0] = OSC_QUERY_ENABLE;
  273. capabilities[1] = 0x1;
  274. status = acpi_evaluate_object(*handle, "_OSC", &input, &output);
  275. if (ACPI_FAILURE(status))
  276. return -ENODEV;
  277. if (!output.length)
  278. return -ENODEV;
  279. out_obj = output.pointer;
  280. if (out_obj->type != ACPI_TYPE_BUFFER) {
  281. ret = -ENODEV;
  282. goto out_free;
  283. }
  284. errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
  285. if (errors) {
  286. ret = -ENODEV;
  287. goto out_free;
  288. }
  289. supported = *((u32 *)(out_obj->buffer.pointer + 4));
  290. if (!(supported & 0x1)) {
  291. ret = -ENODEV;
  292. goto out_free;
  293. }
  294. kfree(output.pointer);
  295. capabilities[0] = 0x0;
  296. capabilities[1] = 0x1;
  297. status = acpi_evaluate_object(*handle, "_OSC", &input, &output);
  298. if (ACPI_FAILURE(status))
  299. return -ENODEV;
  300. if (!output.length)
  301. return -ENODEV;
  302. out_obj = output.pointer;
  303. if (out_obj->type != ACPI_TYPE_BUFFER) {
  304. ret = -ENODEV;
  305. goto out_free;
  306. }
  307. errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
  308. if (errors) {
  309. ret = -ENODEV;
  310. goto out_free;
  311. }
  312. supported = *((u32 *)(out_obj->buffer.pointer + 4));
  313. if (!(supported & 0x1)) {
  314. ret = -ENODEV;
  315. goto out_free;
  316. }
  317. out_free:
  318. kfree(output.pointer);
  319. return ret;
  320. }
  321. static int __init pcc_cpufreq_probe(void)
  322. {
  323. acpi_status status;
  324. struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
  325. struct pcc_memory_resource *mem_resource;
  326. struct pcc_register_resource *reg_resource;
  327. union acpi_object *out_obj, *member;
  328. acpi_handle handle, osc_handle, pcch_handle;
  329. int ret = 0;
  330. status = acpi_get_handle(NULL, "\\_SB", &handle);
  331. if (ACPI_FAILURE(status))
  332. return -ENODEV;
  333. status = acpi_get_handle(handle, "PCCH", &pcch_handle);
  334. if (ACPI_FAILURE(status))
  335. return -ENODEV;
  336. status = acpi_get_handle(handle, "_OSC", &osc_handle);
  337. if (ACPI_SUCCESS(status)) {
  338. ret = pcc_cpufreq_do_osc(&osc_handle);
  339. if (ret)
  340. dprintk("probe: _OSC evaluation did not succeed\n");
  341. /* Firmware's use of _OSC is optional */
  342. ret = 0;
  343. }
  344. status = acpi_evaluate_object(handle, "PCCH", NULL, &output);
  345. if (ACPI_FAILURE(status))
  346. return -ENODEV;
  347. out_obj = output.pointer;
  348. if (out_obj->type != ACPI_TYPE_PACKAGE) {
  349. ret = -ENODEV;
  350. goto out_free;
  351. }
  352. member = &out_obj->package.elements[0];
  353. if (member->type != ACPI_TYPE_BUFFER) {
  354. ret = -ENODEV;
  355. goto out_free;
  356. }
  357. mem_resource = (struct pcc_memory_resource *)member->buffer.pointer;
  358. dprintk("probe: mem_resource descriptor: 0x%x,"
  359. " length: %d, space_id: %d, resource_usage: %d,"
  360. " type_specific: %d, granularity: 0x%llx,"
  361. " minimum: 0x%llx, maximum: 0x%llx,"
  362. " translation_offset: 0x%llx, address_length: 0x%llx\n",
  363. mem_resource->descriptor, mem_resource->length,
  364. mem_resource->space_id, mem_resource->resource_usage,
  365. mem_resource->type_specific, mem_resource->granularity,
  366. mem_resource->minimum, mem_resource->maximum,
  367. mem_resource->translation_offset,
  368. mem_resource->address_length);
  369. if (mem_resource->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) {
  370. ret = -ENODEV;
  371. goto out_free;
  372. }
  373. pcch_virt_addr = ioremap_nocache(mem_resource->minimum,
  374. mem_resource->address_length);
  375. if (pcch_virt_addr == NULL) {
  376. dprintk("probe: could not map shared mem region\n");
  377. goto out_free;
  378. }
  379. pcch_hdr = pcch_virt_addr;
  380. dprintk("probe: PCCH header (virtual) addr: 0x%p\n", pcch_hdr);
  381. dprintk("probe: PCCH header is at physical address: 0x%llx,"
  382. " signature: 0x%x, length: %d bytes, major: %d, minor: %d,"
  383. " supported features: 0x%x, command field: 0x%x,"
  384. " status field: 0x%x, nominal latency: %d us\n",
  385. mem_resource->minimum, ioread32(&pcch_hdr->signature),
  386. ioread16(&pcch_hdr->length), ioread8(&pcch_hdr->major),
  387. ioread8(&pcch_hdr->minor), ioread32(&pcch_hdr->features),
  388. ioread16(&pcch_hdr->command), ioread16(&pcch_hdr->status),
  389. ioread32(&pcch_hdr->latency));
  390. dprintk("probe: min time between commands: %d us,"
  391. " max time between commands: %d us,"
  392. " nominal CPU frequency: %d MHz,"
  393. " minimum CPU frequency: %d MHz,"
  394. " minimum CPU frequency without throttling: %d MHz\n",
  395. ioread32(&pcch_hdr->minimum_time),
  396. ioread32(&pcch_hdr->maximum_time),
  397. ioread32(&pcch_hdr->nominal),
  398. ioread32(&pcch_hdr->throttled_frequency),
  399. ioread32(&pcch_hdr->minimum_frequency));
  400. member = &out_obj->package.elements[1];
  401. if (member->type != ACPI_TYPE_BUFFER) {
  402. ret = -ENODEV;
  403. goto pcch_free;
  404. }
  405. reg_resource = (struct pcc_register_resource *)member->buffer.pointer;
  406. doorbell.space_id = reg_resource->space_id;
  407. doorbell.bit_width = reg_resource->bit_width;
  408. doorbell.bit_offset = reg_resource->bit_offset;
  409. doorbell.access_width = 64;
  410. doorbell.address = reg_resource->address;
  411. dprintk("probe: doorbell: space_id is %d, bit_width is %d, "
  412. "bit_offset is %d, access_width is %d, address is 0x%llx\n",
  413. doorbell.space_id, doorbell.bit_width, doorbell.bit_offset,
  414. doorbell.access_width, reg_resource->address);
  415. member = &out_obj->package.elements[2];
  416. if (member->type != ACPI_TYPE_INTEGER) {
  417. ret = -ENODEV;
  418. goto pcch_free;
  419. }
  420. doorbell_preserve = member->integer.value;
  421. member = &out_obj->package.elements[3];
  422. if (member->type != ACPI_TYPE_INTEGER) {
  423. ret = -ENODEV;
  424. goto pcch_free;
  425. }
  426. doorbell_write = member->integer.value;
  427. dprintk("probe: doorbell_preserve: 0x%llx,"
  428. " doorbell_write: 0x%llx\n",
  429. doorbell_preserve, doorbell_write);
  430. pcc_cpu_info = alloc_percpu(struct pcc_cpu);
  431. if (!pcc_cpu_info) {
  432. ret = -ENOMEM;
  433. goto pcch_free;
  434. }
  435. printk(KERN_DEBUG "pcc-cpufreq: (v%s) driver loaded with frequency"
  436. " limits: %d MHz, %d MHz\n", PCC_VERSION,
  437. ioread32(&pcch_hdr->minimum_frequency),
  438. ioread32(&pcch_hdr->nominal));
  439. kfree(output.pointer);
  440. return ret;
  441. pcch_free:
  442. pcc_clear_mapping();
  443. out_free:
  444. kfree(output.pointer);
  445. return ret;
  446. }
  447. static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
  448. {
  449. unsigned int cpu = policy->cpu;
  450. unsigned int result = 0;
  451. if (!pcch_virt_addr) {
  452. result = -1;
  453. goto out;
  454. }
  455. result = pcc_get_offset(cpu);
  456. if (result) {
  457. dprintk("init: PCCP evaluation failed\n");
  458. goto out;
  459. }
  460. policy->max = policy->cpuinfo.max_freq =
  461. ioread32(&pcch_hdr->nominal) * 1000;
  462. policy->min = policy->cpuinfo.min_freq =
  463. ioread32(&pcch_hdr->minimum_frequency) * 1000;
  464. policy->cur = pcc_get_freq(cpu);
  465. if (!policy->cur) {
  466. dprintk("init: Unable to get current CPU frequency\n");
  467. result = -EINVAL;
  468. goto out;
  469. }
  470. dprintk("init: policy->max is %d, policy->min is %d\n",
  471. policy->max, policy->min);
  472. out:
  473. return result;
  474. }
  475. static int pcc_cpufreq_cpu_exit(struct cpufreq_policy *policy)
  476. {
  477. return 0;
  478. }
  479. static struct cpufreq_driver pcc_cpufreq_driver = {
  480. .flags = CPUFREQ_CONST_LOOPS,
  481. .get = pcc_get_freq,
  482. .verify = pcc_cpufreq_verify,
  483. .target = pcc_cpufreq_target,
  484. .init = pcc_cpufreq_cpu_init,
  485. .exit = pcc_cpufreq_cpu_exit,
  486. .name = "pcc-cpufreq",
  487. .owner = THIS_MODULE,
  488. };
  489. static int __init pcc_cpufreq_init(void)
  490. {
  491. int ret;
  492. if (acpi_disabled)
  493. return 0;
  494. ret = pcc_cpufreq_probe();
  495. if (ret) {
  496. dprintk("pcc_cpufreq_init: PCCH evaluation failed\n");
  497. return ret;
  498. }
  499. ret = cpufreq_register_driver(&pcc_cpufreq_driver);
  500. return ret;
  501. }
  502. static void __exit pcc_cpufreq_exit(void)
  503. {
  504. cpufreq_unregister_driver(&pcc_cpufreq_driver);
  505. pcc_clear_mapping();
  506. free_percpu(pcc_cpu_info);
  507. }
  508. MODULE_AUTHOR("Matthew Garrett, Naga Chumbalkar");
  509. MODULE_VERSION(PCC_VERSION);
  510. MODULE_DESCRIPTION("Processor Clocking Control interface driver");
  511. MODULE_LICENSE("GPL");
  512. late_initcall(pcc_cpufreq_init);
  513. module_exit(pcc_cpufreq_exit);