ARM: OMAP1: DMA: Moving OMAP1 DMA channel definitions to mach-omap1
authorLokesh Vutla <lokeshvutla@ti.com>
Mon, 15 Oct 2012 21:01:01 +0000 (14:01 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 15 Oct 2012 21:01:01 +0000 (14:01 -0700)
Some of the omap1 dma channel definitions are used by some drivers.
For moving omap1 dma channel definitions to mach-omap1/, the used
ones should be defined locally to driver. Driver can eliminate it
by using DT, platform data, or IORESOURCE_DMA.
And moving OMAP1 DMA channel definitions to mach-omap1

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 files changed:
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/dma.c
arch/arm/mach-omap1/dma.h [new file with mode: 0644]
arch/arm/mach-omap1/lcd_dma.c
arch/arm/mach-omap1/mcbsp.c
arch/arm/plat-omap/include/plat/dma.h
drivers/media/platform/omap/omap_vout_vrfb.c
drivers/media/platform/soc_camera/omap1_camera.c
drivers/mmc/host/omap.c
drivers/usb/gadget/omap_udc.c

index 376f7f29ef77391fc8de34c9cb8bb6264abdef09..033483d7ff55ca2ccf8c2083f6bd56989dc5b4b6 100644 (file)
@@ -50,6 +50,7 @@
 
 #include "common.h"
 #include "board-h2.h"
+#include "dma.h"
 
 /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
 #define OMAP1610_ETHR_START            0x04000300
index 1c578d58923ab703179196fda89adf18336bcc00..75ac3cd5ff3891a93f24b90813e93590620acacf 100644 (file)
@@ -45,6 +45,7 @@
 #include <mach/usb.h>
 
 #include "common.h"
+#include "dma.h"
 
 #define PALMTE_USBDETECT_GPIO  0
 #define PALMTE_USB_OR_DC_GPIO  1
index 97158095083ccdd87c9784087d535a34fe2df9fe..14e1847545489dd46bffe5dc5bf75727a38d1a8f 100644 (file)
@@ -45,6 +45,7 @@
 #include <mach/usb.h>
 
 #include "common.h"
+#include "dma.h"
 
 #define PALMTT_USBDETECT_GPIO  0
 #define PALMTT_CABLE_GPIO      1
index e311032e7eebb3abbbd7540843b96de3ec314302..e403bc985ef93c5cf30b70dfe3703103df6c7213 100644 (file)
@@ -47,6 +47,7 @@
 #include <mach/usb.h>
 
 #include "common.h"
+#include "dma.h"
 
 #define PALMZ71_USBDETECT_GPIO 0
 #define PALMZ71_PENIRQ_GPIO    6
index 13bf2cc56814a988a03e7043f161ce741ce4e3ea..1248fccc2341ee69d61682581e787a7825a6e225 100644 (file)
@@ -45,6 +45,7 @@
 #include <mach/usb.h>
 
 #include "common.h"
+#include "dma.h"
 
 /* Write to I2C device */
 int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
index d3fec92c54cb5d5d852974c9e9c3ec7ad58e72bc..d741525c2b497b0bf56426262dcb4cc47759fb32 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "common.h"
 #include "clock.h"
+#include "dma.h"
 
 #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
 
index 29007fef84cd8d884aaddd1c295897afa0c824ed..40f1dc452f36ead1adac0400053c3c01ccb1ddbd 100644 (file)
@@ -30,6 +30,8 @@
 
 #include <mach/irqs.h>
 
+#include "dma.h"
+
 #define OMAP1_DMA_BASE                 (0xfffed800)
 #define OMAP1_LOGICAL_DMA_CH_COUNT     17
 #define OMAP1_DMA_STRIDE               0x40
diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h
new file mode 100644 (file)
index 0000000..da6345d
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ *  OMAP1 DMA channel definitions
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __OMAP1_DMA_CHANNEL_H
+#define __OMAP1_DMA_CHANNEL_H
+
+/* DMA channels for omap1 */
+#define OMAP_DMA_NO_DEVICE             0
+#define OMAP_DMA_MCSI1_TX              1
+#define OMAP_DMA_MCSI1_RX              2
+#define OMAP_DMA_I2C_RX                        3
+#define OMAP_DMA_I2C_TX                        4
+#define OMAP_DMA_EXT_NDMA_REQ          5
+#define OMAP_DMA_EXT_NDMA_REQ2         6
+#define OMAP_DMA_UWIRE_TX              7
+#define OMAP_DMA_MCBSP1_TX             8
+#define OMAP_DMA_MCBSP1_RX             9
+#define OMAP_DMA_MCBSP3_TX             10
+#define OMAP_DMA_MCBSP3_RX             11
+#define OMAP_DMA_UART1_TX              12
+#define OMAP_DMA_UART1_RX              13
+#define OMAP_DMA_UART2_TX              14
+#define OMAP_DMA_UART2_RX              15
+#define OMAP_DMA_MCBSP2_TX             16
+#define OMAP_DMA_MCBSP2_RX             17
+#define OMAP_DMA_UART3_TX              18
+#define OMAP_DMA_UART3_RX              19
+#define OMAP_DMA_CAMERA_IF_RX          20
+#define OMAP_DMA_MMC_TX                        21
+#define OMAP_DMA_MMC_RX                        22
+#define OMAP_DMA_NAND                  23
+#define OMAP_DMA_IRQ_LCD_LINE          24
+#define OMAP_DMA_MEMORY_STICK          25
+#define OMAP_DMA_USB_W2FC_RX0          26
+#define OMAP_DMA_USB_W2FC_RX1          27
+#define OMAP_DMA_USB_W2FC_RX2          28
+#define OMAP_DMA_USB_W2FC_TX0          29
+#define OMAP_DMA_USB_W2FC_TX1          30
+#define OMAP_DMA_USB_W2FC_TX2          31
+
+/* These are only for 1610 */
+#define OMAP_DMA_CRYPTO_DES_IN         32
+#define OMAP_DMA_SPI_TX                        33
+#define OMAP_DMA_SPI_RX                        34
+#define OMAP_DMA_CRYPTO_HASH           35
+#define OMAP_DMA_CCP_ATTN              36
+#define OMAP_DMA_CCP_FIFO_NOT_EMPTY    37
+#define OMAP_DMA_CMT_APE_TX_CHAN_0     38
+#define OMAP_DMA_CMT_APE_RV_CHAN_0     39
+#define OMAP_DMA_CMT_APE_TX_CHAN_1     40
+#define OMAP_DMA_CMT_APE_RV_CHAN_1     41
+#define OMAP_DMA_CMT_APE_TX_CHAN_2     42
+#define OMAP_DMA_CMT_APE_RV_CHAN_2     43
+#define OMAP_DMA_CMT_APE_TX_CHAN_3     44
+#define OMAP_DMA_CMT_APE_RV_CHAN_3     45
+#define OMAP_DMA_CMT_APE_TX_CHAN_4     46
+#define OMAP_DMA_CMT_APE_RV_CHAN_4     47
+#define OMAP_DMA_CMT_APE_TX_CHAN_5     48
+#define OMAP_DMA_CMT_APE_RV_CHAN_5     49
+#define OMAP_DMA_CMT_APE_TX_CHAN_6     50
+#define OMAP_DMA_CMT_APE_RV_CHAN_6     51
+#define OMAP_DMA_CMT_APE_TX_CHAN_7     52
+#define OMAP_DMA_CMT_APE_RV_CHAN_7     53
+#define OMAP_DMA_MMC2_TX               54
+#define OMAP_DMA_MMC2_RX               55
+#define OMAP_DMA_CRYPTO_DES_OUT                56
+
+#endif /* __OMAP1_DMA_CHANNEL_H */
index ed42628611bc23953c7e05a33b6a19c3fee6a34a..9a54d3b9b38eeaa5205cd68b5698f695f96c5c0e 100644 (file)
@@ -32,6 +32,8 @@
 #include <mach/hardware.h>
 #include <mach/lcdc.h>
 
+#include "dma.h"
+
 int omap_lcd_dma_running(void)
 {
        /*
index bdc2e7541adb869fe27d20d2116225c74d2470a6..b92f15afa4d473495ea78a2eee8f100c3cfc81fd 100644 (file)
@@ -27,6 +27,7 @@
 #include <mach/irqs.h>
 
 #include "iomap.h"
+#include "dma.h"
 
 #define DPS_RSTCT2_PER_EN      (1 << 0)
 #define DSP_RSTCT2_WD_PER_EN   (1 << 1)
index e413bd82ecd2f69e2abf95a553f83ba0e51ee782..972897fa027bcdd8b0a0498af602ac57e70a480a 100644 (file)
 
 #include <linux/platform_device.h>
 
-/*
- * TODO: These dma channel defines should go away once all
- * the omap drivers hwmod adapted.
- */
-
 #define INT_DMA_LCD                    25
 
-/* DMA channels for omap1 */
-#define OMAP_DMA_NO_DEVICE             0
-#define OMAP_DMA_MCSI1_TX              1
-#define OMAP_DMA_MCSI1_RX              2
-#define OMAP_DMA_I2C_RX                        3
-#define OMAP_DMA_I2C_TX                        4
-#define OMAP_DMA_EXT_NDMA_REQ          5
-#define OMAP_DMA_EXT_NDMA_REQ2         6
-#define OMAP_DMA_UWIRE_TX              7
-#define OMAP_DMA_MCBSP1_TX             8
-#define OMAP_DMA_MCBSP1_RX             9
-#define OMAP_DMA_MCBSP3_TX             10
-#define OMAP_DMA_MCBSP3_RX             11
-#define OMAP_DMA_UART1_TX              12
-#define OMAP_DMA_UART1_RX              13
-#define OMAP_DMA_UART2_TX              14
-#define OMAP_DMA_UART2_RX              15
-#define OMAP_DMA_MCBSP2_TX             16
-#define OMAP_DMA_MCBSP2_RX             17
-#define OMAP_DMA_UART3_TX              18
-#define OMAP_DMA_UART3_RX              19
-#define OMAP_DMA_CAMERA_IF_RX          20
-#define OMAP_DMA_MMC_TX                        21
-#define OMAP_DMA_MMC_RX                        22
-#define OMAP_DMA_NAND                  23
-#define OMAP_DMA_IRQ_LCD_LINE          24
-#define OMAP_DMA_MEMORY_STICK          25
-#define OMAP_DMA_USB_W2FC_RX0          26
-#define OMAP_DMA_USB_W2FC_RX1          27
-#define OMAP_DMA_USB_W2FC_RX2          28
-#define OMAP_DMA_USB_W2FC_TX0          29
-#define OMAP_DMA_USB_W2FC_TX1          30
-#define OMAP_DMA_USB_W2FC_TX2          31
-
-/* These are only for 1610 */
-#define OMAP_DMA_CRYPTO_DES_IN         32
-#define OMAP_DMA_SPI_TX                        33
-#define OMAP_DMA_SPI_RX                        34
-#define OMAP_DMA_CRYPTO_HASH           35
-#define OMAP_DMA_CCP_ATTN              36
-#define OMAP_DMA_CCP_FIFO_NOT_EMPTY    37
-#define OMAP_DMA_CMT_APE_TX_CHAN_0     38
-#define OMAP_DMA_CMT_APE_RV_CHAN_0     39
-#define OMAP_DMA_CMT_APE_TX_CHAN_1     40
-#define OMAP_DMA_CMT_APE_RV_CHAN_1     41
-#define OMAP_DMA_CMT_APE_TX_CHAN_2     42
-#define OMAP_DMA_CMT_APE_RV_CHAN_2     43
-#define OMAP_DMA_CMT_APE_TX_CHAN_3     44
-#define OMAP_DMA_CMT_APE_RV_CHAN_3     45
-#define OMAP_DMA_CMT_APE_TX_CHAN_4     46
-#define OMAP_DMA_CMT_APE_RV_CHAN_4     47
-#define OMAP_DMA_CMT_APE_TX_CHAN_5     48
-#define OMAP_DMA_CMT_APE_RV_CHAN_5     49
-#define OMAP_DMA_CMT_APE_TX_CHAN_6     50
-#define OMAP_DMA_CMT_APE_RV_CHAN_6     51
-#define OMAP_DMA_CMT_APE_TX_CHAN_7     52
-#define OMAP_DMA_CMT_APE_RV_CHAN_7     53
-#define OMAP_DMA_MMC2_TX               54
-#define OMAP_DMA_MMC2_RX               55
-#define OMAP_DMA_CRYPTO_DES_OUT                56
-
 /* DMA channels for 24xx */
 #define OMAP24XX_DMA_NO_DEVICE         0
 #define OMAP24XX_DMA_XTI_DMA           1       /* S_DMA_0 */
index 4be26abf6cea7a323ef0b15e7e1cedf3177ab916..11d7a29b97087e5a02704523dba0633ec4a54264 100644 (file)
@@ -22,6 +22,8 @@
 #include "omap_voutdef.h"
 #include "omap_voutlib.h"
 
+#define OMAP_DMA_NO_DEVICE     0
+
 /*
  * Function for allocating video buffers
  */
index fa08c7695ccb05aa61d680d8bcf4f002516d2894..3046dba9100685aa29e9937bdb0044f647bdbe80 100644 (file)
@@ -40,6 +40,7 @@
 #define DRIVER_NAME            "omap1-camera"
 #define DRIVER_VERSION         "0.0.2"
 
+#define OMAP_DMA_CAMERA_IF_RX          20
 
 /*
  * ---------------------------------------------------------------------------
index 48ad361613efb2ebaca728ac53f87a147e8beb45..b2cf37b0ee303478096a060b1eb71bc6538876f5 100644 (file)
 #define OMAP_MMC_CMDTYPE_AC    2
 #define OMAP_MMC_CMDTYPE_ADTC  3
 
+#define OMAP_DMA_MMC_TX                21
+#define OMAP_DMA_MMC_RX                22
+#define OMAP_DMA_MMC2_TX       54
+#define OMAP_DMA_MMC2_RX       55
 
 #define DRIVER_NAME "mmci-omap"
 
index 2a4749c3eb3f7bd7679f768ca5cdab27de0db72f..024c0b9150bb169406ae32ffdf991ff994e5be25 100644 (file)
@@ -61,6 +61,8 @@
 #define        DRIVER_DESC     "OMAP UDC driver"
 #define        DRIVER_VERSION  "4 October 2004"
 
+#define OMAP_DMA_USB_W2FC_TX0          29
+
 /*
  * The OMAP UDC needs _very_ early endpoint setup:  before enabling the
  * D+ pullup to allow enumeration.  That's too early for the gadget