mpc52xx_psc_spi.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. /*
  2. * MPC52xx SPC in SPI mode driver.
  3. *
  4. * Maintainer: Dragos Carp
  5. *
  6. * Copyright (C) 2006 TOPTICA Photonics AG.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. */
  13. #include <linux/module.h>
  14. #include <linux/init.h>
  15. #include <linux/errno.h>
  16. #include <linux/interrupt.h>
  17. #if defined(CONFIG_PPC_MERGE)
  18. #include <asm/of_platform.h>
  19. #else
  20. #include <linux/platform_device.h>
  21. #endif
  22. #include <linux/workqueue.h>
  23. #include <linux/completion.h>
  24. #include <linux/io.h>
  25. #include <linux/delay.h>
  26. #include <linux/spi/spi.h>
  27. #include <linux/fsl_devices.h>
  28. #include <asm/mpc52xx.h>
  29. #include <asm/mpc52xx_psc.h>
  30. #define MCLK 20000000 /* PSC port MClk in hz */
  31. struct mpc52xx_psc_spi {
  32. /* fsl_spi_platform data */
  33. void (*activate_cs)(u8, u8);
  34. void (*deactivate_cs)(u8, u8);
  35. u32 sysclk;
  36. /* driver internal data */
  37. struct mpc52xx_psc __iomem *psc;
  38. struct mpc52xx_psc_fifo __iomem *fifo;
  39. unsigned int irq;
  40. u8 bits_per_word;
  41. u8 busy;
  42. struct workqueue_struct *workqueue;
  43. struct work_struct work;
  44. struct list_head queue;
  45. spinlock_t lock;
  46. struct completion done;
  47. };
  48. /* controller state */
  49. struct mpc52xx_psc_spi_cs {
  50. int bits_per_word;
  51. int speed_hz;
  52. };
  53. /* set clock freq, clock ramp, bits per work
  54. * if t is NULL then reset the values to the default values
  55. */
  56. static int mpc52xx_psc_spi_transfer_setup(struct spi_device *spi,
  57. struct spi_transfer *t)
  58. {
  59. struct mpc52xx_psc_spi_cs *cs = spi->controller_state;
  60. cs->speed_hz = (t && t->speed_hz)
  61. ? t->speed_hz : spi->max_speed_hz;
  62. cs->bits_per_word = (t && t->bits_per_word)
  63. ? t->bits_per_word : spi->bits_per_word;
  64. cs->bits_per_word = ((cs->bits_per_word + 7) / 8) * 8;
  65. return 0;
  66. }
  67. static void mpc52xx_psc_spi_activate_cs(struct spi_device *spi)
  68. {
  69. struct mpc52xx_psc_spi_cs *cs = spi->controller_state;
  70. struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
  71. struct mpc52xx_psc __iomem *psc = mps->psc;
  72. u32 sicr;
  73. u16 ccr;
  74. sicr = in_be32(&psc->sicr);
  75. /* Set clock phase and polarity */
  76. if (spi->mode & SPI_CPHA)
  77. sicr |= 0x00001000;
  78. else
  79. sicr &= ~0x00001000;
  80. if (spi->mode & SPI_CPOL)
  81. sicr |= 0x00002000;
  82. else
  83. sicr &= ~0x00002000;
  84. if (spi->mode & SPI_LSB_FIRST)
  85. sicr |= 0x10000000;
  86. else
  87. sicr &= ~0x10000000;
  88. out_be32(&psc->sicr, sicr);
  89. /* Set clock frequency and bits per word
  90. * Because psc->ccr is defined as 16bit register instead of 32bit
  91. * just set the lower byte of BitClkDiv
  92. */
  93. ccr = in_be16(&psc->ccr);
  94. ccr &= 0xFF00;
  95. if (cs->speed_hz)
  96. ccr |= (MCLK / cs->speed_hz - 1) & 0xFF;
  97. else /* by default SPI Clk 1MHz */
  98. ccr |= (MCLK / 1000000 - 1) & 0xFF;
  99. out_be16(&psc->ccr, ccr);
  100. mps->bits_per_word = cs->bits_per_word;
  101. if (mps->activate_cs)
  102. mps->activate_cs(spi->chip_select,
  103. (spi->mode & SPI_CS_HIGH) ? 1 : 0);
  104. }
  105. static void mpc52xx_psc_spi_deactivate_cs(struct spi_device *spi)
  106. {
  107. struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
  108. if (mps->deactivate_cs)
  109. mps->deactivate_cs(spi->chip_select,
  110. (spi->mode & SPI_CS_HIGH) ? 1 : 0);
  111. }
  112. #define MPC52xx_PSC_BUFSIZE (MPC52xx_PSC_RFNUM_MASK + 1)
  113. /* wake up when 80% fifo full */
  114. #define MPC52xx_PSC_RFALARM (MPC52xx_PSC_BUFSIZE * 20 / 100)
  115. static int mpc52xx_psc_spi_transfer_rxtx(struct spi_device *spi,
  116. struct spi_transfer *t)
  117. {
  118. struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
  119. struct mpc52xx_psc __iomem *psc = mps->psc;
  120. struct mpc52xx_psc_fifo __iomem *fifo = mps->fifo;
  121. unsigned rb = 0; /* number of bytes receieved */
  122. unsigned sb = 0; /* number of bytes sent */
  123. unsigned char *rx_buf = (unsigned char *)t->rx_buf;
  124. unsigned char *tx_buf = (unsigned char *)t->tx_buf;
  125. unsigned rfalarm;
  126. unsigned send_at_once = MPC52xx_PSC_BUFSIZE;
  127. unsigned recv_at_once;
  128. unsigned bpw = mps->bits_per_word / 8;
  129. if (!t->tx_buf && !t->rx_buf && t->len)
  130. return -EINVAL;
  131. /* enable transmiter/receiver */
  132. out_8(&psc->command, MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE);
  133. while (rb < t->len) {
  134. if (t->len - rb > MPC52xx_PSC_BUFSIZE) {
  135. rfalarm = MPC52xx_PSC_RFALARM;
  136. } else {
  137. send_at_once = t->len - sb;
  138. rfalarm = MPC52xx_PSC_BUFSIZE - (t->len - rb);
  139. }
  140. dev_dbg(&spi->dev, "send %d bytes...\n", send_at_once);
  141. if (tx_buf) {
  142. for (; send_at_once; sb++, send_at_once--) {
  143. /* set EOF flag */
  144. if (mps->bits_per_word
  145. && (sb + 1) % bpw == 0)
  146. out_8(&psc->ircr2, 0x01);
  147. out_8(&psc->mpc52xx_psc_buffer_8, tx_buf[sb]);
  148. }
  149. } else {
  150. for (; send_at_once; sb++, send_at_once--) {
  151. /* set EOF flag */
  152. if (mps->bits_per_word
  153. && ((sb + 1) % bpw) == 0)
  154. out_8(&psc->ircr2, 0x01);
  155. out_8(&psc->mpc52xx_psc_buffer_8, 0);
  156. }
  157. }
  158. /* enable interrupts and wait for wake up
  159. * if just one byte is expected the Rx FIFO genererates no
  160. * FFULL interrupt, so activate the RxRDY interrupt
  161. */
  162. out_8(&psc->command, MPC52xx_PSC_SEL_MODE_REG_1);
  163. if (t->len - rb == 1) {
  164. out_8(&psc->mode, 0);
  165. } else {
  166. out_8(&psc->mode, MPC52xx_PSC_MODE_FFULL);
  167. out_be16(&fifo->rfalarm, rfalarm);
  168. }
  169. out_be16(&psc->mpc52xx_psc_imr, MPC52xx_PSC_IMR_RXRDY);
  170. wait_for_completion(&mps->done);
  171. recv_at_once = in_be16(&fifo->rfnum);
  172. dev_dbg(&spi->dev, "%d bytes received\n", recv_at_once);
  173. send_at_once = recv_at_once;
  174. if (rx_buf) {
  175. for (; recv_at_once; rb++, recv_at_once--)
  176. rx_buf[rb] = in_8(&psc->mpc52xx_psc_buffer_8);
  177. } else {
  178. for (; recv_at_once; rb++, recv_at_once--)
  179. in_8(&psc->mpc52xx_psc_buffer_8);
  180. }
  181. }
  182. /* disable transmiter/receiver */
  183. out_8(&psc->command, MPC52xx_PSC_TX_DISABLE | MPC52xx_PSC_RX_DISABLE);
  184. return 0;
  185. }
  186. static void mpc52xx_psc_spi_work(struct work_struct *work)
  187. {
  188. struct mpc52xx_psc_spi *mps =
  189. container_of(work, struct mpc52xx_psc_spi, work);
  190. spin_lock_irq(&mps->lock);
  191. mps->busy = 1;
  192. while (!list_empty(&mps->queue)) {
  193. struct spi_message *m;
  194. struct spi_device *spi;
  195. struct spi_transfer *t = NULL;
  196. unsigned cs_change;
  197. int status;
  198. m = container_of(mps->queue.next, struct spi_message, queue);
  199. list_del_init(&m->queue);
  200. spin_unlock_irq(&mps->lock);
  201. spi = m->spi;
  202. cs_change = 1;
  203. status = 0;
  204. list_for_each_entry (t, &m->transfers, transfer_list) {
  205. if (t->bits_per_word || t->speed_hz) {
  206. status = mpc52xx_psc_spi_transfer_setup(spi, t);
  207. if (status < 0)
  208. break;
  209. }
  210. if (cs_change)
  211. mpc52xx_psc_spi_activate_cs(spi);
  212. cs_change = t->cs_change;
  213. status = mpc52xx_psc_spi_transfer_rxtx(spi, t);
  214. if (status)
  215. break;
  216. m->actual_length += t->len;
  217. if (t->delay_usecs)
  218. udelay(t->delay_usecs);
  219. if (cs_change)
  220. mpc52xx_psc_spi_deactivate_cs(spi);
  221. }
  222. m->status = status;
  223. m->complete(m->context);
  224. if (status || !cs_change)
  225. mpc52xx_psc_spi_deactivate_cs(spi);
  226. mpc52xx_psc_spi_transfer_setup(spi, NULL);
  227. spin_lock_irq(&mps->lock);
  228. }
  229. mps->busy = 0;
  230. spin_unlock_irq(&mps->lock);
  231. }
  232. /* the spi->mode bits understood by this driver: */
  233. #define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST)
  234. static int mpc52xx_psc_spi_setup(struct spi_device *spi)
  235. {
  236. struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
  237. struct mpc52xx_psc_spi_cs *cs = spi->controller_state;
  238. unsigned long flags;
  239. if (spi->bits_per_word%8)
  240. return -EINVAL;
  241. if (spi->mode & ~MODEBITS) {
  242. dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
  243. spi->mode & ~MODEBITS);
  244. return -EINVAL;
  245. }
  246. if (!cs) {
  247. cs = kzalloc(sizeof *cs, GFP_KERNEL);
  248. if (!cs)
  249. return -ENOMEM;
  250. spi->controller_state = cs;
  251. }
  252. cs->bits_per_word = spi->bits_per_word;
  253. cs->speed_hz = spi->max_speed_hz;
  254. spin_lock_irqsave(&mps->lock, flags);
  255. if (!mps->busy)
  256. mpc52xx_psc_spi_deactivate_cs(spi);
  257. spin_unlock_irqrestore(&mps->lock, flags);
  258. return 0;
  259. }
  260. static int mpc52xx_psc_spi_transfer(struct spi_device *spi,
  261. struct spi_message *m)
  262. {
  263. struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
  264. unsigned long flags;
  265. m->actual_length = 0;
  266. m->status = -EINPROGRESS;
  267. spin_lock_irqsave(&mps->lock, flags);
  268. list_add_tail(&m->queue, &mps->queue);
  269. queue_work(mps->workqueue, &mps->work);
  270. spin_unlock_irqrestore(&mps->lock, flags);
  271. return 0;
  272. }
  273. static void mpc52xx_psc_spi_cleanup(struct spi_device *spi)
  274. {
  275. kfree(spi->controller_state);
  276. }
  277. static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
  278. {
  279. struct mpc52xx_psc __iomem *psc = mps->psc;
  280. struct mpc52xx_psc_fifo __iomem *fifo = mps->fifo;
  281. u32 mclken_div;
  282. int ret = 0;
  283. /* default sysclk is 512MHz */
  284. mclken_div = (mps->sysclk ? mps->sysclk : 512000000) / MCLK;
  285. mpc52xx_set_psc_clkdiv(psc_id, mclken_div);
  286. /* Reset the PSC into a known state */
  287. out_8(&psc->command, MPC52xx_PSC_RST_RX);
  288. out_8(&psc->command, MPC52xx_PSC_RST_TX);
  289. out_8(&psc->command, MPC52xx_PSC_TX_DISABLE | MPC52xx_PSC_RX_DISABLE);
  290. /* Disable interrupts, interrupts are based on alarm level */
  291. out_be16(&psc->mpc52xx_psc_imr, 0);
  292. out_8(&psc->command, MPC52xx_PSC_SEL_MODE_REG_1);
  293. out_8(&fifo->rfcntl, 0);
  294. out_8(&psc->mode, MPC52xx_PSC_MODE_FFULL);
  295. /* Configure 8bit codec mode as a SPI master and use EOF flags */
  296. /* SICR_SIM_CODEC8|SICR_GENCLK|SICR_SPI|SICR_MSTR|SICR_USEEOF */
  297. out_be32(&psc->sicr, 0x0180C800);
  298. out_be16(&psc->ccr, 0x070F); /* by default SPI Clk 1MHz */
  299. /* Set 2ms DTL delay */
  300. out_8(&psc->ctur, 0x00);
  301. out_8(&psc->ctlr, 0x84);
  302. mps->bits_per_word = 8;
  303. return ret;
  304. }
  305. static irqreturn_t mpc52xx_psc_spi_isr(int irq, void *dev_id)
  306. {
  307. struct mpc52xx_psc_spi *mps = (struct mpc52xx_psc_spi *)dev_id;
  308. struct mpc52xx_psc __iomem *psc = mps->psc;
  309. /* disable interrupt and wake up the work queue */
  310. if (in_be16(&psc->mpc52xx_psc_isr) & MPC52xx_PSC_IMR_RXRDY) {
  311. out_be16(&psc->mpc52xx_psc_imr, 0);
  312. complete(&mps->done);
  313. return IRQ_HANDLED;
  314. }
  315. return IRQ_NONE;
  316. }
  317. /* bus_num is used only for the case dev->platform_data == NULL */
  318. static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
  319. u32 size, unsigned int irq, s16 bus_num)
  320. {
  321. struct fsl_spi_platform_data *pdata = dev->platform_data;
  322. struct mpc52xx_psc_spi *mps;
  323. struct spi_master *master;
  324. int ret;
  325. master = spi_alloc_master(dev, sizeof *mps);
  326. if (master == NULL)
  327. return -ENOMEM;
  328. dev_set_drvdata(dev, master);
  329. mps = spi_master_get_devdata(master);
  330. mps->irq = irq;
  331. if (pdata == NULL) {
  332. dev_warn(dev, "probe called without platform data, no "
  333. "(de)activate_cs function will be called\n");
  334. mps->activate_cs = NULL;
  335. mps->deactivate_cs = NULL;
  336. mps->sysclk = 0;
  337. master->bus_num = bus_num;
  338. master->num_chipselect = 255;
  339. } else {
  340. mps->activate_cs = pdata->activate_cs;
  341. mps->deactivate_cs = pdata->deactivate_cs;
  342. mps->sysclk = pdata->sysclk;
  343. master->bus_num = pdata->bus_num;
  344. master->num_chipselect = pdata->max_chipselect;
  345. }
  346. master->setup = mpc52xx_psc_spi_setup;
  347. master->transfer = mpc52xx_psc_spi_transfer;
  348. master->cleanup = mpc52xx_psc_spi_cleanup;
  349. mps->psc = ioremap(regaddr, size);
  350. if (!mps->psc) {
  351. dev_err(dev, "could not ioremap I/O port range\n");
  352. ret = -EFAULT;
  353. goto free_master;
  354. }
  355. /* On the 5200, fifo regs are immediately ajacent to the psc regs */
  356. mps->fifo = ((void __iomem *)mps->psc) + sizeof(struct mpc52xx_psc);
  357. ret = request_irq(mps->irq, mpc52xx_psc_spi_isr, 0, "mpc52xx-psc-spi",
  358. mps);
  359. if (ret)
  360. goto free_master;
  361. ret = mpc52xx_psc_spi_port_config(master->bus_num, mps);
  362. if (ret < 0)
  363. goto free_irq;
  364. spin_lock_init(&mps->lock);
  365. init_completion(&mps->done);
  366. INIT_WORK(&mps->work, mpc52xx_psc_spi_work);
  367. INIT_LIST_HEAD(&mps->queue);
  368. mps->workqueue = create_singlethread_workqueue(
  369. master->dev.parent->bus_id);
  370. if (mps->workqueue == NULL) {
  371. ret = -EBUSY;
  372. goto free_irq;
  373. }
  374. ret = spi_register_master(master);
  375. if (ret < 0)
  376. goto unreg_master;
  377. return ret;
  378. unreg_master:
  379. destroy_workqueue(mps->workqueue);
  380. free_irq:
  381. free_irq(mps->irq, mps);
  382. free_master:
  383. if (mps->psc)
  384. iounmap(mps->psc);
  385. spi_master_put(master);
  386. return ret;
  387. }
  388. static int __exit mpc52xx_psc_spi_do_remove(struct device *dev)
  389. {
  390. struct spi_master *master = dev_get_drvdata(dev);
  391. struct mpc52xx_psc_spi *mps = spi_master_get_devdata(master);
  392. flush_workqueue(mps->workqueue);
  393. destroy_workqueue(mps->workqueue);
  394. spi_unregister_master(master);
  395. free_irq(mps->irq, mps);
  396. if (mps->psc)
  397. iounmap(mps->psc);
  398. return 0;
  399. }
  400. #if !defined(CONFIG_PPC_MERGE)
  401. static int __init mpc52xx_psc_spi_probe(struct platform_device *dev)
  402. {
  403. switch(dev->id) {
  404. case 1:
  405. case 2:
  406. case 3:
  407. case 6:
  408. return mpc52xx_psc_spi_do_probe(&dev->dev,
  409. MPC52xx_PA(MPC52xx_PSCx_OFFSET(dev->id)),
  410. MPC52xx_PSC_SIZE, platform_get_irq(dev, 0), dev->id);
  411. default:
  412. return -EINVAL;
  413. }
  414. }
  415. static int __exit mpc52xx_psc_spi_remove(struct platform_device *dev)
  416. {
  417. return mpc52xx_psc_spi_do_remove(&dev->dev);
  418. }
  419. /* work with hotplug and coldplug */
  420. MODULE_ALIAS("platform:mpc52xx-psc-spi");
  421. static struct platform_driver mpc52xx_psc_spi_platform_driver = {
  422. .remove = __exit_p(mpc52xx_psc_spi_remove),
  423. .driver = {
  424. .name = "mpc52xx-psc-spi",
  425. .owner = THIS_MODULE,
  426. },
  427. };
  428. static int __init mpc52xx_psc_spi_init(void)
  429. {
  430. return platform_driver_probe(&mpc52xx_psc_spi_platform_driver,
  431. mpc52xx_psc_spi_probe);
  432. }
  433. module_init(mpc52xx_psc_spi_init);
  434. static void __exit mpc52xx_psc_spi_exit(void)
  435. {
  436. platform_driver_unregister(&mpc52xx_psc_spi_platform_driver);
  437. }
  438. module_exit(mpc52xx_psc_spi_exit);
  439. #else /* defined(CONFIG_PPC_MERGE) */
  440. static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
  441. const struct of_device_id *match)
  442. {
  443. const u32 *regaddr_p;
  444. u64 regaddr64, size64;
  445. s16 id = -1;
  446. regaddr_p = of_get_address(op->node, 0, &size64, NULL);
  447. if (!regaddr_p) {
  448. printk(KERN_ERR "Invalid PSC address\n");
  449. return -EINVAL;
  450. }
  451. regaddr64 = of_translate_address(op->node, regaddr_p);
  452. /* get PSC id (1..6, used by port_config) */
  453. if (op->dev.platform_data == NULL) {
  454. const u32 *psc_nump;
  455. psc_nump = of_get_property(op->node, "cell-index", NULL);
  456. if (!psc_nump || *psc_nump > 5) {
  457. printk(KERN_ERR "mpc52xx_psc_spi: Device node %s has invalid "
  458. "cell-index property\n", op->node->full_name);
  459. return -EINVAL;
  460. }
  461. id = *psc_nump + 1;
  462. }
  463. return mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64,
  464. irq_of_parse_and_map(op->node, 0), id);
  465. }
  466. static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op)
  467. {
  468. return mpc52xx_psc_spi_do_remove(&op->dev);
  469. }
  470. static struct of_device_id mpc52xx_psc_spi_of_match[] = {
  471. { .compatible = "fsl,mpc5200-psc-spi", },
  472. { .compatible = "mpc5200-psc-spi", }, /* old */
  473. {}
  474. };
  475. MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match);
  476. static struct of_platform_driver mpc52xx_psc_spi_of_driver = {
  477. .owner = THIS_MODULE,
  478. .name = "mpc52xx-psc-spi",
  479. .match_table = mpc52xx_psc_spi_of_match,
  480. .probe = mpc52xx_psc_spi_of_probe,
  481. .remove = __exit_p(mpc52xx_psc_spi_of_remove),
  482. .driver = {
  483. .name = "mpc52xx-psc-spi",
  484. .owner = THIS_MODULE,
  485. },
  486. };
  487. static int __init mpc52xx_psc_spi_init(void)
  488. {
  489. return of_register_platform_driver(&mpc52xx_psc_spi_of_driver);
  490. }
  491. module_init(mpc52xx_psc_spi_init);
  492. static void __exit mpc52xx_psc_spi_exit(void)
  493. {
  494. of_unregister_platform_driver(&mpc52xx_psc_spi_of_driver);
  495. }
  496. module_exit(mpc52xx_psc_spi_exit);
  497. #endif /* defined(CONFIG_PPC_MERGE) */
  498. MODULE_AUTHOR("Dragos Carp");
  499. MODULE_DESCRIPTION("MPC52xx PSC SPI Driver");
  500. MODULE_LICENSE("GPL");