dmatest.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /*
  2. * DMA Engine test module
  3. *
  4. * Copyright (C) 2007 Atmel Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/delay.h>
  11. #include <linux/dmaengine.h>
  12. #include <linux/init.h>
  13. #include <linux/kthread.h>
  14. #include <linux/module.h>
  15. #include <linux/moduleparam.h>
  16. #include <linux/random.h>
  17. #include <linux/wait.h>
  18. static unsigned int test_buf_size = 16384;
  19. module_param(test_buf_size, uint, S_IRUGO);
  20. MODULE_PARM_DESC(test_buf_size, "Size of the memcpy test buffer");
  21. static char test_channel[20];
  22. module_param_string(channel, test_channel, sizeof(test_channel), S_IRUGO);
  23. MODULE_PARM_DESC(channel, "Bus ID of the channel to test (default: any)");
  24. static char test_device[20];
  25. module_param_string(device, test_device, sizeof(test_device), S_IRUGO);
  26. MODULE_PARM_DESC(device, "Bus ID of the DMA Engine to test (default: any)");
  27. static unsigned int threads_per_chan = 1;
  28. module_param(threads_per_chan, uint, S_IRUGO);
  29. MODULE_PARM_DESC(threads_per_chan,
  30. "Number of threads to start per channel (default: 1)");
  31. static unsigned int max_channels;
  32. module_param(max_channels, uint, S_IRUGO);
  33. MODULE_PARM_DESC(max_channels,
  34. "Maximum number of channels to use (default: all)");
  35. static unsigned int iterations;
  36. module_param(iterations, uint, S_IRUGO);
  37. MODULE_PARM_DESC(iterations,
  38. "Iterations before stopping test (default: infinite)");
  39. static unsigned int xor_sources = 3;
  40. module_param(xor_sources, uint, S_IRUGO);
  41. MODULE_PARM_DESC(xor_sources,
  42. "Number of xor source buffers (default: 3)");
  43. static unsigned int pq_sources = 3;
  44. module_param(pq_sources, uint, S_IRUGO);
  45. MODULE_PARM_DESC(pq_sources,
  46. "Number of p+q source buffers (default: 3)");
  47. /*
  48. * Initialization patterns. All bytes in the source buffer has bit 7
  49. * set, all bytes in the destination buffer has bit 7 cleared.
  50. *
  51. * Bit 6 is set for all bytes which are to be copied by the DMA
  52. * engine. Bit 5 is set for all bytes which are to be overwritten by
  53. * the DMA engine.
  54. *
  55. * The remaining bits are the inverse of a counter which increments by
  56. * one for each byte address.
  57. */
  58. #define PATTERN_SRC 0x80
  59. #define PATTERN_DST 0x00
  60. #define PATTERN_COPY 0x40
  61. #define PATTERN_OVERWRITE 0x20
  62. #define PATTERN_COUNT_MASK 0x1f
  63. struct dmatest_thread {
  64. struct list_head node;
  65. struct task_struct *task;
  66. struct dma_chan *chan;
  67. u8 **srcs;
  68. u8 **dsts;
  69. enum dma_transaction_type type;
  70. };
  71. struct dmatest_chan {
  72. struct list_head node;
  73. struct dma_chan *chan;
  74. struct list_head threads;
  75. };
  76. /*
  77. * These are protected by dma_list_mutex since they're only used by
  78. * the DMA filter function callback
  79. */
  80. static LIST_HEAD(dmatest_channels);
  81. static unsigned int nr_channels;
  82. static bool dmatest_match_channel(struct dma_chan *chan)
  83. {
  84. if (test_channel[0] == '\0')
  85. return true;
  86. return strcmp(dma_chan_name(chan), test_channel) == 0;
  87. }
  88. static bool dmatest_match_device(struct dma_device *device)
  89. {
  90. if (test_device[0] == '\0')
  91. return true;
  92. return strcmp(dev_name(device->dev), test_device) == 0;
  93. }
  94. static unsigned long dmatest_random(void)
  95. {
  96. unsigned long buf;
  97. get_random_bytes(&buf, sizeof(buf));
  98. return buf;
  99. }
  100. static void dmatest_init_srcs(u8 **bufs, unsigned int start, unsigned int len)
  101. {
  102. unsigned int i;
  103. u8 *buf;
  104. for (; (buf = *bufs); bufs++) {
  105. for (i = 0; i < start; i++)
  106. buf[i] = PATTERN_SRC | (~i & PATTERN_COUNT_MASK);
  107. for ( ; i < start + len; i++)
  108. buf[i] = PATTERN_SRC | PATTERN_COPY
  109. | (~i & PATTERN_COUNT_MASK);
  110. for ( ; i < test_buf_size; i++)
  111. buf[i] = PATTERN_SRC | (~i & PATTERN_COUNT_MASK);
  112. buf++;
  113. }
  114. }
  115. static void dmatest_init_dsts(u8 **bufs, unsigned int start, unsigned int len)
  116. {
  117. unsigned int i;
  118. u8 *buf;
  119. for (; (buf = *bufs); bufs++) {
  120. for (i = 0; i < start; i++)
  121. buf[i] = PATTERN_DST | (~i & PATTERN_COUNT_MASK);
  122. for ( ; i < start + len; i++)
  123. buf[i] = PATTERN_DST | PATTERN_OVERWRITE
  124. | (~i & PATTERN_COUNT_MASK);
  125. for ( ; i < test_buf_size; i++)
  126. buf[i] = PATTERN_DST | (~i & PATTERN_COUNT_MASK);
  127. }
  128. }
  129. static void dmatest_mismatch(u8 actual, u8 pattern, unsigned int index,
  130. unsigned int counter, bool is_srcbuf)
  131. {
  132. u8 diff = actual ^ pattern;
  133. u8 expected = pattern | (~counter & PATTERN_COUNT_MASK);
  134. const char *thread_name = current->comm;
  135. if (is_srcbuf)
  136. pr_warning("%s: srcbuf[0x%x] overwritten!"
  137. " Expected %02x, got %02x\n",
  138. thread_name, index, expected, actual);
  139. else if ((pattern & PATTERN_COPY)
  140. && (diff & (PATTERN_COPY | PATTERN_OVERWRITE)))
  141. pr_warning("%s: dstbuf[0x%x] not copied!"
  142. " Expected %02x, got %02x\n",
  143. thread_name, index, expected, actual);
  144. else if (diff & PATTERN_SRC)
  145. pr_warning("%s: dstbuf[0x%x] was copied!"
  146. " Expected %02x, got %02x\n",
  147. thread_name, index, expected, actual);
  148. else
  149. pr_warning("%s: dstbuf[0x%x] mismatch!"
  150. " Expected %02x, got %02x\n",
  151. thread_name, index, expected, actual);
  152. }
  153. static unsigned int dmatest_verify(u8 **bufs, unsigned int start,
  154. unsigned int end, unsigned int counter, u8 pattern,
  155. bool is_srcbuf)
  156. {
  157. unsigned int i;
  158. unsigned int error_count = 0;
  159. u8 actual;
  160. u8 expected;
  161. u8 *buf;
  162. unsigned int counter_orig = counter;
  163. for (; (buf = *bufs); bufs++) {
  164. counter = counter_orig;
  165. for (i = start; i < end; i++) {
  166. actual = buf[i];
  167. expected = pattern | (~counter & PATTERN_COUNT_MASK);
  168. if (actual != expected) {
  169. if (error_count < 32)
  170. dmatest_mismatch(actual, pattern, i,
  171. counter, is_srcbuf);
  172. error_count++;
  173. }
  174. counter++;
  175. }
  176. }
  177. if (error_count > 32)
  178. pr_warning("%s: %u errors suppressed\n",
  179. current->comm, error_count - 32);
  180. return error_count;
  181. }
  182. static void dmatest_callback(void *completion)
  183. {
  184. complete(completion);
  185. }
  186. /*
  187. * This function repeatedly tests DMA transfers of various lengths and
  188. * offsets for a given operation type until it is told to exit by
  189. * kthread_stop(). There may be multiple threads running this function
  190. * in parallel for a single channel, and there may be multiple channels
  191. * being tested in parallel.
  192. *
  193. * Before each test, the source and destination buffer is initialized
  194. * with a known pattern. This pattern is different depending on
  195. * whether it's in an area which is supposed to be copied or
  196. * overwritten, and different in the source and destination buffers.
  197. * So if the DMA engine doesn't copy exactly what we tell it to copy,
  198. * we'll notice.
  199. */
  200. static int dmatest_func(void *data)
  201. {
  202. struct dmatest_thread *thread = data;
  203. struct dma_chan *chan;
  204. const char *thread_name;
  205. unsigned int src_off, dst_off, len;
  206. unsigned int error_count;
  207. unsigned int failed_tests = 0;
  208. unsigned int total_tests = 0;
  209. dma_cookie_t cookie;
  210. enum dma_status status;
  211. enum dma_ctrl_flags flags;
  212. u8 pq_coefs[pq_sources];
  213. int ret;
  214. int src_cnt;
  215. int dst_cnt;
  216. int i;
  217. thread_name = current->comm;
  218. ret = -ENOMEM;
  219. smp_rmb();
  220. chan = thread->chan;
  221. if (thread->type == DMA_MEMCPY)
  222. src_cnt = dst_cnt = 1;
  223. else if (thread->type == DMA_XOR) {
  224. src_cnt = xor_sources | 1; /* force odd to ensure dst = src */
  225. dst_cnt = 1;
  226. } else if (thread->type == DMA_PQ) {
  227. src_cnt = pq_sources | 1; /* force odd to ensure dst = src */
  228. dst_cnt = 2;
  229. for (i = 0; i < pq_sources; i++)
  230. pq_coefs[i] = 1;
  231. } else
  232. goto err_srcs;
  233. thread->srcs = kcalloc(src_cnt+1, sizeof(u8 *), GFP_KERNEL);
  234. if (!thread->srcs)
  235. goto err_srcs;
  236. for (i = 0; i < src_cnt; i++) {
  237. thread->srcs[i] = kmalloc(test_buf_size, GFP_KERNEL);
  238. if (!thread->srcs[i])
  239. goto err_srcbuf;
  240. }
  241. thread->srcs[i] = NULL;
  242. thread->dsts = kcalloc(dst_cnt+1, sizeof(u8 *), GFP_KERNEL);
  243. if (!thread->dsts)
  244. goto err_dsts;
  245. for (i = 0; i < dst_cnt; i++) {
  246. thread->dsts[i] = kmalloc(test_buf_size, GFP_KERNEL);
  247. if (!thread->dsts[i])
  248. goto err_dstbuf;
  249. }
  250. thread->dsts[i] = NULL;
  251. set_user_nice(current, 10);
  252. flags = DMA_CTRL_ACK | DMA_COMPL_SKIP_DEST_UNMAP | DMA_PREP_INTERRUPT;
  253. while (!kthread_should_stop()
  254. && !(iterations && total_tests >= iterations)) {
  255. struct dma_device *dev = chan->device;
  256. struct dma_async_tx_descriptor *tx = NULL;
  257. dma_addr_t dma_srcs[src_cnt];
  258. dma_addr_t dma_dsts[dst_cnt];
  259. struct completion cmp;
  260. unsigned long tmo = msecs_to_jiffies(3000);
  261. u8 align = 0;
  262. total_tests++;
  263. /* honor alignment restrictions */
  264. if (thread->type == DMA_MEMCPY)
  265. align = dev->copy_align;
  266. else if (thread->type == DMA_XOR)
  267. align = dev->xor_align;
  268. else if (thread->type == DMA_PQ)
  269. align = dev->pq_align;
  270. if (1 << align > test_buf_size) {
  271. pr_err("%u-byte buffer too small for %d-byte alignment\n",
  272. test_buf_size, 1 << align);
  273. break;
  274. }
  275. len = dmatest_random() % test_buf_size + 1;
  276. len = (len >> align) << align;
  277. if (!len)
  278. len = 1 << align;
  279. src_off = dmatest_random() % (test_buf_size - len + 1);
  280. dst_off = dmatest_random() % (test_buf_size - len + 1);
  281. src_off = (src_off >> align) << align;
  282. dst_off = (dst_off >> align) << align;
  283. dmatest_init_srcs(thread->srcs, src_off, len);
  284. dmatest_init_dsts(thread->dsts, dst_off, len);
  285. for (i = 0; i < src_cnt; i++) {
  286. u8 *buf = thread->srcs[i] + src_off;
  287. dma_srcs[i] = dma_map_single(dev->dev, buf, len,
  288. DMA_TO_DEVICE);
  289. }
  290. /* map with DMA_BIDIRECTIONAL to force writeback/invalidate */
  291. for (i = 0; i < dst_cnt; i++) {
  292. dma_dsts[i] = dma_map_single(dev->dev, thread->dsts[i],
  293. test_buf_size,
  294. DMA_BIDIRECTIONAL);
  295. }
  296. if (thread->type == DMA_MEMCPY)
  297. tx = dev->device_prep_dma_memcpy(chan,
  298. dma_dsts[0] + dst_off,
  299. dma_srcs[0], len,
  300. flags);
  301. else if (thread->type == DMA_XOR)
  302. tx = dev->device_prep_dma_xor(chan,
  303. dma_dsts[0] + dst_off,
  304. dma_srcs, xor_sources,
  305. len, flags);
  306. else if (thread->type == DMA_PQ) {
  307. dma_addr_t dma_pq[dst_cnt];
  308. for (i = 0; i < dst_cnt; i++)
  309. dma_pq[i] = dma_dsts[i] + dst_off;
  310. tx = dev->device_prep_dma_pq(chan, dma_pq, dma_srcs,
  311. pq_sources, pq_coefs,
  312. len, flags);
  313. }
  314. if (!tx) {
  315. for (i = 0; i < src_cnt; i++)
  316. dma_unmap_single(dev->dev, dma_srcs[i], len,
  317. DMA_TO_DEVICE);
  318. for (i = 0; i < dst_cnt; i++)
  319. dma_unmap_single(dev->dev, dma_dsts[i],
  320. test_buf_size,
  321. DMA_BIDIRECTIONAL);
  322. pr_warning("%s: #%u: prep error with src_off=0x%x "
  323. "dst_off=0x%x len=0x%x\n",
  324. thread_name, total_tests - 1,
  325. src_off, dst_off, len);
  326. msleep(100);
  327. failed_tests++;
  328. continue;
  329. }
  330. init_completion(&cmp);
  331. tx->callback = dmatest_callback;
  332. tx->callback_param = &cmp;
  333. cookie = tx->tx_submit(tx);
  334. if (dma_submit_error(cookie)) {
  335. pr_warning("%s: #%u: submit error %d with src_off=0x%x "
  336. "dst_off=0x%x len=0x%x\n",
  337. thread_name, total_tests - 1, cookie,
  338. src_off, dst_off, len);
  339. msleep(100);
  340. failed_tests++;
  341. continue;
  342. }
  343. dma_async_issue_pending(chan);
  344. tmo = wait_for_completion_timeout(&cmp, tmo);
  345. status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
  346. if (tmo == 0) {
  347. pr_warning("%s: #%u: test timed out\n",
  348. thread_name, total_tests - 1);
  349. failed_tests++;
  350. continue;
  351. } else if (status != DMA_SUCCESS) {
  352. pr_warning("%s: #%u: got completion callback,"
  353. " but status is \'%s\'\n",
  354. thread_name, total_tests - 1,
  355. status == DMA_ERROR ? "error" : "in progress");
  356. failed_tests++;
  357. continue;
  358. }
  359. /* Unmap by myself (see DMA_COMPL_SKIP_DEST_UNMAP above) */
  360. for (i = 0; i < dst_cnt; i++)
  361. dma_unmap_single(dev->dev, dma_dsts[i], test_buf_size,
  362. DMA_BIDIRECTIONAL);
  363. error_count = 0;
  364. pr_debug("%s: verifying source buffer...\n", thread_name);
  365. error_count += dmatest_verify(thread->srcs, 0, src_off,
  366. 0, PATTERN_SRC, true);
  367. error_count += dmatest_verify(thread->srcs, src_off,
  368. src_off + len, src_off,
  369. PATTERN_SRC | PATTERN_COPY, true);
  370. error_count += dmatest_verify(thread->srcs, src_off + len,
  371. test_buf_size, src_off + len,
  372. PATTERN_SRC, true);
  373. pr_debug("%s: verifying dest buffer...\n",
  374. thread->task->comm);
  375. error_count += dmatest_verify(thread->dsts, 0, dst_off,
  376. 0, PATTERN_DST, false);
  377. error_count += dmatest_verify(thread->dsts, dst_off,
  378. dst_off + len, src_off,
  379. PATTERN_SRC | PATTERN_COPY, false);
  380. error_count += dmatest_verify(thread->dsts, dst_off + len,
  381. test_buf_size, dst_off + len,
  382. PATTERN_DST, false);
  383. if (error_count) {
  384. pr_warning("%s: #%u: %u errors with "
  385. "src_off=0x%x dst_off=0x%x len=0x%x\n",
  386. thread_name, total_tests - 1, error_count,
  387. src_off, dst_off, len);
  388. failed_tests++;
  389. } else {
  390. pr_debug("%s: #%u: No errors with "
  391. "src_off=0x%x dst_off=0x%x len=0x%x\n",
  392. thread_name, total_tests - 1,
  393. src_off, dst_off, len);
  394. }
  395. }
  396. ret = 0;
  397. for (i = 0; thread->dsts[i]; i++)
  398. kfree(thread->dsts[i]);
  399. err_dstbuf:
  400. kfree(thread->dsts);
  401. err_dsts:
  402. for (i = 0; thread->srcs[i]; i++)
  403. kfree(thread->srcs[i]);
  404. err_srcbuf:
  405. kfree(thread->srcs);
  406. err_srcs:
  407. pr_notice("%s: terminating after %u tests, %u failures (status %d)\n",
  408. thread_name, total_tests, failed_tests, ret);
  409. if (iterations > 0)
  410. while (!kthread_should_stop()) {
  411. DECLARE_WAIT_QUEUE_HEAD(wait_dmatest_exit);
  412. interruptible_sleep_on(&wait_dmatest_exit);
  413. }
  414. return ret;
  415. }
  416. static void dmatest_cleanup_channel(struct dmatest_chan *dtc)
  417. {
  418. struct dmatest_thread *thread;
  419. struct dmatest_thread *_thread;
  420. int ret;
  421. list_for_each_entry_safe(thread, _thread, &dtc->threads, node) {
  422. ret = kthread_stop(thread->task);
  423. pr_debug("dmatest: thread %s exited with status %d\n",
  424. thread->task->comm, ret);
  425. list_del(&thread->node);
  426. kfree(thread);
  427. }
  428. kfree(dtc);
  429. }
  430. static int dmatest_add_threads(struct dmatest_chan *dtc, enum dma_transaction_type type)
  431. {
  432. struct dmatest_thread *thread;
  433. struct dma_chan *chan = dtc->chan;
  434. char *op;
  435. unsigned int i;
  436. if (type == DMA_MEMCPY)
  437. op = "copy";
  438. else if (type == DMA_XOR)
  439. op = "xor";
  440. else if (type == DMA_PQ)
  441. op = "pq";
  442. else
  443. return -EINVAL;
  444. for (i = 0; i < threads_per_chan; i++) {
  445. thread = kzalloc(sizeof(struct dmatest_thread), GFP_KERNEL);
  446. if (!thread) {
  447. pr_warning("dmatest: No memory for %s-%s%u\n",
  448. dma_chan_name(chan), op, i);
  449. break;
  450. }
  451. thread->chan = dtc->chan;
  452. thread->type = type;
  453. smp_wmb();
  454. thread->task = kthread_run(dmatest_func, thread, "%s-%s%u",
  455. dma_chan_name(chan), op, i);
  456. if (IS_ERR(thread->task)) {
  457. pr_warning("dmatest: Failed to run thread %s-%s%u\n",
  458. dma_chan_name(chan), op, i);
  459. kfree(thread);
  460. break;
  461. }
  462. /* srcbuf and dstbuf are allocated by the thread itself */
  463. list_add_tail(&thread->node, &dtc->threads);
  464. }
  465. return i;
  466. }
  467. static int dmatest_add_channel(struct dma_chan *chan)
  468. {
  469. struct dmatest_chan *dtc;
  470. struct dma_device *dma_dev = chan->device;
  471. unsigned int thread_count = 0;
  472. unsigned int cnt;
  473. dtc = kmalloc(sizeof(struct dmatest_chan), GFP_KERNEL);
  474. if (!dtc) {
  475. pr_warning("dmatest: No memory for %s\n", dma_chan_name(chan));
  476. return -ENOMEM;
  477. }
  478. dtc->chan = chan;
  479. INIT_LIST_HEAD(&dtc->threads);
  480. if (dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask)) {
  481. cnt = dmatest_add_threads(dtc, DMA_MEMCPY);
  482. thread_count += cnt > 0 ? cnt : 0;
  483. }
  484. if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) {
  485. cnt = dmatest_add_threads(dtc, DMA_XOR);
  486. thread_count += cnt > 0 ? cnt : 0;
  487. }
  488. if (dma_has_cap(DMA_PQ, dma_dev->cap_mask)) {
  489. cnt = dmatest_add_threads(dtc, DMA_PQ);
  490. thread_count += cnt > 0 ?: 0;
  491. }
  492. pr_info("dmatest: Started %u threads using %s\n",
  493. thread_count, dma_chan_name(chan));
  494. list_add_tail(&dtc->node, &dmatest_channels);
  495. nr_channels++;
  496. return 0;
  497. }
  498. static bool filter(struct dma_chan *chan, void *param)
  499. {
  500. if (!dmatest_match_channel(chan) || !dmatest_match_device(chan->device))
  501. return false;
  502. else
  503. return true;
  504. }
  505. static int __init dmatest_init(void)
  506. {
  507. dma_cap_mask_t mask;
  508. struct dma_chan *chan;
  509. int err = 0;
  510. dma_cap_zero(mask);
  511. dma_cap_set(DMA_MEMCPY, mask);
  512. for (;;) {
  513. chan = dma_request_channel(mask, filter, NULL);
  514. if (chan) {
  515. err = dmatest_add_channel(chan);
  516. if (err) {
  517. dma_release_channel(chan);
  518. break; /* add_channel failed, punt */
  519. }
  520. } else
  521. break; /* no more channels available */
  522. if (max_channels && nr_channels >= max_channels)
  523. break; /* we have all we need */
  524. }
  525. return err;
  526. }
  527. /* when compiled-in wait for drivers to load first */
  528. late_initcall(dmatest_init);
  529. static void __exit dmatest_exit(void)
  530. {
  531. struct dmatest_chan *dtc, *_dtc;
  532. struct dma_chan *chan;
  533. list_for_each_entry_safe(dtc, _dtc, &dmatest_channels, node) {
  534. list_del(&dtc->node);
  535. chan = dtc->chan;
  536. dmatest_cleanup_channel(dtc);
  537. pr_debug("dmatest: dropped channel %s\n",
  538. dma_chan_name(chan));
  539. dma_release_channel(chan);
  540. }
  541. }
  542. module_exit(dmatest_exit);
  543. MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>");
  544. MODULE_LICENSE("GPL v2");