summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_s3c24xx_fiq.h
diff options
context:
space:
mode:
authorBen Dooks2009-12-15 07:20:24 +0100
committerGrant Likely2009-12-17 16:57:01 +0100
commitbec0806cfec6ded1a7e097bb95279e521a796129 (patch)
treef4be92d1c09a1785ea693d9f99ad2dbfc26bbbac /drivers/spi/spi_s3c24xx_fiq.h
parentspi: controller driver for Designware SPI core (diff)
downloadkernel-qcow2-linux-bec0806cfec6ded1a7e097bb95279e521a796129.tar.gz
kernel-qcow2-linux-bec0806cfec6ded1a7e097bb95279e521a796129.tar.xz
kernel-qcow2-linux-bec0806cfec6ded1a7e097bb95279e521a796129.zip
spi_s3c24xx: add FIQ pseudo-DMA support
Add pseudo-DMA by FIQ to the S3C24XX SPI driver. This allows the driver to get DMA-like performance where there are either no free DMA channels or when doing transfers that required both TX and RX data paths. Since this patch requires the addition of an assembly file to hold the FIQ code, we rename the module (instead of adding a rename of the .c file to this patch). We expect most users are loading this via udev and thus there should be no change to the userland configuration. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi_s3c24xx_fiq.h')
-rw-r--r--drivers/spi/spi_s3c24xx_fiq.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/spi/spi_s3c24xx_fiq.h b/drivers/spi/spi_s3c24xx_fiq.h
new file mode 100644
index 000000000000..a5950bb25b51
--- /dev/null
+++ b/drivers/spi/spi_s3c24xx_fiq.h
@@ -0,0 +1,26 @@
+/* linux/drivers/spi/spi_s3c24xx_fiq.h
+ *
+ * Copyright 2009 Simtec Electronics
+ * Ben Dooks <ben@simtec.co.uk>
+ *
+ * S3C24XX SPI - FIQ pseudo-DMA transfer support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/* We have R8 through R13 to play with */
+
+#ifdef __ASSEMBLY__
+#define __REG_NR(x) r##x
+#else
+#define __REG_NR(x) (x)
+#endif
+
+#define fiq_rspi __REG_NR(8)
+#define fiq_rtmp __REG_NR(9)
+#define fiq_rrx __REG_NR(10)
+#define fiq_rtx __REG_NR(11)
+#define fiq_rcount __REG_NR(12)
+#define fiq_rirq __REG_NR(13)