mpc52xx_lpbfifo.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /*
  2. * LocalPlus Bus FIFO driver for the Freescale MPC52xx.
  3. *
  4. * Copyright (C) 2009 Secret Lab Technologies Ltd.
  5. *
  6. * This file is released under the GPLv2
  7. *
  8. * Todo:
  9. * - Add support for multiple requests to be queued.
  10. */
  11. #include <linux/interrupt.h>
  12. #include <linux/kernel.h>
  13. #include <linux/of.h>
  14. #include <linux/of_platform.h>
  15. #include <linux/spinlock.h>
  16. #include <linux/module.h>
  17. #include <asm/io.h>
  18. #include <asm/prom.h>
  19. #include <asm/mpc52xx.h>
  20. #include <asm/time.h>
  21. #include <linux/fsl/bestcomm/bestcomm.h>
  22. #include <linux/fsl/bestcomm/bestcomm_priv.h>
  23. #include <linux/fsl/bestcomm/gen_bd.h>
  24. MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
  25. MODULE_DESCRIPTION("MPC5200 LocalPlus FIFO device driver");
  26. MODULE_LICENSE("GPL");
  27. #define LPBFIFO_REG_PACKET_SIZE (0x00)
  28. #define LPBFIFO_REG_START_ADDRESS (0x04)
  29. #define LPBFIFO_REG_CONTROL (0x08)
  30. #define LPBFIFO_REG_ENABLE (0x0C)
  31. #define LPBFIFO_REG_BYTES_DONE_STATUS (0x14)
  32. #define LPBFIFO_REG_FIFO_DATA (0x40)
  33. #define LPBFIFO_REG_FIFO_STATUS (0x44)
  34. #define LPBFIFO_REG_FIFO_CONTROL (0x48)
  35. #define LPBFIFO_REG_FIFO_ALARM (0x4C)
  36. struct mpc52xx_lpbfifo {
  37. struct device *dev;
  38. phys_addr_t regs_phys;
  39. void __iomem *regs;
  40. int irq;
  41. spinlock_t lock;
  42. struct bcom_task *bcom_tx_task;
  43. struct bcom_task *bcom_rx_task;
  44. struct bcom_task *bcom_cur_task;
  45. /* Current state data */
  46. struct mpc52xx_lpbfifo_request *req;
  47. int dma_irqs_enabled;
  48. };
  49. /* The MPC5200 has only one fifo, so only need one instance structure */
  50. static struct mpc52xx_lpbfifo lpbfifo;
  51. /**
  52. * mpc52xx_lpbfifo_kick - Trigger the next block of data to be transferred
  53. */
  54. static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req)
  55. {
  56. size_t transfer_size = req->size - req->pos;
  57. struct bcom_bd *bd;
  58. void __iomem *reg;
  59. u32 *data;
  60. int i;
  61. int bit_fields;
  62. int dma = !(req->flags & MPC52XX_LPBFIFO_FLAG_NO_DMA);
  63. int write = req->flags & MPC52XX_LPBFIFO_FLAG_WRITE;
  64. int poll_dma = req->flags & MPC52XX_LPBFIFO_FLAG_POLL_DMA;
  65. /* Set and clear the reset bits; is good practice in User Manual */
  66. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, 0x01010000);
  67. /* set master enable bit */
  68. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, 0x00000001);
  69. if (!dma) {
  70. /* While the FIFO can be setup for transfer sizes as large as
  71. * 16M-1, the FIFO itself is only 512 bytes deep and it does
  72. * not generate interrupts for FIFO full events (only transfer
  73. * complete will raise an IRQ). Therefore when not using
  74. * Bestcomm to drive the FIFO it needs to either be polled, or
  75. * transfers need to constrained to the size of the fifo.
  76. *
  77. * This driver restricts the size of the transfer
  78. */
  79. if (transfer_size > 512)
  80. transfer_size = 512;
  81. /* Load the FIFO with data */
  82. if (write) {
  83. reg = lpbfifo.regs + LPBFIFO_REG_FIFO_DATA;
  84. data = req->data + req->pos;
  85. for (i = 0; i < transfer_size; i += 4)
  86. out_be32(reg, *data++);
  87. }
  88. /* Unmask both error and completion irqs */
  89. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, 0x00000301);
  90. } else {
  91. /* Choose the correct direction
  92. *
  93. * Configure the watermarks so DMA will always complete correctly.
  94. * It may be worth experimenting with the ALARM value to see if
  95. * there is a performance impacit. However, if it is wrong there
  96. * is a risk of DMA not transferring the last chunk of data
  97. */
  98. if (write) {
  99. out_be32(lpbfifo.regs + LPBFIFO_REG_FIFO_ALARM, 0x1e4);
  100. out_8(lpbfifo.regs + LPBFIFO_REG_FIFO_CONTROL, 7);
  101. lpbfifo.bcom_cur_task = lpbfifo.bcom_tx_task;
  102. } else {
  103. out_be32(lpbfifo.regs + LPBFIFO_REG_FIFO_ALARM, 0x1ff);
  104. out_8(lpbfifo.regs + LPBFIFO_REG_FIFO_CONTROL, 0);
  105. lpbfifo.bcom_cur_task = lpbfifo.bcom_rx_task;
  106. if (poll_dma) {
  107. if (lpbfifo.dma_irqs_enabled) {
  108. disable_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task));
  109. lpbfifo.dma_irqs_enabled = 0;
  110. }
  111. } else {
  112. if (!lpbfifo.dma_irqs_enabled) {
  113. enable_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task));
  114. lpbfifo.dma_irqs_enabled = 1;
  115. }
  116. }
  117. }
  118. bd = bcom_prepare_next_buffer(lpbfifo.bcom_cur_task);
  119. bd->status = transfer_size;
  120. if (!write) {
  121. /*
  122. * In the DMA read case, the DMA doesn't complete,
  123. * possibly due to incorrect watermarks in the ALARM
  124. * and CONTROL regs. For now instead of trying to
  125. * determine the right watermarks that will make this
  126. * work, just increase the number of bytes the FIFO is
  127. * expecting.
  128. *
  129. * When submitting another operation, the FIFO will get
  130. * reset, so the condition of the FIFO waiting for a
  131. * non-existent 4 bytes will get cleared.
  132. */
  133. transfer_size += 4; /* BLECH! */
  134. }
  135. bd->data[0] = req->data_phys + req->pos;
  136. bcom_submit_next_buffer(lpbfifo.bcom_cur_task, NULL);
  137. /* error irq & master enabled bit */
  138. bit_fields = 0x00000201;
  139. /* Unmask irqs */
  140. if (write && (!poll_dma))
  141. bit_fields |= 0x00000100; /* completion irq too */
  142. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, bit_fields);
  143. }
  144. /* Set transfer size, width, chip select and READ mode */
  145. out_be32(lpbfifo.regs + LPBFIFO_REG_START_ADDRESS,
  146. req->offset + req->pos);
  147. out_be32(lpbfifo.regs + LPBFIFO_REG_PACKET_SIZE, transfer_size);
  148. bit_fields = req->cs << 24 | 0x000008;
  149. if (!write)
  150. bit_fields |= 0x010000; /* read mode */
  151. out_be32(lpbfifo.regs + LPBFIFO_REG_CONTROL, bit_fields);
  152. /* Kick it off */
  153. if (!lpbfifo.req->defer_xfer_start)
  154. out_8(lpbfifo.regs + LPBFIFO_REG_PACKET_SIZE, 0x01);
  155. if (dma)
  156. bcom_enable(lpbfifo.bcom_cur_task);
  157. }
  158. /**
  159. * mpc52xx_lpbfifo_irq - IRQ handler for LPB FIFO
  160. *
  161. * On transmit, the dma completion irq triggers before the fifo completion
  162. * triggers. Handle the dma completion here instead of the LPB FIFO Bestcomm
  163. * task completion irq because everything is not really done until the LPB FIFO
  164. * completion irq triggers.
  165. *
  166. * In other words:
  167. * For DMA, on receive, the "Fat Lady" is the bestcom completion irq. on
  168. * transmit, the fifo completion irq is the "Fat Lady". The opera (or in this
  169. * case the DMA/FIFO operation) is not finished until the "Fat Lady" sings.
  170. *
  171. * Reasons for entering this routine:
  172. * 1) PIO mode rx and tx completion irq
  173. * 2) DMA interrupt mode tx completion irq
  174. * 3) DMA polled mode tx
  175. *
  176. * Exit conditions:
  177. * 1) Transfer aborted
  178. * 2) FIFO complete without DMA; more data to do
  179. * 3) FIFO complete without DMA; all data transferred
  180. * 4) FIFO complete using DMA
  181. *
  182. * Condition 1 can occur regardless of whether or not DMA is used.
  183. * It requires executing the callback to report the error and exiting
  184. * immediately.
  185. *
  186. * Condition 2 requires programming the FIFO with the next block of data
  187. *
  188. * Condition 3 requires executing the callback to report completion
  189. *
  190. * Condition 4 means the same as 3, except that we also retrieve the bcom
  191. * buffer so DMA doesn't get clogged up.
  192. *
  193. * To make things trickier, the spinlock must be dropped before
  194. * executing the callback, otherwise we could end up with a deadlock
  195. * or nested spinlock condition. The out path is non-trivial, so
  196. * extra fiddling is done to make sure all paths lead to the same
  197. * outbound code.
  198. */
  199. static irqreturn_t mpc52xx_lpbfifo_irq(int irq, void *dev_id)
  200. {
  201. struct mpc52xx_lpbfifo_request *req;
  202. u32 status = in_8(lpbfifo.regs + LPBFIFO_REG_BYTES_DONE_STATUS);
  203. void __iomem *reg;
  204. u32 *data;
  205. int count, i;
  206. int do_callback = 0;
  207. u32 ts;
  208. unsigned long flags;
  209. int dma, write, poll_dma;
  210. spin_lock_irqsave(&lpbfifo.lock, flags);
  211. ts = get_tbl();
  212. req = lpbfifo.req;
  213. if (!req) {
  214. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  215. pr_err("bogus LPBFIFO IRQ\n");
  216. return IRQ_HANDLED;
  217. }
  218. dma = !(req->flags & MPC52XX_LPBFIFO_FLAG_NO_DMA);
  219. write = req->flags & MPC52XX_LPBFIFO_FLAG_WRITE;
  220. poll_dma = req->flags & MPC52XX_LPBFIFO_FLAG_POLL_DMA;
  221. if (dma && !write) {
  222. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  223. pr_err("bogus LPBFIFO IRQ (dma and not writing)\n");
  224. return IRQ_HANDLED;
  225. }
  226. if ((status & 0x01) == 0) {
  227. goto out;
  228. }
  229. /* check abort bit */
  230. if (status & 0x10) {
  231. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, 0x01010000);
  232. do_callback = 1;
  233. goto out;
  234. }
  235. /* Read result from hardware */
  236. count = in_be32(lpbfifo.regs + LPBFIFO_REG_BYTES_DONE_STATUS);
  237. count &= 0x00ffffff;
  238. if (!dma && !write) {
  239. /* copy the data out of the FIFO */
  240. reg = lpbfifo.regs + LPBFIFO_REG_FIFO_DATA;
  241. data = req->data + req->pos;
  242. for (i = 0; i < count; i += 4)
  243. *data++ = in_be32(reg);
  244. }
  245. /* Update transfer position and count */
  246. req->pos += count;
  247. /* Decide what to do next */
  248. if (req->size - req->pos)
  249. mpc52xx_lpbfifo_kick(req); /* more work to do */
  250. else
  251. do_callback = 1;
  252. out:
  253. /* Clear the IRQ */
  254. out_8(lpbfifo.regs + LPBFIFO_REG_BYTES_DONE_STATUS, 0x01);
  255. if (dma && (status & 0x11)) {
  256. /*
  257. * Count the DMA as complete only when the FIFO completion
  258. * status or abort bits are set.
  259. *
  260. * (status & 0x01) should always be the case except sometimes
  261. * when using polled DMA.
  262. *
  263. * (status & 0x10) {transfer aborted}: This case needs more
  264. * testing.
  265. */
  266. bcom_retrieve_buffer(lpbfifo.bcom_cur_task, &status, NULL);
  267. }
  268. req->last_byte = ((u8 *)req->data)[req->size - 1];
  269. /* When the do_callback flag is set; it means the transfer is finished
  270. * so set the FIFO as idle */
  271. if (do_callback)
  272. lpbfifo.req = NULL;
  273. if (irq != 0) /* don't increment on polled case */
  274. req->irq_count++;
  275. req->irq_ticks += get_tbl() - ts;
  276. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  277. /* Spinlock is released; it is now safe to call the callback */
  278. if (do_callback && req->callback)
  279. req->callback(req);
  280. return IRQ_HANDLED;
  281. }
  282. /**
  283. * mpc52xx_lpbfifo_bcom_irq - IRQ handler for LPB FIFO Bestcomm task
  284. *
  285. * Only used when receiving data.
  286. */
  287. static irqreturn_t mpc52xx_lpbfifo_bcom_irq(int irq, void *dev_id)
  288. {
  289. struct mpc52xx_lpbfifo_request *req;
  290. unsigned long flags;
  291. u32 status;
  292. u32 ts;
  293. spin_lock_irqsave(&lpbfifo.lock, flags);
  294. ts = get_tbl();
  295. req = lpbfifo.req;
  296. if (!req || (req->flags & MPC52XX_LPBFIFO_FLAG_NO_DMA)) {
  297. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  298. return IRQ_HANDLED;
  299. }
  300. if (irq != 0) /* don't increment on polled case */
  301. req->irq_count++;
  302. if (!bcom_buffer_done(lpbfifo.bcom_cur_task)) {
  303. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  304. req->buffer_not_done_cnt++;
  305. if ((req->buffer_not_done_cnt % 1000) == 0)
  306. pr_err("transfer stalled\n");
  307. return IRQ_HANDLED;
  308. }
  309. bcom_retrieve_buffer(lpbfifo.bcom_cur_task, &status, NULL);
  310. req->last_byte = ((u8 *)req->data)[req->size - 1];
  311. req->pos = status & 0x00ffffff;
  312. /* Mark the FIFO as idle */
  313. lpbfifo.req = NULL;
  314. /* Release the lock before calling out to the callback. */
  315. req->irq_ticks += get_tbl() - ts;
  316. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  317. if (req->callback)
  318. req->callback(req);
  319. return IRQ_HANDLED;
  320. }
  321. /**
  322. * mpc52xx_lpbfifo_bcom_poll - Poll for DMA completion
  323. */
  324. void mpc52xx_lpbfifo_poll(void)
  325. {
  326. struct mpc52xx_lpbfifo_request *req = lpbfifo.req;
  327. int dma = !(req->flags & MPC52XX_LPBFIFO_FLAG_NO_DMA);
  328. int write = req->flags & MPC52XX_LPBFIFO_FLAG_WRITE;
  329. /*
  330. * For more information, see comments on the "Fat Lady"
  331. */
  332. if (dma && write)
  333. mpc52xx_lpbfifo_irq(0, NULL);
  334. else
  335. mpc52xx_lpbfifo_bcom_irq(0, NULL);
  336. }
  337. EXPORT_SYMBOL(mpc52xx_lpbfifo_poll);
  338. /**
  339. * mpc52xx_lpbfifo_submit - Submit an LPB FIFO transfer request.
  340. * @req: Pointer to request structure
  341. */
  342. int mpc52xx_lpbfifo_submit(struct mpc52xx_lpbfifo_request *req)
  343. {
  344. unsigned long flags;
  345. if (!lpbfifo.regs)
  346. return -ENODEV;
  347. spin_lock_irqsave(&lpbfifo.lock, flags);
  348. /* If the req pointer is already set, then a transfer is in progress */
  349. if (lpbfifo.req) {
  350. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  351. return -EBUSY;
  352. }
  353. /* Setup the transfer */
  354. lpbfifo.req = req;
  355. req->irq_count = 0;
  356. req->irq_ticks = 0;
  357. req->buffer_not_done_cnt = 0;
  358. req->pos = 0;
  359. mpc52xx_lpbfifo_kick(req);
  360. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  361. return 0;
  362. }
  363. EXPORT_SYMBOL(mpc52xx_lpbfifo_submit);
  364. int mpc52xx_lpbfifo_start_xfer(struct mpc52xx_lpbfifo_request *req)
  365. {
  366. unsigned long flags;
  367. if (!lpbfifo.regs)
  368. return -ENODEV;
  369. spin_lock_irqsave(&lpbfifo.lock, flags);
  370. /*
  371. * If the req pointer is already set and a transfer was
  372. * started on submit, then this transfer is in progress
  373. */
  374. if (lpbfifo.req && !lpbfifo.req->defer_xfer_start) {
  375. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  376. return -EBUSY;
  377. }
  378. /*
  379. * If the req was previously submitted but not
  380. * started, start it now
  381. */
  382. if (lpbfifo.req && lpbfifo.req == req &&
  383. lpbfifo.req->defer_xfer_start) {
  384. out_8(lpbfifo.regs + LPBFIFO_REG_PACKET_SIZE, 0x01);
  385. }
  386. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  387. return 0;
  388. }
  389. EXPORT_SYMBOL(mpc52xx_lpbfifo_start_xfer);
  390. void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req)
  391. {
  392. unsigned long flags;
  393. spin_lock_irqsave(&lpbfifo.lock, flags);
  394. if (lpbfifo.req == req) {
  395. /* Put it into reset and clear the state */
  396. bcom_gen_bd_rx_reset(lpbfifo.bcom_rx_task);
  397. bcom_gen_bd_tx_reset(lpbfifo.bcom_tx_task);
  398. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, 0x01010000);
  399. lpbfifo.req = NULL;
  400. }
  401. spin_unlock_irqrestore(&lpbfifo.lock, flags);
  402. }
  403. EXPORT_SYMBOL(mpc52xx_lpbfifo_abort);
  404. static int mpc52xx_lpbfifo_probe(struct platform_device *op)
  405. {
  406. struct resource res;
  407. int rc = -ENOMEM;
  408. if (lpbfifo.dev != NULL)
  409. return -ENOSPC;
  410. lpbfifo.irq = irq_of_parse_and_map(op->dev.of_node, 0);
  411. if (!lpbfifo.irq)
  412. return -ENODEV;
  413. if (of_address_to_resource(op->dev.of_node, 0, &res))
  414. return -ENODEV;
  415. lpbfifo.regs_phys = res.start;
  416. lpbfifo.regs = of_iomap(op->dev.of_node, 0);
  417. if (!lpbfifo.regs)
  418. return -ENOMEM;
  419. spin_lock_init(&lpbfifo.lock);
  420. /* Put FIFO into reset */
  421. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, 0x01010000);
  422. /* Register the interrupt handler */
  423. rc = request_irq(lpbfifo.irq, mpc52xx_lpbfifo_irq, 0,
  424. "mpc52xx-lpbfifo", &lpbfifo);
  425. if (rc)
  426. goto err_irq;
  427. /* Request the Bestcomm receive (fifo --> memory) task and IRQ */
  428. lpbfifo.bcom_rx_task =
  429. bcom_gen_bd_rx_init(2, res.start + LPBFIFO_REG_FIFO_DATA,
  430. BCOM_INITIATOR_SCLPC, BCOM_IPR_SCLPC,
  431. 16*1024*1024);
  432. if (!lpbfifo.bcom_rx_task)
  433. goto err_bcom_rx;
  434. rc = request_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task),
  435. mpc52xx_lpbfifo_bcom_irq, 0,
  436. "mpc52xx-lpbfifo-rx", &lpbfifo);
  437. if (rc)
  438. goto err_bcom_rx_irq;
  439. lpbfifo.dma_irqs_enabled = 1;
  440. /* Request the Bestcomm transmit (memory --> fifo) task and IRQ */
  441. lpbfifo.bcom_tx_task =
  442. bcom_gen_bd_tx_init(2, res.start + LPBFIFO_REG_FIFO_DATA,
  443. BCOM_INITIATOR_SCLPC, BCOM_IPR_SCLPC);
  444. if (!lpbfifo.bcom_tx_task)
  445. goto err_bcom_tx;
  446. lpbfifo.dev = &op->dev;
  447. return 0;
  448. err_bcom_tx:
  449. free_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task), &lpbfifo);
  450. err_bcom_rx_irq:
  451. bcom_gen_bd_rx_release(lpbfifo.bcom_rx_task);
  452. err_bcom_rx:
  453. err_irq:
  454. iounmap(lpbfifo.regs);
  455. lpbfifo.regs = NULL;
  456. dev_err(&op->dev, "mpc52xx_lpbfifo_probe() failed\n");
  457. return -ENODEV;
  458. }
  459. static int mpc52xx_lpbfifo_remove(struct platform_device *op)
  460. {
  461. if (lpbfifo.dev != &op->dev)
  462. return 0;
  463. /* Put FIFO in reset */
  464. out_be32(lpbfifo.regs + LPBFIFO_REG_ENABLE, 0x01010000);
  465. /* Release the bestcomm transmit task */
  466. free_irq(bcom_get_task_irq(lpbfifo.bcom_tx_task), &lpbfifo);
  467. bcom_gen_bd_tx_release(lpbfifo.bcom_tx_task);
  468. /* Release the bestcomm receive task */
  469. free_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task), &lpbfifo);
  470. bcom_gen_bd_rx_release(lpbfifo.bcom_rx_task);
  471. free_irq(lpbfifo.irq, &lpbfifo);
  472. iounmap(lpbfifo.regs);
  473. lpbfifo.regs = NULL;
  474. lpbfifo.dev = NULL;
  475. return 0;
  476. }
  477. static const struct of_device_id mpc52xx_lpbfifo_match[] = {
  478. { .compatible = "fsl,mpc5200-lpbfifo", },
  479. {},
  480. };
  481. MODULE_DEVICE_TABLE(of, mpc52xx_lpbfifo_match);
  482. static struct platform_driver mpc52xx_lpbfifo_driver = {
  483. .driver = {
  484. .name = "mpc52xx-lpbfifo",
  485. .of_match_table = mpc52xx_lpbfifo_match,
  486. },
  487. .probe = mpc52xx_lpbfifo_probe,
  488. .remove = mpc52xx_lpbfifo_remove,
  489. };
  490. module_platform_driver(mpc52xx_lpbfifo_driver);