aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-cpm.c
diff options
context:
space:
mode:
authorEsben Haabendal <eha@deif.com>2015-01-06 08:07:34 -0500
committerMark Brown <broonie@kernel.org>2015-01-06 12:03:34 -0500
commit38455d7ac2e383d747ddee0189c7d8c078b29b09 (patch)
tree3181cc88705caa1f3d5ce2de3db4506cf6a69534 /drivers/spi/spi-fsl-cpm.c
parent1004b9f146940d280a0f62ca33d241469022bce7 (diff)
spi: fsl-(e)spi: Support compile as module
Signed-off-by: Esben Haabendal <eha@deif.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-cpm.c')
-rw-r--r--drivers/spi/spi-fsl-cpm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/spi/spi-fsl-cpm.c b/drivers/spi/spi-fsl-cpm.c
index e85ab1cb17a2..9c46a3058743 100644
--- a/drivers/spi/spi-fsl-cpm.c
+++ b/drivers/spi/spi-fsl-cpm.c
@@ -20,6 +20,7 @@
20#include <linux/dma-mapping.h> 20#include <linux/dma-mapping.h>
21#include <linux/fsl_devices.h> 21#include <linux/fsl_devices.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/module.h>
23#include <linux/of_address.h> 24#include <linux/of_address.h>
24#include <linux/spi/spi.h> 25#include <linux/spi/spi.h>
25#include <linux/types.h> 26#include <linux/types.h>
@@ -68,6 +69,7 @@ void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi)
68 } 69 }
69 } 70 }
70} 71}
72EXPORT_SYMBOL_GPL(fsl_spi_cpm_reinit_txrx);
71 73
72static void fsl_spi_cpm_bufs_start(struct mpc8xxx_spi *mspi) 74static void fsl_spi_cpm_bufs_start(struct mpc8xxx_spi *mspi)
73{ 75{
@@ -162,6 +164,7 @@ err_rx_dma:
162 dma_unmap_single(dev, mspi->tx_dma, t->len, DMA_TO_DEVICE); 164 dma_unmap_single(dev, mspi->tx_dma, t->len, DMA_TO_DEVICE);
163 return -ENOMEM; 165 return -ENOMEM;
164} 166}
167EXPORT_SYMBOL_GPL(fsl_spi_cpm_bufs);
165 168
166void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi) 169void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi)
167{ 170{
@@ -174,6 +177,7 @@ void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi)
174 dma_unmap_single(dev, mspi->rx_dma, t->len, DMA_FROM_DEVICE); 177 dma_unmap_single(dev, mspi->rx_dma, t->len, DMA_FROM_DEVICE);
175 mspi->xfer_in_progress = NULL; 178 mspi->xfer_in_progress = NULL;
176} 179}
180EXPORT_SYMBOL_GPL(fsl_spi_cpm_bufs_complete);
177 181
178void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events) 182void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events)
179{ 183{
@@ -198,6 +202,7 @@ void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events)
198 else 202 else
199 complete(&mspi->done); 203 complete(&mspi->done);
200} 204}
205EXPORT_SYMBOL_GPL(fsl_spi_cpm_irq);
201 206
202static void *fsl_spi_alloc_dummy_rx(void) 207static void *fsl_spi_alloc_dummy_rx(void)
203{ 208{
@@ -375,6 +380,7 @@ err_pram:
375 fsl_spi_free_dummy_rx(); 380 fsl_spi_free_dummy_rx();
376 return -ENOMEM; 381 return -ENOMEM;
377} 382}
383EXPORT_SYMBOL_GPL(fsl_spi_cpm_init);
378 384
379void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi) 385void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi)
380{ 386{
@@ -389,3 +395,6 @@ void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi)
389 cpm_muram_free(cpm_muram_offset(mspi->pram)); 395 cpm_muram_free(cpm_muram_offset(mspi->pram));
390 fsl_spi_free_dummy_rx(); 396 fsl_spi_free_dummy_rx();
391} 397}
398EXPORT_SYMBOL_GPL(fsl_spi_cpm_free);
399
400MODULE_LICENSE("GPL");