core.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  1. /*
  2. * SuperH Pin Function Controller support.
  3. *
  4. * Copyright (C) 2008 Magnus Damm
  5. * Copyright (C) 2009 - 2012 Paul Mundt
  6. *
  7. * This file is subject to the terms and conditions of the GNU General Public
  8. * License. See the file "COPYING" in the main directory of this archive
  9. * for more details.
  10. */
  11. #define DRV_NAME "sh-pfc"
  12. #include <linux/bitops.h>
  13. #include <linux/err.h>
  14. #include <linux/errno.h>
  15. #include <linux/io.h>
  16. #include <linux/ioport.h>
  17. #include <linux/kernel.h>
  18. #include <linux/module.h>
  19. #include <linux/of.h>
  20. #include <linux/of_device.h>
  21. #include <linux/pinctrl/machine.h>
  22. #include <linux/platform_device.h>
  23. #include <linux/slab.h>
  24. #include "core.h"
  25. static int sh_pfc_map_resources(struct sh_pfc *pfc,
  26. struct platform_device *pdev)
  27. {
  28. unsigned int num_windows = 0;
  29. unsigned int num_irqs = 0;
  30. struct sh_pfc_window *windows;
  31. unsigned int *irqs = NULL;
  32. struct resource *res;
  33. unsigned int i;
  34. /* Count the MEM and IRQ resources. */
  35. for (i = 0; i < pdev->num_resources; ++i) {
  36. switch (resource_type(&pdev->resource[i])) {
  37. case IORESOURCE_MEM:
  38. num_windows++;
  39. break;
  40. case IORESOURCE_IRQ:
  41. num_irqs++;
  42. break;
  43. }
  44. }
  45. if (num_windows == 0)
  46. return -EINVAL;
  47. /* Allocate memory windows and IRQs arrays. */
  48. windows = devm_kzalloc(pfc->dev, num_windows * sizeof(*windows),
  49. GFP_KERNEL);
  50. if (windows == NULL)
  51. return -ENOMEM;
  52. pfc->num_windows = num_windows;
  53. pfc->windows = windows;
  54. if (num_irqs) {
  55. irqs = devm_kzalloc(pfc->dev, num_irqs * sizeof(*irqs),
  56. GFP_KERNEL);
  57. if (irqs == NULL)
  58. return -ENOMEM;
  59. pfc->num_irqs = num_irqs;
  60. pfc->irqs = irqs;
  61. }
  62. /* Fill them. */
  63. for (i = 0, res = pdev->resource; i < pdev->num_resources; i++, res++) {
  64. switch (resource_type(res)) {
  65. case IORESOURCE_MEM:
  66. windows->phys = res->start;
  67. windows->size = resource_size(res);
  68. windows->virt = devm_ioremap_resource(pfc->dev, res);
  69. if (IS_ERR(windows->virt))
  70. return -ENOMEM;
  71. windows++;
  72. break;
  73. case IORESOURCE_IRQ:
  74. *irqs++ = res->start;
  75. break;
  76. }
  77. }
  78. return 0;
  79. }
  80. static void __iomem *sh_pfc_phys_to_virt(struct sh_pfc *pfc,
  81. unsigned long address)
  82. {
  83. struct sh_pfc_window *window;
  84. unsigned int i;
  85. /* scan through physical windows and convert address */
  86. for (i = 0; i < pfc->num_windows; i++) {
  87. window = pfc->windows + i;
  88. if (address < window->phys)
  89. continue;
  90. if (address >= (window->phys + window->size))
  91. continue;
  92. return window->virt + (address - window->phys);
  93. }
  94. BUG();
  95. return NULL;
  96. }
  97. int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin)
  98. {
  99. unsigned int offset;
  100. unsigned int i;
  101. for (i = 0, offset = 0; i < pfc->nr_ranges; ++i) {
  102. const struct sh_pfc_pin_range *range = &pfc->ranges[i];
  103. if (pin <= range->end)
  104. return pin >= range->start
  105. ? offset + pin - range->start : -1;
  106. offset += range->end - range->start + 1;
  107. }
  108. return -EINVAL;
  109. }
  110. static int sh_pfc_enum_in_range(u16 enum_id, const struct pinmux_range *r)
  111. {
  112. if (enum_id < r->begin)
  113. return 0;
  114. if (enum_id > r->end)
  115. return 0;
  116. return 1;
  117. }
  118. unsigned long sh_pfc_read_raw_reg(void __iomem *mapped_reg,
  119. unsigned long reg_width)
  120. {
  121. switch (reg_width) {
  122. case 8:
  123. return ioread8(mapped_reg);
  124. case 16:
  125. return ioread16(mapped_reg);
  126. case 32:
  127. return ioread32(mapped_reg);
  128. }
  129. BUG();
  130. return 0;
  131. }
  132. void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned long reg_width,
  133. unsigned long data)
  134. {
  135. switch (reg_width) {
  136. case 8:
  137. iowrite8(data, mapped_reg);
  138. return;
  139. case 16:
  140. iowrite16(data, mapped_reg);
  141. return;
  142. case 32:
  143. iowrite32(data, mapped_reg);
  144. return;
  145. }
  146. BUG();
  147. }
  148. static void sh_pfc_config_reg_helper(struct sh_pfc *pfc,
  149. const struct pinmux_cfg_reg *crp,
  150. unsigned long in_pos,
  151. void __iomem **mapped_regp,
  152. unsigned long *maskp,
  153. unsigned long *posp)
  154. {
  155. unsigned int k;
  156. *mapped_regp = sh_pfc_phys_to_virt(pfc, crp->reg);
  157. if (crp->field_width) {
  158. *maskp = (1 << crp->field_width) - 1;
  159. *posp = crp->reg_width - ((in_pos + 1) * crp->field_width);
  160. } else {
  161. *maskp = (1 << crp->var_field_width[in_pos]) - 1;
  162. *posp = crp->reg_width;
  163. for (k = 0; k <= in_pos; k++)
  164. *posp -= crp->var_field_width[k];
  165. }
  166. }
  167. static void sh_pfc_write_config_reg(struct sh_pfc *pfc,
  168. const struct pinmux_cfg_reg *crp,
  169. unsigned long field, unsigned long value)
  170. {
  171. void __iomem *mapped_reg;
  172. unsigned long mask, pos, data;
  173. sh_pfc_config_reg_helper(pfc, crp, field, &mapped_reg, &mask, &pos);
  174. dev_dbg(pfc->dev, "write_reg addr = %lx, value = %ld, field = %ld, "
  175. "r_width = %ld, f_width = %ld\n",
  176. crp->reg, value, field, crp->reg_width, crp->field_width);
  177. mask = ~(mask << pos);
  178. value = value << pos;
  179. data = sh_pfc_read_raw_reg(mapped_reg, crp->reg_width);
  180. data &= mask;
  181. data |= value;
  182. if (pfc->info->unlock_reg)
  183. sh_pfc_write_raw_reg(
  184. sh_pfc_phys_to_virt(pfc, pfc->info->unlock_reg), 32,
  185. ~data);
  186. sh_pfc_write_raw_reg(mapped_reg, crp->reg_width, data);
  187. }
  188. static int sh_pfc_get_config_reg(struct sh_pfc *pfc, u16 enum_id,
  189. const struct pinmux_cfg_reg **crp, int *fieldp,
  190. int *valuep)
  191. {
  192. const struct pinmux_cfg_reg *config_reg;
  193. unsigned long r_width, f_width, curr_width, ncomb;
  194. unsigned int k, m, n, pos, bit_pos;
  195. k = 0;
  196. while (1) {
  197. config_reg = pfc->info->cfg_regs + k;
  198. r_width = config_reg->reg_width;
  199. f_width = config_reg->field_width;
  200. if (!r_width)
  201. break;
  202. pos = 0;
  203. m = 0;
  204. for (bit_pos = 0; bit_pos < r_width; bit_pos += curr_width) {
  205. if (f_width)
  206. curr_width = f_width;
  207. else
  208. curr_width = config_reg->var_field_width[m];
  209. ncomb = 1 << curr_width;
  210. for (n = 0; n < ncomb; n++) {
  211. if (config_reg->enum_ids[pos + n] == enum_id) {
  212. *crp = config_reg;
  213. *fieldp = m;
  214. *valuep = n;
  215. return 0;
  216. }
  217. }
  218. pos += ncomb;
  219. m++;
  220. }
  221. k++;
  222. }
  223. return -EINVAL;
  224. }
  225. static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, u16 mark, int pos,
  226. u16 *enum_idp)
  227. {
  228. const u16 *data = pfc->info->gpio_data;
  229. unsigned int k;
  230. if (pos) {
  231. *enum_idp = data[pos + 1];
  232. return pos + 1;
  233. }
  234. for (k = 0; k < pfc->info->gpio_data_size; k++) {
  235. if (data[k] == mark) {
  236. *enum_idp = data[k + 1];
  237. return k + 1;
  238. }
  239. }
  240. dev_err(pfc->dev, "cannot locate data/mark enum_id for mark %d\n",
  241. mark);
  242. return -EINVAL;
  243. }
  244. int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type)
  245. {
  246. const struct pinmux_cfg_reg *cr = NULL;
  247. u16 enum_id;
  248. const struct pinmux_range *range;
  249. int in_range, pos, field, value;
  250. int ret;
  251. switch (pinmux_type) {
  252. case PINMUX_TYPE_GPIO:
  253. case PINMUX_TYPE_FUNCTION:
  254. range = NULL;
  255. break;
  256. case PINMUX_TYPE_OUTPUT:
  257. range = &pfc->info->output;
  258. break;
  259. case PINMUX_TYPE_INPUT:
  260. range = &pfc->info->input;
  261. break;
  262. default:
  263. return -EINVAL;
  264. }
  265. pos = 0;
  266. enum_id = 0;
  267. field = 0;
  268. value = 0;
  269. /* Iterate over all the configuration fields we need to update. */
  270. while (1) {
  271. pos = sh_pfc_mark_to_enum(pfc, mark, pos, &enum_id);
  272. if (pos < 0)
  273. return pos;
  274. if (!enum_id)
  275. break;
  276. /* Check if the configuration field selects a function. If it
  277. * doesn't, skip the field if it's not applicable to the
  278. * requested pinmux type.
  279. */
  280. in_range = sh_pfc_enum_in_range(enum_id, &pfc->info->function);
  281. if (!in_range) {
  282. if (pinmux_type == PINMUX_TYPE_FUNCTION) {
  283. /* Functions are allowed to modify all
  284. * fields.
  285. */
  286. in_range = 1;
  287. } else if (pinmux_type != PINMUX_TYPE_GPIO) {
  288. /* Input/output types can only modify fields
  289. * that correspond to their respective ranges.
  290. */
  291. in_range = sh_pfc_enum_in_range(enum_id, range);
  292. /*
  293. * special case pass through for fixed
  294. * input-only or output-only pins without
  295. * function enum register association.
  296. */
  297. if (in_range && enum_id == range->force)
  298. continue;
  299. }
  300. /* GPIOs are only allowed to modify function fields. */
  301. }
  302. if (!in_range)
  303. continue;
  304. ret = sh_pfc_get_config_reg(pfc, enum_id, &cr, &field, &value);
  305. if (ret < 0)
  306. return ret;
  307. sh_pfc_write_config_reg(pfc, cr, field, value);
  308. }
  309. return 0;
  310. }
  311. static int sh_pfc_init_ranges(struct sh_pfc *pfc)
  312. {
  313. struct sh_pfc_pin_range *range;
  314. unsigned int nr_ranges;
  315. unsigned int i;
  316. if (pfc->info->pins[0].pin == (u16)-1) {
  317. /* Pin number -1 denotes that the SoC doesn't report pin numbers
  318. * in its pin arrays yet. Consider the pin numbers range as
  319. * continuous and allocate a single range.
  320. */
  321. pfc->nr_ranges = 1;
  322. pfc->ranges = devm_kzalloc(pfc->dev, sizeof(*pfc->ranges),
  323. GFP_KERNEL);
  324. if (pfc->ranges == NULL)
  325. return -ENOMEM;
  326. pfc->ranges->start = 0;
  327. pfc->ranges->end = pfc->info->nr_pins - 1;
  328. pfc->nr_gpio_pins = pfc->info->nr_pins;
  329. return 0;
  330. }
  331. /* Count, allocate and fill the ranges. The PFC SoC data pins array must
  332. * be sorted by pin numbers, and pins without a GPIO port must come
  333. * last.
  334. */
  335. for (i = 1, nr_ranges = 1; i < pfc->info->nr_pins; ++i) {
  336. if (pfc->info->pins[i-1].pin != pfc->info->pins[i].pin - 1)
  337. nr_ranges++;
  338. }
  339. pfc->nr_ranges = nr_ranges;
  340. pfc->ranges = devm_kzalloc(pfc->dev, sizeof(*pfc->ranges) * nr_ranges,
  341. GFP_KERNEL);
  342. if (pfc->ranges == NULL)
  343. return -ENOMEM;
  344. range = pfc->ranges;
  345. range->start = pfc->info->pins[0].pin;
  346. for (i = 1; i < pfc->info->nr_pins; ++i) {
  347. if (pfc->info->pins[i-1].pin == pfc->info->pins[i].pin - 1)
  348. continue;
  349. range->end = pfc->info->pins[i-1].pin;
  350. if (!(pfc->info->pins[i-1].configs & SH_PFC_PIN_CFG_NO_GPIO))
  351. pfc->nr_gpio_pins = range->end + 1;
  352. range++;
  353. range->start = pfc->info->pins[i].pin;
  354. }
  355. range->end = pfc->info->pins[i-1].pin;
  356. if (!(pfc->info->pins[i-1].configs & SH_PFC_PIN_CFG_NO_GPIO))
  357. pfc->nr_gpio_pins = range->end + 1;
  358. return 0;
  359. }
  360. #ifdef CONFIG_OF
  361. static const struct of_device_id sh_pfc_of_table[] = {
  362. #ifdef CONFIG_PINCTRL_PFC_R8A73A4
  363. {
  364. .compatible = "renesas,pfc-r8a73a4",
  365. .data = &r8a73a4_pinmux_info,
  366. },
  367. #endif
  368. #ifdef CONFIG_PINCTRL_PFC_R8A7740
  369. {
  370. .compatible = "renesas,pfc-r8a7740",
  371. .data = &r8a7740_pinmux_info,
  372. },
  373. #endif
  374. #ifdef CONFIG_PINCTRL_PFC_R8A7778
  375. {
  376. .compatible = "renesas,pfc-r8a7778",
  377. .data = &r8a7778_pinmux_info,
  378. },
  379. #endif
  380. #ifdef CONFIG_PINCTRL_PFC_R8A7779
  381. {
  382. .compatible = "renesas,pfc-r8a7779",
  383. .data = &r8a7779_pinmux_info,
  384. },
  385. #endif
  386. #ifdef CONFIG_PINCTRL_PFC_R8A7790
  387. {
  388. .compatible = "renesas,pfc-r8a7790",
  389. .data = &r8a7790_pinmux_info,
  390. },
  391. #endif
  392. #ifdef CONFIG_PINCTRL_PFC_R8A7791
  393. {
  394. .compatible = "renesas,pfc-r8a7791",
  395. .data = &r8a7791_pinmux_info,
  396. },
  397. #endif
  398. #ifdef CONFIG_PINCTRL_PFC_SH7372
  399. {
  400. .compatible = "renesas,pfc-sh7372",
  401. .data = &sh7372_pinmux_info,
  402. },
  403. #endif
  404. #ifdef CONFIG_PINCTRL_PFC_SH73A0
  405. {
  406. .compatible = "renesas,pfc-sh73a0",
  407. .data = &sh73a0_pinmux_info,
  408. },
  409. #endif
  410. { },
  411. };
  412. MODULE_DEVICE_TABLE(of, sh_pfc_of_table);
  413. #endif
  414. static int sh_pfc_probe(struct platform_device *pdev)
  415. {
  416. const struct platform_device_id *platid = platform_get_device_id(pdev);
  417. #ifdef CONFIG_OF
  418. struct device_node *np = pdev->dev.of_node;
  419. #endif
  420. const struct sh_pfc_soc_info *info;
  421. struct sh_pfc *pfc;
  422. int ret;
  423. #ifdef CONFIG_OF
  424. if (np)
  425. info = of_match_device(sh_pfc_of_table, &pdev->dev)->data;
  426. else
  427. #endif
  428. info = platid ? (const void *)platid->driver_data : NULL;
  429. if (info == NULL)
  430. return -ENODEV;
  431. pfc = devm_kzalloc(&pdev->dev, sizeof(*pfc), GFP_KERNEL);
  432. if (pfc == NULL)
  433. return -ENOMEM;
  434. pfc->info = info;
  435. pfc->dev = &pdev->dev;
  436. ret = sh_pfc_map_resources(pfc, pdev);
  437. if (unlikely(ret < 0))
  438. return ret;
  439. spin_lock_init(&pfc->lock);
  440. if (info->ops && info->ops->init) {
  441. ret = info->ops->init(pfc);
  442. if (ret < 0)
  443. return ret;
  444. }
  445. pinctrl_provide_dummies();
  446. ret = sh_pfc_init_ranges(pfc);
  447. if (ret < 0)
  448. return ret;
  449. /*
  450. * Initialize pinctrl bindings first
  451. */
  452. ret = sh_pfc_register_pinctrl(pfc);
  453. if (unlikely(ret != 0))
  454. return ret;
  455. #ifdef CONFIG_GPIO_SH_PFC
  456. /*
  457. * Then the GPIO chip
  458. */
  459. ret = sh_pfc_register_gpiochip(pfc);
  460. if (unlikely(ret != 0)) {
  461. /*
  462. * If the GPIO chip fails to come up we still leave the
  463. * PFC state as it is, given that there are already
  464. * extant users of it that have succeeded by this point.
  465. */
  466. dev_notice(pfc->dev, "failed to init GPIO chip, ignoring...\n");
  467. }
  468. #endif
  469. platform_set_drvdata(pdev, pfc);
  470. dev_info(pfc->dev, "%s support registered\n", info->name);
  471. return 0;
  472. }
  473. static int sh_pfc_remove(struct platform_device *pdev)
  474. {
  475. struct sh_pfc *pfc = platform_get_drvdata(pdev);
  476. #ifdef CONFIG_GPIO_SH_PFC
  477. sh_pfc_unregister_gpiochip(pfc);
  478. #endif
  479. sh_pfc_unregister_pinctrl(pfc);
  480. return 0;
  481. }
  482. static const struct platform_device_id sh_pfc_id_table[] = {
  483. #ifdef CONFIG_PINCTRL_PFC_R8A73A4
  484. { "pfc-r8a73a4", (kernel_ulong_t)&r8a73a4_pinmux_info },
  485. #endif
  486. #ifdef CONFIG_PINCTRL_PFC_R8A7740
  487. { "pfc-r8a7740", (kernel_ulong_t)&r8a7740_pinmux_info },
  488. #endif
  489. #ifdef CONFIG_PINCTRL_PFC_R8A7778
  490. { "pfc-r8a7778", (kernel_ulong_t)&r8a7778_pinmux_info },
  491. #endif
  492. #ifdef CONFIG_PINCTRL_PFC_R8A7779
  493. { "pfc-r8a7779", (kernel_ulong_t)&r8a7779_pinmux_info },
  494. #endif
  495. #ifdef CONFIG_PINCTRL_PFC_R8A7790
  496. { "pfc-r8a7790", (kernel_ulong_t)&r8a7790_pinmux_info },
  497. #endif
  498. #ifdef CONFIG_PINCTRL_PFC_R8A7791
  499. { "pfc-r8a7791", (kernel_ulong_t)&r8a7791_pinmux_info },
  500. #endif
  501. #ifdef CONFIG_PINCTRL_PFC_SH7203
  502. { "pfc-sh7203", (kernel_ulong_t)&sh7203_pinmux_info },
  503. #endif
  504. #ifdef CONFIG_PINCTRL_PFC_SH7264
  505. { "pfc-sh7264", (kernel_ulong_t)&sh7264_pinmux_info },
  506. #endif
  507. #ifdef CONFIG_PINCTRL_PFC_SH7269
  508. { "pfc-sh7269", (kernel_ulong_t)&sh7269_pinmux_info },
  509. #endif
  510. #ifdef CONFIG_PINCTRL_PFC_SH7372
  511. { "pfc-sh7372", (kernel_ulong_t)&sh7372_pinmux_info },
  512. #endif
  513. #ifdef CONFIG_PINCTRL_PFC_SH73A0
  514. { "pfc-sh73a0", (kernel_ulong_t)&sh73a0_pinmux_info },
  515. #endif
  516. #ifdef CONFIG_PINCTRL_PFC_SH7720
  517. { "pfc-sh7720", (kernel_ulong_t)&sh7720_pinmux_info },
  518. #endif
  519. #ifdef CONFIG_PINCTRL_PFC_SH7722
  520. { "pfc-sh7722", (kernel_ulong_t)&sh7722_pinmux_info },
  521. #endif
  522. #ifdef CONFIG_PINCTRL_PFC_SH7723
  523. { "pfc-sh7723", (kernel_ulong_t)&sh7723_pinmux_info },
  524. #endif
  525. #ifdef CONFIG_PINCTRL_PFC_SH7724
  526. { "pfc-sh7724", (kernel_ulong_t)&sh7724_pinmux_info },
  527. #endif
  528. #ifdef CONFIG_PINCTRL_PFC_SH7734
  529. { "pfc-sh7734", (kernel_ulong_t)&sh7734_pinmux_info },
  530. #endif
  531. #ifdef CONFIG_PINCTRL_PFC_SH7757
  532. { "pfc-sh7757", (kernel_ulong_t)&sh7757_pinmux_info },
  533. #endif
  534. #ifdef CONFIG_PINCTRL_PFC_SH7785
  535. { "pfc-sh7785", (kernel_ulong_t)&sh7785_pinmux_info },
  536. #endif
  537. #ifdef CONFIG_PINCTRL_PFC_SH7786
  538. { "pfc-sh7786", (kernel_ulong_t)&sh7786_pinmux_info },
  539. #endif
  540. #ifdef CONFIG_PINCTRL_PFC_SHX3
  541. { "pfc-shx3", (kernel_ulong_t)&shx3_pinmux_info },
  542. #endif
  543. { "sh-pfc", 0 },
  544. { },
  545. };
  546. MODULE_DEVICE_TABLE(platform, sh_pfc_id_table);
  547. static struct platform_driver sh_pfc_driver = {
  548. .probe = sh_pfc_probe,
  549. .remove = sh_pfc_remove,
  550. .id_table = sh_pfc_id_table,
  551. .driver = {
  552. .name = DRV_NAME,
  553. .of_match_table = of_match_ptr(sh_pfc_of_table),
  554. },
  555. };
  556. static int __init sh_pfc_init(void)
  557. {
  558. return platform_driver_register(&sh_pfc_driver);
  559. }
  560. postcore_initcall(sh_pfc_init);
  561. static void __exit sh_pfc_exit(void)
  562. {
  563. platform_driver_unregister(&sh_pfc_driver);
  564. }
  565. module_exit(sh_pfc_exit);
  566. MODULE_AUTHOR("Magnus Damm, Paul Mundt, Laurent Pinchart");
  567. MODULE_DESCRIPTION("Pin Control and GPIO driver for SuperH pin function controller");
  568. MODULE_LICENSE("GPL v2");