]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: SAMSUNG: Update to use PL330-DMA driver
authorBoojin Kim <boojin.kim@samsung.com>
Fri, 2 Sep 2011 00:44:34 +0000 (09:44 +0900)
committerVinod Koul <vinod.koul@intel.com>
Wed, 14 Sep 2011 05:40:01 +0000 (11:10 +0530)
This patch adds to support PL330-DMA driver on DMADEVICE for S5P SoCs.

Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
arch/arm/mach-exynos4/include/mach/dma.h
arch/arm/mach-s5p64x0/include/mach/dma.h
arch/arm/mach-s5pc100/include/mach/dma.h
arch/arm/mach-s5pv210/include/mach/dma.h
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/include/plat/dma-pl330.h [new file with mode: 0644]
arch/arm/plat-samsung/include/plat/s3c-dma-pl330.h [deleted file]
arch/arm/plat-samsung/include/plat/s3c-pl330-pdata.h

index 81209eb1409b7ad4c55a70897379547991ea2958..201842a3769e5187067d95b70c9d2e14a5ea3acd 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __MACH_DMA_H
 #define __MACH_DMA_H
 
-/* This platform uses the common S3C DMA API driver for PL330 */
-#include <plat/s3c-dma-pl330.h>
+/* This platform uses the common DMA API driver for PL330 */
+#include <plat/dma-pl330.h>
 
 #endif /* __MACH_DMA_H */
index 81209eb1409b7ad4c55a70897379547991ea2958..1beae2cca6a334ea8166103c02e4bd7a96de788e 100644 (file)
@@ -21,6 +21,6 @@
 #define __MACH_DMA_H
 
 /* This platform uses the common S3C DMA API driver for PL330 */
-#include <plat/s3c-dma-pl330.h>
+#include <plat/dma-pl330.h>
 
 #endif /* __MACH_DMA_H */
index 81209eb1409b7ad4c55a70897379547991ea2958..1beae2cca6a334ea8166103c02e4bd7a96de788e 100644 (file)
@@ -21,6 +21,6 @@
 #define __MACH_DMA_H
 
 /* This platform uses the common S3C DMA API driver for PL330 */
-#include <plat/s3c-dma-pl330.h>
+#include <plat/dma-pl330.h>
 
 #endif /* __MACH_DMA_H */
index 81209eb1409b7ad4c55a70897379547991ea2958..1beae2cca6a334ea8166103c02e4bd7a96de788e 100644 (file)
@@ -21,6 +21,6 @@
 #define __MACH_DMA_H
 
 /* This platform uses the common S3C DMA API driver for PL330 */
-#include <plat/s3c-dma-pl330.h>
+#include <plat/dma-pl330.h>
 
 #endif /* __MACH_DMA_H */
index b3e10659e4b80a81fe6e7dcf16703d728b1ea48a..e6f01ab8620868588fc1ef99618108e793626924 100644 (file)
@@ -306,6 +306,15 @@ config S3C_PL330_DMA
        help
          S3C DMA API Driver for PL330 DMAC.
 
+config SAMSUNG_DMADEV
+       bool
+       select DMADEVICES
+       select PL330_DMA if (CPU_EXYNOS4210 || CPU_S5PV210 || CPU_S5PC100 || \
+                                       CPU_S5P6450 || CPU_S5P6440)
+       select ARM_AMBA
+       help
+         Use DMA device engine for PL330 DMAC.
+
 comment "Power management"
 
 config SAMSUNG_PM_DEBUG
diff --git a/arch/arm/plat-samsung/include/plat/dma-pl330.h b/arch/arm/plat-samsung/include/plat/dma-pl330.h
new file mode 100644 (file)
index 0000000..0a5dade
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 Samsung Electronics Co. Ltd.
+ *     Jaswinder Singh <jassi.brar@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __DMA_PL330_H_
+#define __DMA_PL330_H_ __FILE__
+
+#define S3C2410_DMAF_AUTOSTART         (1 << 0)
+#define S3C2410_DMAF_CIRCULAR          (1 << 1)
+
+/*
+ * PL330 can assign any channel to communicate with
+ * any of the peripherals attched to the DMAC.
+ * For the sake of consistency across client drivers,
+ * We keep the channel names unchanged and only add
+ * missing peripherals are added.
+ * Order is not important since DMA PL330 API driver
+ * use these just as IDs.
+ */
+enum dma_ch {
+       DMACH_UART0_RX,
+       DMACH_UART0_TX,
+       DMACH_UART1_RX,
+       DMACH_UART1_TX,
+       DMACH_UART2_RX,
+       DMACH_UART2_TX,
+       DMACH_UART3_RX,
+       DMACH_UART3_TX,
+       DMACH_UART4_RX,
+       DMACH_UART4_TX,
+       DMACH_UART5_RX,
+       DMACH_UART5_TX,
+       DMACH_USI_RX,
+       DMACH_USI_TX,
+       DMACH_IRDA,
+       DMACH_I2S0_RX,
+       DMACH_I2S0_TX,
+       DMACH_I2S0S_TX,
+       DMACH_I2S1_RX,
+       DMACH_I2S1_TX,
+       DMACH_I2S2_RX,
+       DMACH_I2S2_TX,
+       DMACH_SPI0_RX,
+       DMACH_SPI0_TX,
+       DMACH_SPI1_RX,
+       DMACH_SPI1_TX,
+       DMACH_SPI2_RX,
+       DMACH_SPI2_TX,
+       DMACH_AC97_MICIN,
+       DMACH_AC97_PCMIN,
+       DMACH_AC97_PCMOUT,
+       DMACH_EXTERNAL,
+       DMACH_PWM,
+       DMACH_SPDIF,
+       DMACH_HSI_RX,
+       DMACH_HSI_TX,
+       DMACH_PCM0_TX,
+       DMACH_PCM0_RX,
+       DMACH_PCM1_TX,
+       DMACH_PCM1_RX,
+       DMACH_PCM2_TX,
+       DMACH_PCM2_RX,
+       DMACH_MSM_REQ3,
+       DMACH_MSM_REQ2,
+       DMACH_MSM_REQ1,
+       DMACH_MSM_REQ0,
+       DMACH_SLIMBUS0_RX,
+       DMACH_SLIMBUS0_TX,
+       DMACH_SLIMBUS0AUX_RX,
+       DMACH_SLIMBUS0AUX_TX,
+       DMACH_SLIMBUS1_RX,
+       DMACH_SLIMBUS1_TX,
+       DMACH_SLIMBUS2_RX,
+       DMACH_SLIMBUS2_TX,
+       DMACH_SLIMBUS3_RX,
+       DMACH_SLIMBUS3_TX,
+       DMACH_SLIMBUS4_RX,
+       DMACH_SLIMBUS4_TX,
+       DMACH_SLIMBUS5_RX,
+       DMACH_SLIMBUS5_TX,
+       /* END Marker, also used to denote a reserved channel */
+       DMACH_MAX,
+};
+
+static inline bool s3c_dma_has_circular(void)
+{
+       return true;
+}
+
+#include <plat/dma.h>
+
+#endif /* __DMA_PL330_H_ */
diff --git a/arch/arm/plat-samsung/include/plat/s3c-dma-pl330.h b/arch/arm/plat-samsung/include/plat/s3c-dma-pl330.h
deleted file mode 100644 (file)
index 8107442..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2010 Samsung Electronics Co. Ltd.
- *     Jaswinder Singh <jassi.brar@samsung.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef        __S3C_DMA_PL330_H_
-#define        __S3C_DMA_PL330_H_
-
-#define S3C2410_DMAF_AUTOSTART         (1 << 0)
-#define S3C2410_DMAF_CIRCULAR          (1 << 1)
-
-/*
- * PL330 can assign any channel to communicate with
- * any of the peripherals attched to the DMAC.
- * For the sake of consistency across client drivers,
- * We keep the channel names unchanged and only add
- * missing peripherals are added.
- * Order is not important since S3C PL330 API driver
- * use these just as IDs.
- */
-enum dma_ch {
-       DMACH_UART0_RX,
-       DMACH_UART0_TX,
-       DMACH_UART1_RX,
-       DMACH_UART1_TX,
-       DMACH_UART2_RX,
-       DMACH_UART2_TX,
-       DMACH_UART3_RX,
-       DMACH_UART3_TX,
-       DMACH_UART4_RX,
-       DMACH_UART4_TX,
-       DMACH_UART5_RX,
-       DMACH_UART5_TX,
-       DMACH_USI_RX,
-       DMACH_USI_TX,
-       DMACH_IRDA,
-       DMACH_I2S0_RX,
-       DMACH_I2S0_TX,
-       DMACH_I2S0S_TX,
-       DMACH_I2S1_RX,
-       DMACH_I2S1_TX,
-       DMACH_I2S2_RX,
-       DMACH_I2S2_TX,
-       DMACH_SPI0_RX,
-       DMACH_SPI0_TX,
-       DMACH_SPI1_RX,
-       DMACH_SPI1_TX,
-       DMACH_SPI2_RX,
-       DMACH_SPI2_TX,
-       DMACH_AC97_MICIN,
-       DMACH_AC97_PCMIN,
-       DMACH_AC97_PCMOUT,
-       DMACH_EXTERNAL,
-       DMACH_PWM,
-       DMACH_SPDIF,
-       DMACH_HSI_RX,
-       DMACH_HSI_TX,
-       DMACH_PCM0_TX,
-       DMACH_PCM0_RX,
-       DMACH_PCM1_TX,
-       DMACH_PCM1_RX,
-       DMACH_PCM2_TX,
-       DMACH_PCM2_RX,
-       DMACH_MSM_REQ3,
-       DMACH_MSM_REQ2,
-       DMACH_MSM_REQ1,
-       DMACH_MSM_REQ0,
-       DMACH_SLIMBUS0_RX,
-       DMACH_SLIMBUS0_TX,
-       DMACH_SLIMBUS0AUX_RX,
-       DMACH_SLIMBUS0AUX_TX,
-       DMACH_SLIMBUS1_RX,
-       DMACH_SLIMBUS1_TX,
-       DMACH_SLIMBUS2_RX,
-       DMACH_SLIMBUS2_TX,
-       DMACH_SLIMBUS3_RX,
-       DMACH_SLIMBUS3_TX,
-       DMACH_SLIMBUS4_RX,
-       DMACH_SLIMBUS4_TX,
-       DMACH_SLIMBUS5_RX,
-       DMACH_SLIMBUS5_TX,
-       /* END Marker, also used to denote a reserved channel */
-       DMACH_MAX,
-};
-
-static inline bool s3c_dma_has_circular(void)
-{
-       return true;
-}
-
-#include <plat/dma.h>
-
-#endif /* __S3C_DMA_PL330_H_ */
index bf5e2a9d408d42f301f2a41e59ebfe2c14c4aa8b..64fdf66ff9cf78c520fcccdfd3aa283591909447 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef __S3C_PL330_PDATA_H
 #define __S3C_PL330_PDATA_H
 
-#include <plat/s3c-dma-pl330.h>
+#include <plat/dma-pl330.h>
 
 /*
  * Every PL330 DMAC has max 32 peripheral interfaces,