summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-02-20 23:01:33 +0000
committerBen Dooks <ben-linux@fluff.org>2010-02-21 23:10:35 +0000
commit992426bfe98e71db1ce767fd66f6c68ed18fcc14 (patch)
tree6abd29441da0a9764dabedbbff7eb27d30fda406 /arch/arm/mach-s3c64xx
parent431fb7df24ebf360ba35895a60d084de364e39f8 (diff)
ARM: SAMSUNG: Remove dma-plat.h to allow plat-s3c64xx to be removed
dma-plat.h is the last file left in plat-s3c64xx, but to remove it we must also change the use of dma-plat.h by the core code and the s3c24xx implementation. Rename the s3c24xx dma-plat.h in the common plat-samsung directory as it may be used for other ports. Move the specific dma bits into the mach-s3c64xx directory and update the build as needed. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/dma.c1
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/dma.h57
2 files changed, 57 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
index 0e0edf75e8e..b62bdf18dca 100644
--- a/arch/arm/mach-s3c64xx/dma.c
+++ b/arch/arm/mach-s3c64xx/dma.c
@@ -27,7 +27,6 @@
#include <mach/map.h>
#include <mach/irqs.h>
-#include <plat/dma-plat.h>
#include <mach/regs-sys.h>
#include <asm/hardware/pl080.h>
diff --git a/arch/arm/mach-s3c64xx/include/mach/dma.h b/arch/arm/mach-s3c64xx/include/mach/dma.h
index 6723860748b..0a5d9268a23 100644
--- a/arch/arm/mach-s3c64xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c64xx/include/mach/dma.h
@@ -67,4 +67,61 @@ static __inline__ bool s3c_dma_has_circular(void)
#include <plat/dma.h>
+#define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */
+
+struct s3c64xx_dma_buff;
+
+/** s3c64xx_dma_buff - S3C64XX DMA buffer descriptor
+ * @next: Pointer to next buffer in queue or ring.
+ * @pw: Client provided identifier
+ * @lli: Pointer to hardware descriptor this buffer is associated with.
+ * @lli_dma: Hardare address of the descriptor.
+ */
+struct s3c64xx_dma_buff {
+ struct s3c64xx_dma_buff *next;
+
+ void *pw;
+ struct pl080s_lli *lli;
+ dma_addr_t lli_dma;
+};
+
+struct s3c64xx_dmac;
+
+struct s3c2410_dma_chan {
+ unsigned char number; /* number of this dma channel */
+ unsigned char in_use; /* channel allocated */
+ unsigned char bit; /* bit for enable/disable/etc */
+ unsigned char hw_width;
+ unsigned char peripheral;
+
+ unsigned int flags;
+ enum s3c2410_dmasrc source;
+
+
+ dma_addr_t dev_addr;
+
+ struct s3c2410_dma_client *client;
+ struct s3c64xx_dmac *dmac; /* pointer to controller */
+
+ void __iomem *regs;
+
+ /* cdriver callbacks */
+ s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
+ s3c2410_dma_opfn_t op_fn; /* channel op callback */
+
+ /* buffer list and information */
+ struct s3c64xx_dma_buff *curr; /* current dma buffer */
+ struct s3c64xx_dma_buff *next; /* next buffer to load */
+ struct s3c64xx_dma_buff *end; /* end of queue */
+
+ /* note, when channel is running in circular mode, curr is the
+ * first buffer enqueued, end is the last and curr is where the
+ * last buffer-done event is set-at. The buffers are not freed
+ * and the last buffer hardware descriptor points back to the
+ * first.
+ */
+};
+
+#include <plat/dma-core.h>
+
#endif /* __ASM_ARCH_IRQ_H */