pci_endpoint_test.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. /**
  2. * Host side test driver to test endpoint functionality
  3. *
  4. * Copyright (C) 2017 Texas Instruments
  5. * Author: Kishon Vijay Abraham I <kishon@ti.com>
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 of
  9. * the License as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include <linux/crc32.h>
  20. #include <linux/delay.h>
  21. #include <linux/fs.h>
  22. #include <linux/io.h>
  23. #include <linux/interrupt.h>
  24. #include <linux/irq.h>
  25. #include <linux/miscdevice.h>
  26. #include <linux/module.h>
  27. #include <linux/mutex.h>
  28. #include <linux/random.h>
  29. #include <linux/slab.h>
  30. #include <linux/pci.h>
  31. #include <linux/pci_ids.h>
  32. #include <linux/pci_regs.h>
  33. #include <uapi/linux/pcitest.h>
  34. #define DRV_MODULE_NAME "pci-endpoint-test"
  35. #define PCI_ENDPOINT_TEST_MAGIC 0x0
  36. #define PCI_ENDPOINT_TEST_COMMAND 0x4
  37. #define COMMAND_RAISE_LEGACY_IRQ BIT(0)
  38. #define COMMAND_RAISE_MSI_IRQ BIT(1)
  39. #define MSI_NUMBER_SHIFT 2
  40. /* 6 bits for MSI number */
  41. #define COMMAND_READ BIT(8)
  42. #define COMMAND_WRITE BIT(9)
  43. #define COMMAND_COPY BIT(10)
  44. #define PCI_ENDPOINT_TEST_STATUS 0x8
  45. #define STATUS_READ_SUCCESS BIT(0)
  46. #define STATUS_READ_FAIL BIT(1)
  47. #define STATUS_WRITE_SUCCESS BIT(2)
  48. #define STATUS_WRITE_FAIL BIT(3)
  49. #define STATUS_COPY_SUCCESS BIT(4)
  50. #define STATUS_COPY_FAIL BIT(5)
  51. #define STATUS_IRQ_RAISED BIT(6)
  52. #define STATUS_SRC_ADDR_INVALID BIT(7)
  53. #define STATUS_DST_ADDR_INVALID BIT(8)
  54. #define PCI_ENDPOINT_TEST_LOWER_SRC_ADDR 0xc
  55. #define PCI_ENDPOINT_TEST_UPPER_SRC_ADDR 0x10
  56. #define PCI_ENDPOINT_TEST_LOWER_DST_ADDR 0x14
  57. #define PCI_ENDPOINT_TEST_UPPER_DST_ADDR 0x18
  58. #define PCI_ENDPOINT_TEST_SIZE 0x1c
  59. #define PCI_ENDPOINT_TEST_CHECKSUM 0x20
  60. static DEFINE_IDA(pci_endpoint_test_ida);
  61. #define to_endpoint_test(priv) container_of((priv), struct pci_endpoint_test, \
  62. miscdev)
  63. static bool no_msi;
  64. module_param(no_msi, bool, 0444);
  65. MODULE_PARM_DESC(no_msi, "Disable MSI interrupt in pci_endpoint_test");
  66. enum pci_barno {
  67. BAR_0,
  68. BAR_1,
  69. BAR_2,
  70. BAR_3,
  71. BAR_4,
  72. BAR_5,
  73. };
  74. struct pci_endpoint_test {
  75. struct pci_dev *pdev;
  76. void __iomem *base;
  77. void __iomem *bar[6];
  78. struct completion irq_raised;
  79. int last_irq;
  80. /* mutex to protect the ioctls */
  81. struct mutex mutex;
  82. struct miscdevice miscdev;
  83. enum pci_barno test_reg_bar;
  84. size_t alignment;
  85. };
  86. struct pci_endpoint_test_data {
  87. enum pci_barno test_reg_bar;
  88. size_t alignment;
  89. bool no_msi;
  90. };
  91. static inline u32 pci_endpoint_test_readl(struct pci_endpoint_test *test,
  92. u32 offset)
  93. {
  94. return readl(test->base + offset);
  95. }
  96. static inline void pci_endpoint_test_writel(struct pci_endpoint_test *test,
  97. u32 offset, u32 value)
  98. {
  99. writel(value, test->base + offset);
  100. }
  101. static inline u32 pci_endpoint_test_bar_readl(struct pci_endpoint_test *test,
  102. int bar, int offset)
  103. {
  104. return readl(test->bar[bar] + offset);
  105. }
  106. static inline void pci_endpoint_test_bar_writel(struct pci_endpoint_test *test,
  107. int bar, u32 offset, u32 value)
  108. {
  109. writel(value, test->bar[bar] + offset);
  110. }
  111. static irqreturn_t pci_endpoint_test_irqhandler(int irq, void *dev_id)
  112. {
  113. struct pci_endpoint_test *test = dev_id;
  114. u32 reg;
  115. reg = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_STATUS);
  116. if (reg & STATUS_IRQ_RAISED) {
  117. test->last_irq = irq;
  118. complete(&test->irq_raised);
  119. reg &= ~STATUS_IRQ_RAISED;
  120. }
  121. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_STATUS,
  122. reg);
  123. return IRQ_HANDLED;
  124. }
  125. static bool pci_endpoint_test_bar(struct pci_endpoint_test *test,
  126. enum pci_barno barno)
  127. {
  128. int j;
  129. u32 val;
  130. int size;
  131. struct pci_dev *pdev = test->pdev;
  132. if (!test->bar[barno])
  133. return false;
  134. size = pci_resource_len(pdev, barno);
  135. if (barno == test->test_reg_bar)
  136. size = 0x4;
  137. for (j = 0; j < size; j += 4)
  138. pci_endpoint_test_bar_writel(test, barno, j, 0xA0A0A0A0);
  139. for (j = 0; j < size; j += 4) {
  140. val = pci_endpoint_test_bar_readl(test, barno, j);
  141. if (val != 0xA0A0A0A0)
  142. return false;
  143. }
  144. return true;
  145. }
  146. static bool pci_endpoint_test_legacy_irq(struct pci_endpoint_test *test)
  147. {
  148. u32 val;
  149. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND,
  150. COMMAND_RAISE_LEGACY_IRQ);
  151. val = wait_for_completion_timeout(&test->irq_raised,
  152. msecs_to_jiffies(1000));
  153. if (!val)
  154. return false;
  155. return true;
  156. }
  157. static bool pci_endpoint_test_msi_irq(struct pci_endpoint_test *test,
  158. u8 msi_num)
  159. {
  160. u32 val;
  161. struct pci_dev *pdev = test->pdev;
  162. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND,
  163. msi_num << MSI_NUMBER_SHIFT |
  164. COMMAND_RAISE_MSI_IRQ);
  165. val = wait_for_completion_timeout(&test->irq_raised,
  166. msecs_to_jiffies(1000));
  167. if (!val)
  168. return false;
  169. if (test->last_irq - pdev->irq == msi_num - 1)
  170. return true;
  171. return false;
  172. }
  173. static bool pci_endpoint_test_copy(struct pci_endpoint_test *test, size_t size)
  174. {
  175. bool ret = false;
  176. void *src_addr;
  177. void *dst_addr;
  178. dma_addr_t src_phys_addr;
  179. dma_addr_t dst_phys_addr;
  180. struct pci_dev *pdev = test->pdev;
  181. struct device *dev = &pdev->dev;
  182. void *orig_src_addr;
  183. dma_addr_t orig_src_phys_addr;
  184. void *orig_dst_addr;
  185. dma_addr_t orig_dst_phys_addr;
  186. size_t offset;
  187. size_t alignment = test->alignment;
  188. u32 src_crc32;
  189. u32 dst_crc32;
  190. orig_src_addr = dma_alloc_coherent(dev, size + alignment,
  191. &orig_src_phys_addr, GFP_KERNEL);
  192. if (!orig_src_addr) {
  193. dev_err(dev, "failed to allocate source buffer\n");
  194. ret = false;
  195. goto err;
  196. }
  197. if (alignment && !IS_ALIGNED(orig_src_phys_addr, alignment)) {
  198. src_phys_addr = PTR_ALIGN(orig_src_phys_addr, alignment);
  199. offset = src_phys_addr - orig_src_phys_addr;
  200. src_addr = orig_src_addr + offset;
  201. } else {
  202. src_phys_addr = orig_src_phys_addr;
  203. src_addr = orig_src_addr;
  204. }
  205. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_LOWER_SRC_ADDR,
  206. lower_32_bits(src_phys_addr));
  207. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_UPPER_SRC_ADDR,
  208. upper_32_bits(src_phys_addr));
  209. get_random_bytes(src_addr, size);
  210. src_crc32 = crc32_le(~0, src_addr, size);
  211. orig_dst_addr = dma_alloc_coherent(dev, size + alignment,
  212. &orig_dst_phys_addr, GFP_KERNEL);
  213. if (!orig_dst_addr) {
  214. dev_err(dev, "failed to allocate destination address\n");
  215. ret = false;
  216. goto err_orig_src_addr;
  217. }
  218. if (alignment && !IS_ALIGNED(orig_dst_phys_addr, alignment)) {
  219. dst_phys_addr = PTR_ALIGN(orig_dst_phys_addr, alignment);
  220. offset = dst_phys_addr - orig_dst_phys_addr;
  221. dst_addr = orig_dst_addr + offset;
  222. } else {
  223. dst_phys_addr = orig_dst_phys_addr;
  224. dst_addr = orig_dst_addr;
  225. }
  226. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_LOWER_DST_ADDR,
  227. lower_32_bits(dst_phys_addr));
  228. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_UPPER_DST_ADDR,
  229. upper_32_bits(dst_phys_addr));
  230. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE,
  231. size);
  232. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND,
  233. 1 << MSI_NUMBER_SHIFT | COMMAND_COPY);
  234. wait_for_completion(&test->irq_raised);
  235. dst_crc32 = crc32_le(~0, dst_addr, size);
  236. if (dst_crc32 == src_crc32)
  237. ret = true;
  238. dma_free_coherent(dev, size + alignment, orig_dst_addr,
  239. orig_dst_phys_addr);
  240. err_orig_src_addr:
  241. dma_free_coherent(dev, size + alignment, orig_src_addr,
  242. orig_src_phys_addr);
  243. err:
  244. return ret;
  245. }
  246. static bool pci_endpoint_test_write(struct pci_endpoint_test *test, size_t size)
  247. {
  248. bool ret = false;
  249. u32 reg;
  250. void *addr;
  251. dma_addr_t phys_addr;
  252. struct pci_dev *pdev = test->pdev;
  253. struct device *dev = &pdev->dev;
  254. void *orig_addr;
  255. dma_addr_t orig_phys_addr;
  256. size_t offset;
  257. size_t alignment = test->alignment;
  258. u32 crc32;
  259. orig_addr = dma_alloc_coherent(dev, size + alignment, &orig_phys_addr,
  260. GFP_KERNEL);
  261. if (!orig_addr) {
  262. dev_err(dev, "failed to allocate address\n");
  263. ret = false;
  264. goto err;
  265. }
  266. if (alignment && !IS_ALIGNED(orig_phys_addr, alignment)) {
  267. phys_addr = PTR_ALIGN(orig_phys_addr, alignment);
  268. offset = phys_addr - orig_phys_addr;
  269. addr = orig_addr + offset;
  270. } else {
  271. phys_addr = orig_phys_addr;
  272. addr = orig_addr;
  273. }
  274. get_random_bytes(addr, size);
  275. crc32 = crc32_le(~0, addr, size);
  276. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_CHECKSUM,
  277. crc32);
  278. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_LOWER_SRC_ADDR,
  279. lower_32_bits(phys_addr));
  280. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_UPPER_SRC_ADDR,
  281. upper_32_bits(phys_addr));
  282. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE, size);
  283. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND,
  284. 1 << MSI_NUMBER_SHIFT | COMMAND_READ);
  285. wait_for_completion(&test->irq_raised);
  286. reg = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_STATUS);
  287. if (reg & STATUS_READ_SUCCESS)
  288. ret = true;
  289. dma_free_coherent(dev, size + alignment, orig_addr, orig_phys_addr);
  290. err:
  291. return ret;
  292. }
  293. static bool pci_endpoint_test_read(struct pci_endpoint_test *test, size_t size)
  294. {
  295. bool ret = false;
  296. void *addr;
  297. dma_addr_t phys_addr;
  298. struct pci_dev *pdev = test->pdev;
  299. struct device *dev = &pdev->dev;
  300. void *orig_addr;
  301. dma_addr_t orig_phys_addr;
  302. size_t offset;
  303. size_t alignment = test->alignment;
  304. u32 crc32;
  305. orig_addr = dma_alloc_coherent(dev, size + alignment, &orig_phys_addr,
  306. GFP_KERNEL);
  307. if (!orig_addr) {
  308. dev_err(dev, "failed to allocate destination address\n");
  309. ret = false;
  310. goto err;
  311. }
  312. if (alignment && !IS_ALIGNED(orig_phys_addr, alignment)) {
  313. phys_addr = PTR_ALIGN(orig_phys_addr, alignment);
  314. offset = phys_addr - orig_phys_addr;
  315. addr = orig_addr + offset;
  316. } else {
  317. phys_addr = orig_phys_addr;
  318. addr = orig_addr;
  319. }
  320. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_LOWER_DST_ADDR,
  321. lower_32_bits(phys_addr));
  322. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_UPPER_DST_ADDR,
  323. upper_32_bits(phys_addr));
  324. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE, size);
  325. pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND,
  326. 1 << MSI_NUMBER_SHIFT | COMMAND_WRITE);
  327. wait_for_completion(&test->irq_raised);
  328. crc32 = crc32_le(~0, addr, size);
  329. if (crc32 == pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_CHECKSUM))
  330. ret = true;
  331. dma_free_coherent(dev, size + alignment, orig_addr, orig_phys_addr);
  332. err:
  333. return ret;
  334. }
  335. static long pci_endpoint_test_ioctl(struct file *file, unsigned int cmd,
  336. unsigned long arg)
  337. {
  338. int ret = -EINVAL;
  339. enum pci_barno bar;
  340. struct pci_endpoint_test *test = to_endpoint_test(file->private_data);
  341. mutex_lock(&test->mutex);
  342. switch (cmd) {
  343. case PCITEST_BAR:
  344. bar = arg;
  345. if (bar < 0 || bar > 5)
  346. goto ret;
  347. ret = pci_endpoint_test_bar(test, bar);
  348. break;
  349. case PCITEST_LEGACY_IRQ:
  350. ret = pci_endpoint_test_legacy_irq(test);
  351. break;
  352. case PCITEST_MSI:
  353. ret = pci_endpoint_test_msi_irq(test, arg);
  354. break;
  355. case PCITEST_WRITE:
  356. ret = pci_endpoint_test_write(test, arg);
  357. break;
  358. case PCITEST_READ:
  359. ret = pci_endpoint_test_read(test, arg);
  360. break;
  361. case PCITEST_COPY:
  362. ret = pci_endpoint_test_copy(test, arg);
  363. break;
  364. }
  365. ret:
  366. mutex_unlock(&test->mutex);
  367. return ret;
  368. }
  369. static const struct file_operations pci_endpoint_test_fops = {
  370. .owner = THIS_MODULE,
  371. .unlocked_ioctl = pci_endpoint_test_ioctl,
  372. };
  373. static int pci_endpoint_test_probe(struct pci_dev *pdev,
  374. const struct pci_device_id *ent)
  375. {
  376. int i;
  377. int err;
  378. int irq = 0;
  379. int id;
  380. char name[20];
  381. enum pci_barno bar;
  382. void __iomem *base;
  383. struct device *dev = &pdev->dev;
  384. struct pci_endpoint_test *test;
  385. struct pci_endpoint_test_data *data;
  386. enum pci_barno test_reg_bar = BAR_0;
  387. struct miscdevice *misc_device;
  388. if (pci_is_bridge(pdev))
  389. return -ENODEV;
  390. test = devm_kzalloc(dev, sizeof(*test), GFP_KERNEL);
  391. if (!test)
  392. return -ENOMEM;
  393. test->test_reg_bar = 0;
  394. test->alignment = 0;
  395. test->pdev = pdev;
  396. data = (struct pci_endpoint_test_data *)ent->driver_data;
  397. if (data) {
  398. test_reg_bar = data->test_reg_bar;
  399. test->alignment = data->alignment;
  400. no_msi = data->no_msi;
  401. }
  402. init_completion(&test->irq_raised);
  403. mutex_init(&test->mutex);
  404. err = pci_enable_device(pdev);
  405. if (err) {
  406. dev_err(dev, "Cannot enable PCI device\n");
  407. return err;
  408. }
  409. err = pci_request_regions(pdev, DRV_MODULE_NAME);
  410. if (err) {
  411. dev_err(dev, "Cannot obtain PCI resources\n");
  412. goto err_disable_pdev;
  413. }
  414. pci_set_master(pdev);
  415. if (!no_msi) {
  416. irq = pci_alloc_irq_vectors(pdev, 1, 32, PCI_IRQ_MSI);
  417. if (irq < 0)
  418. dev_err(dev, "failed to get MSI interrupts\n");
  419. }
  420. err = devm_request_irq(dev, pdev->irq, pci_endpoint_test_irqhandler,
  421. IRQF_SHARED, DRV_MODULE_NAME, test);
  422. if (err) {
  423. dev_err(dev, "failed to request IRQ %d\n", pdev->irq);
  424. goto err_disable_msi;
  425. }
  426. for (i = 1; i < irq; i++) {
  427. err = devm_request_irq(dev, pdev->irq + i,
  428. pci_endpoint_test_irqhandler,
  429. IRQF_SHARED, DRV_MODULE_NAME, test);
  430. if (err)
  431. dev_err(dev, "failed to request IRQ %d for MSI %d\n",
  432. pdev->irq + i, i + 1);
  433. }
  434. for (bar = BAR_0; bar <= BAR_5; bar++) {
  435. base = pci_ioremap_bar(pdev, bar);
  436. if (!base) {
  437. dev_err(dev, "failed to read BAR%d\n", bar);
  438. WARN_ON(bar == test_reg_bar);
  439. }
  440. test->bar[bar] = base;
  441. }
  442. test->base = test->bar[test_reg_bar];
  443. if (!test->base) {
  444. dev_err(dev, "Cannot perform PCI test without BAR%d\n",
  445. test_reg_bar);
  446. goto err_iounmap;
  447. }
  448. pci_set_drvdata(pdev, test);
  449. id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL);
  450. if (id < 0) {
  451. dev_err(dev, "unable to get id\n");
  452. goto err_iounmap;
  453. }
  454. snprintf(name, sizeof(name), DRV_MODULE_NAME ".%d", id);
  455. misc_device = &test->miscdev;
  456. misc_device->minor = MISC_DYNAMIC_MINOR;
  457. misc_device->name = name;
  458. misc_device->fops = &pci_endpoint_test_fops,
  459. err = misc_register(misc_device);
  460. if (err) {
  461. dev_err(dev, "failed to register device\n");
  462. goto err_ida_remove;
  463. }
  464. return 0;
  465. err_ida_remove:
  466. ida_simple_remove(&pci_endpoint_test_ida, id);
  467. err_iounmap:
  468. for (bar = BAR_0; bar <= BAR_5; bar++) {
  469. if (test->bar[bar])
  470. pci_iounmap(pdev, test->bar[bar]);
  471. }
  472. err_disable_msi:
  473. pci_disable_msi(pdev);
  474. pci_release_regions(pdev);
  475. err_disable_pdev:
  476. pci_disable_device(pdev);
  477. return err;
  478. }
  479. static void pci_endpoint_test_remove(struct pci_dev *pdev)
  480. {
  481. int id;
  482. enum pci_barno bar;
  483. struct pci_endpoint_test *test = pci_get_drvdata(pdev);
  484. struct miscdevice *misc_device = &test->miscdev;
  485. if (sscanf(misc_device->name, DRV_MODULE_NAME ".%d", &id) != 1)
  486. return;
  487. misc_deregister(&test->miscdev);
  488. ida_simple_remove(&pci_endpoint_test_ida, id);
  489. for (bar = BAR_0; bar <= BAR_5; bar++) {
  490. if (test->bar[bar])
  491. pci_iounmap(pdev, test->bar[bar]);
  492. }
  493. pci_disable_msi(pdev);
  494. pci_release_regions(pdev);
  495. pci_disable_device(pdev);
  496. }
  497. static const struct pci_device_id pci_endpoint_test_tbl[] = {
  498. { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA74x) },
  499. { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA72x) },
  500. { }
  501. };
  502. MODULE_DEVICE_TABLE(pci, pci_endpoint_test_tbl);
  503. static struct pci_driver pci_endpoint_test_driver = {
  504. .name = DRV_MODULE_NAME,
  505. .id_table = pci_endpoint_test_tbl,
  506. .probe = pci_endpoint_test_probe,
  507. .remove = pci_endpoint_test_remove,
  508. };
  509. module_pci_driver(pci_endpoint_test_driver);
  510. MODULE_DESCRIPTION("PCI ENDPOINT TEST HOST DRIVER");
  511. MODULE_AUTHOR("Kishon Vijay Abraham I <kishon@ti.com>");
  512. MODULE_LICENSE("GPL v2");