spi-s3c24xx.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. /*
  2. * Copyright (c) 2006 Ben Dooks
  3. * Copyright 2006-2009 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  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. */
  11. #include <linux/spinlock.h>
  12. #include <linux/interrupt.h>
  13. #include <linux/delay.h>
  14. #include <linux/errno.h>
  15. #include <linux/err.h>
  16. #include <linux/clk.h>
  17. #include <linux/platform_device.h>
  18. #include <linux/gpio.h>
  19. #include <linux/io.h>
  20. #include <linux/slab.h>
  21. #include <linux/spi/spi.h>
  22. #include <linux/spi/spi_bitbang.h>
  23. #include <linux/spi/s3c24xx.h>
  24. #include <linux/module.h>
  25. #include <plat/regs-spi.h>
  26. #include <asm/fiq.h>
  27. #include "spi-s3c24xx-fiq.h"
  28. /**
  29. * s3c24xx_spi_devstate - per device data
  30. * @hz: Last frequency calculated for @sppre field.
  31. * @mode: Last mode setting for the @spcon field.
  32. * @spcon: Value to write to the SPCON register.
  33. * @sppre: Value to write to the SPPRE register.
  34. */
  35. struct s3c24xx_spi_devstate {
  36. unsigned int hz;
  37. unsigned int mode;
  38. u8 spcon;
  39. u8 sppre;
  40. };
  41. enum spi_fiq_mode {
  42. FIQ_MODE_NONE = 0,
  43. FIQ_MODE_TX = 1,
  44. FIQ_MODE_RX = 2,
  45. FIQ_MODE_TXRX = 3,
  46. };
  47. struct s3c24xx_spi {
  48. /* bitbang has to be first */
  49. struct spi_bitbang bitbang;
  50. struct completion done;
  51. void __iomem *regs;
  52. int irq;
  53. int len;
  54. int count;
  55. struct fiq_handler fiq_handler;
  56. enum spi_fiq_mode fiq_mode;
  57. unsigned char fiq_inuse;
  58. unsigned char fiq_claimed;
  59. void (*set_cs)(struct s3c2410_spi_info *spi,
  60. int cs, int pol);
  61. /* data buffers */
  62. const unsigned char *tx;
  63. unsigned char *rx;
  64. struct clk *clk;
  65. struct spi_master *master;
  66. struct spi_device *curdev;
  67. struct device *dev;
  68. struct s3c2410_spi_info *pdata;
  69. };
  70. #define SPCON_DEFAULT (S3C2410_SPCON_MSTR | S3C2410_SPCON_SMOD_INT)
  71. #define SPPIN_DEFAULT (S3C2410_SPPIN_KEEP)
  72. static inline struct s3c24xx_spi *to_hw(struct spi_device *sdev)
  73. {
  74. return spi_master_get_devdata(sdev->master);
  75. }
  76. static void s3c24xx_spi_gpiocs(struct s3c2410_spi_info *spi, int cs, int pol)
  77. {
  78. gpio_set_value(spi->pin_cs, pol);
  79. }
  80. static void s3c24xx_spi_chipsel(struct spi_device *spi, int value)
  81. {
  82. struct s3c24xx_spi_devstate *cs = spi->controller_state;
  83. struct s3c24xx_spi *hw = to_hw(spi);
  84. unsigned int cspol = spi->mode & SPI_CS_HIGH ? 1 : 0;
  85. /* change the chipselect state and the state of the spi engine clock */
  86. switch (value) {
  87. case BITBANG_CS_INACTIVE:
  88. hw->set_cs(hw->pdata, spi->chip_select, cspol^1);
  89. writeb(cs->spcon, hw->regs + S3C2410_SPCON);
  90. break;
  91. case BITBANG_CS_ACTIVE:
  92. writeb(cs->spcon | S3C2410_SPCON_ENSCK,
  93. hw->regs + S3C2410_SPCON);
  94. hw->set_cs(hw->pdata, spi->chip_select, cspol);
  95. break;
  96. }
  97. }
  98. static int s3c24xx_spi_update_state(struct spi_device *spi,
  99. struct spi_transfer *t)
  100. {
  101. struct s3c24xx_spi *hw = to_hw(spi);
  102. struct s3c24xx_spi_devstate *cs = spi->controller_state;
  103. unsigned int hz;
  104. unsigned int div;
  105. unsigned long clk;
  106. hz = t ? t->speed_hz : spi->max_speed_hz;
  107. if (!hz)
  108. hz = spi->max_speed_hz;
  109. if (spi->mode != cs->mode) {
  110. u8 spcon = SPCON_DEFAULT | S3C2410_SPCON_ENSCK;
  111. if (spi->mode & SPI_CPHA)
  112. spcon |= S3C2410_SPCON_CPHA_FMTB;
  113. if (spi->mode & SPI_CPOL)
  114. spcon |= S3C2410_SPCON_CPOL_HIGH;
  115. cs->mode = spi->mode;
  116. cs->spcon = spcon;
  117. }
  118. if (cs->hz != hz) {
  119. clk = clk_get_rate(hw->clk);
  120. div = DIV_ROUND_UP(clk, hz * 2) - 1;
  121. if (div > 255)
  122. div = 255;
  123. dev_dbg(&spi->dev, "pre-scaler=%d (wanted %d, got %ld)\n",
  124. div, hz, clk / (2 * (div + 1)));
  125. cs->hz = hz;
  126. cs->sppre = div;
  127. }
  128. return 0;
  129. }
  130. static int s3c24xx_spi_setupxfer(struct spi_device *spi,
  131. struct spi_transfer *t)
  132. {
  133. struct s3c24xx_spi_devstate *cs = spi->controller_state;
  134. struct s3c24xx_spi *hw = to_hw(spi);
  135. int ret;
  136. ret = s3c24xx_spi_update_state(spi, t);
  137. if (!ret)
  138. writeb(cs->sppre, hw->regs + S3C2410_SPPRE);
  139. return ret;
  140. }
  141. static int s3c24xx_spi_setup(struct spi_device *spi)
  142. {
  143. struct s3c24xx_spi_devstate *cs = spi->controller_state;
  144. struct s3c24xx_spi *hw = to_hw(spi);
  145. int ret;
  146. /* allocate settings on the first call */
  147. if (!cs) {
  148. cs = devm_kzalloc(&spi->dev,
  149. sizeof(struct s3c24xx_spi_devstate),
  150. GFP_KERNEL);
  151. if (!cs)
  152. return -ENOMEM;
  153. cs->spcon = SPCON_DEFAULT;
  154. cs->hz = -1;
  155. spi->controller_state = cs;
  156. }
  157. /* initialise the state from the device */
  158. ret = s3c24xx_spi_update_state(spi, NULL);
  159. if (ret)
  160. return ret;
  161. mutex_lock(&hw->bitbang.lock);
  162. if (!hw->bitbang.busy) {
  163. hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE);
  164. /* need to ndelay for 0.5 clocktick ? */
  165. }
  166. mutex_unlock(&hw->bitbang.lock);
  167. return 0;
  168. }
  169. static inline unsigned int hw_txbyte(struct s3c24xx_spi *hw, int count)
  170. {
  171. return hw->tx ? hw->tx[count] : 0;
  172. }
  173. #ifdef CONFIG_SPI_S3C24XX_FIQ
  174. /* Support for FIQ based pseudo-DMA to improve the transfer speed.
  175. *
  176. * This code uses the assembly helper in spi_s3c24xx_spi.S which is
  177. * used by the FIQ core to move data between main memory and the peripheral
  178. * block. Since this is code running on the processor, there is no problem
  179. * with cache coherency of the buffers, so we can use any buffer we like.
  180. */
  181. /**
  182. * struct spi_fiq_code - FIQ code and header
  183. * @length: The length of the code fragment, excluding this header.
  184. * @ack_offset: The offset from @data to the word to place the IRQ ACK bit at.
  185. * @data: The code itself to install as a FIQ handler.
  186. */
  187. struct spi_fiq_code {
  188. u32 length;
  189. u32 ack_offset;
  190. u8 data[0];
  191. };
  192. extern struct spi_fiq_code s3c24xx_spi_fiq_txrx;
  193. extern struct spi_fiq_code s3c24xx_spi_fiq_tx;
  194. extern struct spi_fiq_code s3c24xx_spi_fiq_rx;
  195. /**
  196. * ack_bit - turn IRQ into IRQ acknowledgement bit
  197. * @irq: The interrupt number
  198. *
  199. * Returns the bit to write to the interrupt acknowledge register.
  200. */
  201. static inline u32 ack_bit(unsigned int irq)
  202. {
  203. return 1 << (irq - IRQ_EINT0);
  204. }
  205. /**
  206. * s3c24xx_spi_tryfiq - attempt to claim and setup FIQ for transfer
  207. * @hw: The hardware state.
  208. *
  209. * Claim the FIQ handler (only one can be active at any one time) and
  210. * then setup the correct transfer code for this transfer.
  211. *
  212. * This call updates all the necessary state information if successful,
  213. * so the caller does not need to do anything more than start the transfer
  214. * as normal, since the IRQ will have been re-routed to the FIQ handler.
  215. */
  216. static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
  217. {
  218. struct pt_regs regs;
  219. enum spi_fiq_mode mode;
  220. struct spi_fiq_code *code;
  221. int ret;
  222. if (!hw->fiq_claimed) {
  223. /* try and claim fiq if we haven't got it, and if not
  224. * then return and simply use another transfer method */
  225. ret = claim_fiq(&hw->fiq_handler);
  226. if (ret)
  227. return;
  228. }
  229. if (hw->tx && !hw->rx)
  230. mode = FIQ_MODE_TX;
  231. else if (hw->rx && !hw->tx)
  232. mode = FIQ_MODE_RX;
  233. else
  234. mode = FIQ_MODE_TXRX;
  235. regs.uregs[fiq_rspi] = (long)hw->regs;
  236. regs.uregs[fiq_rrx] = (long)hw->rx;
  237. regs.uregs[fiq_rtx] = (long)hw->tx + 1;
  238. regs.uregs[fiq_rcount] = hw->len - 1;
  239. regs.uregs[fiq_rirq] = (long)S3C24XX_VA_IRQ;
  240. set_fiq_regs(&regs);
  241. if (hw->fiq_mode != mode) {
  242. u32 *ack_ptr;
  243. hw->fiq_mode = mode;
  244. switch (mode) {
  245. case FIQ_MODE_TX:
  246. code = &s3c24xx_spi_fiq_tx;
  247. break;
  248. case FIQ_MODE_RX:
  249. code = &s3c24xx_spi_fiq_rx;
  250. break;
  251. case FIQ_MODE_TXRX:
  252. code = &s3c24xx_spi_fiq_txrx;
  253. break;
  254. default:
  255. code = NULL;
  256. }
  257. BUG_ON(!code);
  258. ack_ptr = (u32 *)&code->data[code->ack_offset];
  259. *ack_ptr = ack_bit(hw->irq);
  260. set_fiq_handler(&code->data, code->length);
  261. }
  262. s3c24xx_set_fiq(hw->irq, true);
  263. hw->fiq_mode = mode;
  264. hw->fiq_inuse = 1;
  265. }
  266. /**
  267. * s3c24xx_spi_fiqop - FIQ core code callback
  268. * @pw: Data registered with the handler
  269. * @release: Whether this is a release or a return.
  270. *
  271. * Called by the FIQ code when another module wants to use the FIQ, so
  272. * return whether we are currently using this or not and then update our
  273. * internal state.
  274. */
  275. static int s3c24xx_spi_fiqop(void *pw, int release)
  276. {
  277. struct s3c24xx_spi *hw = pw;
  278. int ret = 0;
  279. if (release) {
  280. if (hw->fiq_inuse)
  281. ret = -EBUSY;
  282. /* note, we do not need to unroute the FIQ, as the FIQ
  283. * vector code de-routes it to signal the end of transfer */
  284. hw->fiq_mode = FIQ_MODE_NONE;
  285. hw->fiq_claimed = 0;
  286. } else {
  287. hw->fiq_claimed = 1;
  288. }
  289. return ret;
  290. }
  291. /**
  292. * s3c24xx_spi_initfiq - setup the information for the FIQ core
  293. * @hw: The hardware state.
  294. *
  295. * Setup the fiq_handler block to pass to the FIQ core.
  296. */
  297. static inline void s3c24xx_spi_initfiq(struct s3c24xx_spi *hw)
  298. {
  299. hw->fiq_handler.dev_id = hw;
  300. hw->fiq_handler.name = dev_name(hw->dev);
  301. hw->fiq_handler.fiq_op = s3c24xx_spi_fiqop;
  302. }
  303. /**
  304. * s3c24xx_spi_usefiq - return if we should be using FIQ.
  305. * @hw: The hardware state.
  306. *
  307. * Return true if the platform data specifies whether this channel is
  308. * allowed to use the FIQ.
  309. */
  310. static inline bool s3c24xx_spi_usefiq(struct s3c24xx_spi *hw)
  311. {
  312. return hw->pdata->use_fiq;
  313. }
  314. /**
  315. * s3c24xx_spi_usingfiq - return if channel is using FIQ
  316. * @spi: The hardware state.
  317. *
  318. * Return whether the channel is currently using the FIQ (separate from
  319. * whether the FIQ is claimed).
  320. */
  321. static inline bool s3c24xx_spi_usingfiq(struct s3c24xx_spi *spi)
  322. {
  323. return spi->fiq_inuse;
  324. }
  325. #else
  326. static inline void s3c24xx_spi_initfiq(struct s3c24xx_spi *s) { }
  327. static inline void s3c24xx_spi_tryfiq(struct s3c24xx_spi *s) { }
  328. static inline bool s3c24xx_spi_usefiq(struct s3c24xx_spi *s) { return false; }
  329. static inline bool s3c24xx_spi_usingfiq(struct s3c24xx_spi *s) { return false; }
  330. #endif /* CONFIG_SPI_S3C24XX_FIQ */
  331. static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
  332. {
  333. struct s3c24xx_spi *hw = to_hw(spi);
  334. hw->tx = t->tx_buf;
  335. hw->rx = t->rx_buf;
  336. hw->len = t->len;
  337. hw->count = 0;
  338. init_completion(&hw->done);
  339. hw->fiq_inuse = 0;
  340. if (s3c24xx_spi_usefiq(hw) && t->len >= 3)
  341. s3c24xx_spi_tryfiq(hw);
  342. /* send the first byte */
  343. writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
  344. wait_for_completion(&hw->done);
  345. return hw->count;
  346. }
  347. static irqreturn_t s3c24xx_spi_irq(int irq, void *dev)
  348. {
  349. struct s3c24xx_spi *hw = dev;
  350. unsigned int spsta = readb(hw->regs + S3C2410_SPSTA);
  351. unsigned int count = hw->count;
  352. if (spsta & S3C2410_SPSTA_DCOL) {
  353. dev_dbg(hw->dev, "data-collision\n");
  354. complete(&hw->done);
  355. goto irq_done;
  356. }
  357. if (!(spsta & S3C2410_SPSTA_READY)) {
  358. dev_dbg(hw->dev, "spi not ready for tx?\n");
  359. complete(&hw->done);
  360. goto irq_done;
  361. }
  362. if (!s3c24xx_spi_usingfiq(hw)) {
  363. hw->count++;
  364. if (hw->rx)
  365. hw->rx[count] = readb(hw->regs + S3C2410_SPRDAT);
  366. count++;
  367. if (count < hw->len)
  368. writeb(hw_txbyte(hw, count), hw->regs + S3C2410_SPTDAT);
  369. else
  370. complete(&hw->done);
  371. } else {
  372. hw->count = hw->len;
  373. hw->fiq_inuse = 0;
  374. if (hw->rx)
  375. hw->rx[hw->len-1] = readb(hw->regs + S3C2410_SPRDAT);
  376. complete(&hw->done);
  377. }
  378. irq_done:
  379. return IRQ_HANDLED;
  380. }
  381. static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw)
  382. {
  383. /* for the moment, permanently enable the clock */
  384. clk_enable(hw->clk);
  385. /* program defaults into the registers */
  386. writeb(0xff, hw->regs + S3C2410_SPPRE);
  387. writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN);
  388. writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON);
  389. if (hw->pdata) {
  390. if (hw->set_cs == s3c24xx_spi_gpiocs)
  391. gpio_direction_output(hw->pdata->pin_cs, 1);
  392. if (hw->pdata->gpio_setup)
  393. hw->pdata->gpio_setup(hw->pdata, 1);
  394. }
  395. }
  396. static int s3c24xx_spi_probe(struct platform_device *pdev)
  397. {
  398. struct s3c2410_spi_info *pdata;
  399. struct s3c24xx_spi *hw;
  400. struct spi_master *master;
  401. struct resource *res;
  402. int err = 0;
  403. master = spi_alloc_master(&pdev->dev, sizeof(struct s3c24xx_spi));
  404. if (master == NULL) {
  405. dev_err(&pdev->dev, "No memory for spi_master\n");
  406. return -ENOMEM;
  407. }
  408. hw = spi_master_get_devdata(master);
  409. hw->master = master;
  410. hw->pdata = pdata = dev_get_platdata(&pdev->dev);
  411. hw->dev = &pdev->dev;
  412. if (pdata == NULL) {
  413. dev_err(&pdev->dev, "No platform data supplied\n");
  414. err = -ENOENT;
  415. goto err_no_pdata;
  416. }
  417. platform_set_drvdata(pdev, hw);
  418. init_completion(&hw->done);
  419. /* initialise fiq handler */
  420. s3c24xx_spi_initfiq(hw);
  421. /* setup the master state. */
  422. /* the spi->mode bits understood by this driver: */
  423. master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
  424. master->num_chipselect = hw->pdata->num_cs;
  425. master->bus_num = pdata->bus_num;
  426. master->bits_per_word_mask = SPI_BPW_MASK(8);
  427. /* setup the state for the bitbang driver */
  428. hw->bitbang.master = hw->master;
  429. hw->bitbang.setup_transfer = s3c24xx_spi_setupxfer;
  430. hw->bitbang.chipselect = s3c24xx_spi_chipsel;
  431. hw->bitbang.txrx_bufs = s3c24xx_spi_txrx;
  432. hw->master->setup = s3c24xx_spi_setup;
  433. dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang);
  434. /* find and map our resources */
  435. res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  436. hw->regs = devm_ioremap_resource(&pdev->dev, res);
  437. if (IS_ERR(hw->regs)) {
  438. err = PTR_ERR(hw->regs);
  439. goto err_no_pdata;
  440. }
  441. hw->irq = platform_get_irq(pdev, 0);
  442. if (hw->irq < 0) {
  443. dev_err(&pdev->dev, "No IRQ specified\n");
  444. err = -ENOENT;
  445. goto err_no_pdata;
  446. }
  447. err = devm_request_irq(&pdev->dev, hw->irq, s3c24xx_spi_irq, 0,
  448. pdev->name, hw);
  449. if (err) {
  450. dev_err(&pdev->dev, "Cannot claim IRQ\n");
  451. goto err_no_pdata;
  452. }
  453. hw->clk = devm_clk_get(&pdev->dev, "spi");
  454. if (IS_ERR(hw->clk)) {
  455. dev_err(&pdev->dev, "No clock for device\n");
  456. err = PTR_ERR(hw->clk);
  457. goto err_no_pdata;
  458. }
  459. /* setup any gpio we can */
  460. if (!pdata->set_cs) {
  461. if (pdata->pin_cs < 0) {
  462. dev_err(&pdev->dev, "No chipselect pin\n");
  463. err = -EINVAL;
  464. goto err_register;
  465. }
  466. err = devm_gpio_request(&pdev->dev, pdata->pin_cs,
  467. dev_name(&pdev->dev));
  468. if (err) {
  469. dev_err(&pdev->dev, "Failed to get gpio for cs\n");
  470. goto err_register;
  471. }
  472. hw->set_cs = s3c24xx_spi_gpiocs;
  473. gpio_direction_output(pdata->pin_cs, 1);
  474. } else
  475. hw->set_cs = pdata->set_cs;
  476. s3c24xx_spi_initialsetup(hw);
  477. /* register our spi controller */
  478. err = spi_bitbang_start(&hw->bitbang);
  479. if (err) {
  480. dev_err(&pdev->dev, "Failed to register SPI master\n");
  481. goto err_register;
  482. }
  483. return 0;
  484. err_register:
  485. clk_disable(hw->clk);
  486. err_no_pdata:
  487. spi_master_put(hw->master);
  488. return err;
  489. }
  490. static int s3c24xx_spi_remove(struct platform_device *dev)
  491. {
  492. struct s3c24xx_spi *hw = platform_get_drvdata(dev);
  493. spi_bitbang_stop(&hw->bitbang);
  494. clk_disable(hw->clk);
  495. spi_master_put(hw->master);
  496. return 0;
  497. }
  498. #ifdef CONFIG_PM
  499. static int s3c24xx_spi_suspend(struct device *dev)
  500. {
  501. struct s3c24xx_spi *hw = dev_get_drvdata(dev);
  502. int ret;
  503. ret = spi_master_suspend(hw->master);
  504. if (ret)
  505. return ret;
  506. if (hw->pdata && hw->pdata->gpio_setup)
  507. hw->pdata->gpio_setup(hw->pdata, 0);
  508. clk_disable(hw->clk);
  509. return 0;
  510. }
  511. static int s3c24xx_spi_resume(struct device *dev)
  512. {
  513. struct s3c24xx_spi *hw = dev_get_drvdata(dev);
  514. s3c24xx_spi_initialsetup(hw);
  515. return spi_master_resume(hw->master);
  516. }
  517. static const struct dev_pm_ops s3c24xx_spi_pmops = {
  518. .suspend = s3c24xx_spi_suspend,
  519. .resume = s3c24xx_spi_resume,
  520. };
  521. #define S3C24XX_SPI_PMOPS &s3c24xx_spi_pmops
  522. #else
  523. #define S3C24XX_SPI_PMOPS NULL
  524. #endif /* CONFIG_PM */
  525. MODULE_ALIAS("platform:s3c2410-spi");
  526. static struct platform_driver s3c24xx_spi_driver = {
  527. .probe = s3c24xx_spi_probe,
  528. .remove = s3c24xx_spi_remove,
  529. .driver = {
  530. .name = "s3c2410-spi",
  531. .pm = S3C24XX_SPI_PMOPS,
  532. },
  533. };
  534. module_platform_driver(s3c24xx_spi_driver);
  535. MODULE_DESCRIPTION("S3C24XX SPI Driver");
  536. MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
  537. MODULE_LICENSE("GPL");