Merge tag 'omap-for-v3.11/dma-signed' of git://git.kernel.org/pub/scm/linux/kernel...
authorArnd Bergmann <arnd@arndb.de>
Thu, 20 Jun 2013 14:43:11 +0000 (16:43 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 20 Jun 2013 14:43:11 +0000 (16:43 +0200)
From Tony Lindgren:

Non-critical omap DMA fixes and removal of unused legacy code.

* tag 'omap-for-v3.11/dma-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP1: Remove dma.h
  ARM: OMAP1: Remove legacy irda.h and irda setup from board files
  ARM: OMAP1: Remove duplicated DMA channel definitions
  ARM: OMAP1: Remove McBSP DMA channel definitions
  ARM: OMAP2+: Remove dma.h
  ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions
  ARM: OMAP2+: Remove duplicated DMA channel definitions
  ARM: OMAP2+: Remove AES crypto device DMA channel definitions
  ARM: OMAP: dma: Remove the erroneous freeing of platform data
  ARM: OMAP: dma: Fix the dma_chan_link_map init order
  ARM: OMAP: dma: Remove the wrong dev_id check

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 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 [deleted file]
arch/arm/mach-omap1/include/mach/irda.h [deleted file]
arch/arm/mach-omap1/lcd_dma.c
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/dma.h [deleted file]
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/plat-omap/dma.c

index 0dac3d2..fd90caf 100644 (file)
@@ -41,7 +41,6 @@
 #include <mach/mux.h>
 #include <linux/omap-dma.h>
 #include <mach/tc.h>
-#include <mach/irda.h>
 #include <linux/platform_data/keypad-omap.h>
 #include <mach/flash.h>
 
@@ -50,7 +49,6 @@
 
 #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
@@ -276,39 +274,6 @@ static struct platform_device h2_kp_device = {
        .resource       = h2_kp_resources,
 };
 
-#define H2_IRDA_FIRSEL_GPIO_PIN        17
-
-static struct omap_irda_config h2_irda_data = {
-       .transceiver_cap        = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
-       .rx_channel             = OMAP_DMA_UART3_RX,
-       .tx_channel             = OMAP_DMA_UART3_TX,
-       .dest_start             = UART3_THR,
-       .src_start              = UART3_RHR,
-       .tx_trigger             = 0,
-       .rx_trigger             = 0,
-};
-
-static struct resource h2_irda_resources[] = {
-       [0] = {
-               .start  = INT_UART3,
-               .end    = INT_UART3,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static u64 irda_dmamask = 0xffffffff;
-
-static struct platform_device h2_irda_device = {
-       .name           = "omapirda",
-       .id             = 0,
-       .dev            = {
-               .platform_data  = &h2_irda_data,
-               .dma_mask       = &irda_dmamask,
-       },
-       .num_resources  = ARRAY_SIZE(h2_irda_resources),
-       .resource       = h2_irda_resources,
-};
-
 static struct gpio_led h2_gpio_led_pins[] = {
        {
                .name           = "h2:red",
@@ -339,7 +304,6 @@ static struct platform_device *h2_devices[] __initdata = {
        &h2_nor_device,
        &h2_nand_device,
        &h2_smc91x_device,
-       &h2_irda_device,
        &h2_kp_device,
        &h2_gpio_leds,
 };
index 845a1a7..3b8e98f 100644 (file)
 #include <mach/mux.h>
 #include <mach/tc.h>
 #include <linux/omap-dma.h>
-#include <mach/irda.h>
 #include <linux/platform_data/keypad-omap.h>
 
 #include <mach/hardware.h>
 #include <mach/usb.h>
 
 #include "common.h"
-#include "dma.h"
 
 #define PALMTE_USBDETECT_GPIO  0
 #define PALMTE_USB_OR_DC_GPIO  1
@@ -167,40 +165,11 @@ static struct platform_device palmte_backlight_device = {
        },
 };
 
-static struct omap_irda_config palmte_irda_config = {
-       .transceiver_cap        = IR_SIRMODE,
-       .rx_channel             = OMAP_DMA_UART3_RX,
-       .tx_channel             = OMAP_DMA_UART3_TX,
-       .dest_start             = UART3_THR,
-       .src_start              = UART3_RHR,
-       .tx_trigger             = 0,
-       .rx_trigger             = 0,
-};
-
-static struct resource palmte_irda_resources[] = {
-       [0]     = {
-               .start  = INT_UART3,
-               .end    = INT_UART3,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device palmte_irda_device = {
-       .name           = "omapirda",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &palmte_irda_config,
-       },
-       .num_resources  = ARRAY_SIZE(palmte_irda_resources),
-       .resource       = palmte_irda_resources,
-};
-
 static struct platform_device *palmte_devices[] __initdata = {
        &palmte_rom_device,
        &palmte_kp_device,
        &palmte_lcd_device,
        &palmte_backlight_device,
-       &palmte_irda_device,
 };
 
 static struct omap_usb_config palmte_usb_config __initdata = {
index 65a4a3e..ca50120 100644 (file)
 #include <mach/mux.h>
 #include <linux/omap-dma.h>
 #include <mach/tc.h>
-#include <mach/irda.h>
 #include <linux/platform_data/keypad-omap.h>
 
 #include <mach/hardware.h>
 #include <mach/usb.h>
 
 #include "common.h"
-#include "dma.h"
 
 #define PALMTT_USBDETECT_GPIO  0
 #define PALMTT_CABLE_GPIO      1
@@ -163,33 +161,6 @@ static struct platform_device palmtt_lcd_device = {
        .name           = "lcd_palmtt",
        .id             = -1,
 };
-static struct omap_irda_config palmtt_irda_config = {
-       .transceiver_cap        = IR_SIRMODE,
-       .rx_channel             = OMAP_DMA_UART3_RX,
-       .tx_channel             = OMAP_DMA_UART3_TX,
-       .dest_start             = UART3_THR,
-       .src_start              = UART3_RHR,
-       .tx_trigger             = 0,
-       .rx_trigger             = 0,
-};
-
-static struct resource palmtt_irda_resources[] = {
-       [0]     = {
-               .start  = INT_UART3,
-               .end    = INT_UART3,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device palmtt_irda_device = {
-       .name           = "omapirda",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &palmtt_irda_config,
-       },
-       .num_resources  = ARRAY_SIZE(palmtt_irda_resources),
-       .resource       = palmtt_irda_resources,
-};
 
 static struct platform_device palmtt_spi_device = {
        .name           = "spi_palmtt",
@@ -234,7 +205,6 @@ static struct platform_device *palmtt_devices[] __initdata = {
        &palmtt_flash_device,
        &palmtt_kp_device,
        &palmtt_lcd_device,
-       &palmtt_irda_device,
        &palmtt_spi_device,
        &palmtt_backlight_device,
        &palmtt_led_device,
index 01c9700..470e12d 100644 (file)
 #include <mach/mux.h>
 #include <linux/omap-dma.h>
 #include <mach/tc.h>
-#include <mach/irda.h>
 #include <linux/platform_data/keypad-omap.h>
 
 #include <mach/hardware.h>
 #include <mach/usb.h>
 
 #include "common.h"
-#include "dma.h"
 
 #define PALMZ71_USBDETECT_GPIO 0
 #define PALMZ71_PENIRQ_GPIO    6
@@ -153,34 +151,6 @@ static struct platform_device palmz71_lcd_device = {
        .id     = -1,
 };
 
-static struct omap_irda_config palmz71_irda_config = {
-       .transceiver_cap        = IR_SIRMODE,
-       .rx_channel             = OMAP_DMA_UART3_RX,
-       .tx_channel             = OMAP_DMA_UART3_TX,
-       .dest_start             = UART3_THR,
-       .src_start              = UART3_RHR,
-       .tx_trigger             = 0,
-       .rx_trigger             = 0,
-};
-
-static struct resource palmz71_irda_resources[] = {
-       [0] = {
-               .start  = INT_UART3,
-               .end    = INT_UART3,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device palmz71_irda_device = {
-       .name   = "omapirda",
-       .id     = -1,
-       .dev = {
-               .platform_data = &palmz71_irda_config,
-       },
-       .num_resources  = ARRAY_SIZE(palmz71_irda_resources),
-       .resource       = palmz71_irda_resources,
-};
-
 static struct platform_device palmz71_spi_device = {
        .name   = "spi_palmz71",
        .id     = -1,
@@ -202,7 +172,6 @@ static struct platform_device *devices[] __initdata = {
        &palmz71_rom_device,
        &palmz71_kp_device,
        &palmz71_lcd_device,
-       &palmz71_irda_device,
        &palmz71_spi_device,
        &palmz71_backlight_device,
 };
index 9732a98..0a8d334 100644 (file)
@@ -37,7 +37,6 @@
 #include <mach/flash.h>
 #include <mach/mux.h>
 #include <linux/omap-dma.h>
-#include <mach/irda.h>
 #include <mach/tc.h>
 #include <mach/board-sx1.h>
 
@@ -45,7 +44,6 @@
 #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)
@@ -228,39 +226,6 @@ static struct platform_device sx1_kp_device = {
        .resource       = sx1_kp_resources,
 };
 
-/*----------- IRDA -------------------------*/
-
-static struct omap_irda_config sx1_irda_data = {
-       .transceiver_cap        = IR_SIRMODE,
-       .rx_channel             = OMAP_DMA_UART3_RX,
-       .tx_channel             = OMAP_DMA_UART3_TX,
-       .dest_start             = UART3_THR,
-       .src_start              = UART3_RHR,
-       .tx_trigger             = 0,
-       .rx_trigger             = 0,
-};
-
-static struct resource sx1_irda_resources[] = {
-       [0] = {
-               .start  = INT_UART3,
-               .end    = INT_UART3,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static u64 irda_dmamask = 0xffffffff;
-
-static struct platform_device sx1_irda_device = {
-       .name           = "omapirda",
-       .id             = 0,
-       .dev            = {
-               .platform_data  = &sx1_irda_data,
-               .dma_mask       = &irda_dmamask,
-       },
-       .num_resources  = ARRAY_SIZE(sx1_irda_resources),
-       .resource       = sx1_irda_resources,
-};
-
 /*----------- MTD -------------------------*/
 
 static struct mtd_partition sx1_partitions[] = {
@@ -366,7 +331,6 @@ static struct omap_lcd_config sx1_lcd_config __initdata = {
 static struct platform_device *sx1_devices[] __initdata = {
        &sx1_flash_device,
        &sx1_kp_device,
-       &sx1_irda_device,
 };
 
 /*-----------------------------------------*/
index 0af6352..325e603 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "common.h"
 #include "clock.h"
-#include "dma.h"
 #include "mmc.h"
 #include "sram.h"
 
@@ -223,16 +222,16 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
                case 0:
                        base = OMAP1_MMC1_BASE;
                        irq = INT_MMC;
-                       rx_req = OMAP_DMA_MMC_RX;
-                       tx_req = OMAP_DMA_MMC_TX;
+                       rx_req = 22;
+                       tx_req = 21;
                        break;
                case 1:
                        if (!cpu_is_omap16xx())
                                return;
                        base = OMAP1_MMC2_BASE;
                        irq = INT_1610_MMC2;
-                       rx_req = OMAP_DMA_MMC2_RX;
-                       tx_req = OMAP_DMA_MMC2_TX;
+                       rx_req = 55;
+                       tx_req = 54;
                        break;
                default:
                        continue;
index a94b3a7..5bb8ce8 100644 (file)
@@ -30,8 +30,6 @@
 
 #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
deleted file mode 100644 (file)
index d05909c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  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_MCBSP1_TX             8
-#define OMAP_DMA_MCBSP1_RX             9
-#define OMAP_DMA_MCBSP3_TX             10
-#define OMAP_DMA_MCBSP3_RX             11
-#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_USB_W2FC_RX0          26
-#define OMAP_DMA_USB_W2FC_TX0          29
-
-/* These are only for 1610 */
-#define OMAP_DMA_MMC2_TX               54
-#define OMAP_DMA_MMC2_RX               55
-
-#endif /* __OMAP1_DMA_CHANNEL_H */
diff --git a/arch/arm/mach-omap1/include/mach/irda.h b/arch/arm/mach-omap1/include/mach/irda.h
deleted file mode 100644 (file)
index 40f6033..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/plat-omap/include/mach/irda.h
- *
- *  Copyright (C) 2005-2006 Komal Shah <komal_shah802003@yahoo.com>
- *
- * 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.
- */
-#ifndef ASMARM_ARCH_IRDA_H
-#define ASMARM_ARCH_IRDA_H
-
-/* board specific transceiver capabilities */
-
-#define IR_SEL         1       /* Selects IrDA */
-#define IR_SIRMODE     2
-#define IR_FIRMODE     4
-#define IR_MIRMODE     8
-
-struct omap_irda_config {
-       int transceiver_cap;
-       int (*transceiver_mode)(struct device *dev, int mode);
-       int (*select_irda)(struct device *dev, int state);
-       int rx_channel;
-       int tx_channel;
-       unsigned long dest_start;
-       unsigned long src_start;
-       int tx_trigger;
-       int rx_trigger;
-       int mode;
-};
-
-#endif
index 77924be..26a2b01 100644 (file)
@@ -32,8 +32,6 @@
 #include <mach/hardware.h>
 #include <mach/lcdc.h>
 
-#include "dma.h"
-
 int omap_lcd_dma_running(void)
 {
        /*
index b0d4723..8ed67f8 100644 (file)
@@ -27,7 +27,6 @@
 #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)
@@ -114,12 +113,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP1_RX,
+                       .start = 9,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP1_TX,
+                       .start = 8,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -141,12 +140,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP3_RX,
+                       .start = 11,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP3_TX,
+                       .start = 10,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -191,12 +190,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP1_RX,
+                       .start = 9,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP1_TX,
+                       .start = 8,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -218,12 +217,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP2_RX,
+                       .start = 17,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP2_TX,
+                       .start = 16,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -245,12 +244,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP3_RX,
+                       .start = 11,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP3_TX,
+                       .start = 10,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -298,12 +297,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP1_RX,
+                       .start = 9,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP1_TX,
+                       .start = 8,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -325,12 +324,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP2_RX,
+                       .start = 17,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP2_TX,
+                       .start = 16,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -352,12 +351,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP3_RX,
+                       .start = 11,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP3_TX,
+                       .start = 10,
                        .flags = IORESOURCE_DMA,
                },
        },
index 721da48..f874a3d 100644 (file)
@@ -37,7 +37,6 @@
 #include "mux.h"
 #include "control.h"
 #include "devices.h"
-#include "dma.h"
 
 #define L3_MODULES_MAX_LEN 12
 #define L3_MODULES 3
diff --git a/arch/arm/mach-omap2/dma.h b/arch/arm/mach-omap2/dma.h
deleted file mode 100644 (file)
index 65f80ca..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *  OMAP2PLUS 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 __OMAP2PLUS_DMA_CHANNEL_H
-#define __OMAP2PLUS_DMA_CHANNEL_H
-
-
-/* DMA channels for 24xx */
-#define OMAP24XX_DMA_NO_DEVICE         0
-#define OMAP24XX_DMA_EXT_DMAREQ0       2       /* S_DMA_1 */
-#define OMAP24XX_DMA_EXT_DMAREQ1       3       /* S_DMA_2 */
-#define OMAP24XX_DMA_GPMC              4       /* S_DMA_3 */
-#define OMAP24XX_DMA_AES_TX            9       /* S_DMA_8 */
-#define OMAP24XX_DMA_AES_RX            10      /* S_DMA_9 */
-#define OMAP242X_DMA_EXT_DMAREQ2       14      /* S_DMA_13 */
-#define OMAP242X_DMA_EXT_DMAREQ3       15      /* S_DMA_14 */
-#define OMAP242X_DMA_EXT_DMAREQ4       16      /* S_DMA_15 */
-#define OMAP34XX_DMA_I2C3_TX           25      /* S_DMA_24 */
-#define OMAP34XX_DMA_I2C3_RX           26      /* S_DMA_25 */
-#define OMAP24XX_DMA_I2C1_TX           27      /* S_DMA_26 */
-#define OMAP24XX_DMA_I2C1_RX           28      /* S_DMA_27 */
-#define OMAP24XX_DMA_I2C2_TX           29      /* S_DMA_28 */
-#define OMAP24XX_DMA_I2C2_RX           30      /* S_DMA_29 */
-#define OMAP24XX_DMA_MMC2_TX           47      /* S_DMA_46 */
-#define OMAP24XX_DMA_MMC2_RX           48      /* S_DMA_47 */
-#define OMAP24XX_DMA_UART1_TX          49      /* S_DMA_48 */
-#define OMAP24XX_DMA_UART1_RX          50      /* S_DMA_49 */
-#define OMAP24XX_DMA_UART2_TX          51      /* S_DMA_50 */
-#define OMAP24XX_DMA_UART2_RX          52      /* S_DMA_51 */
-#define OMAP24XX_DMA_UART3_TX          53      /* S_DMA_52 */
-#define OMAP24XX_DMA_UART3_RX          54      /* S_DMA_53 */
-#define OMAP24XX_DMA_MMC1_TX           61      /* S_DMA_60 */
-#define OMAP24XX_DMA_MMC1_RX           62      /* S_DMA_61 */
-#define OMAP242X_DMA_EXT_DMAREQ5       64      /* S_DMA_63 */
-#define OMAP34XX_DMA_AES2_TX           65      /* S_DMA_64 */
-#define OMAP34XX_DMA_AES2_RX           66      /* S_DMA_65 */
-#define OMAP34XX_DMA_SHA1MD5_RX                69      /* S_DMA_68 */
-
-#define OMAP36XX_DMA_UART4_TX          81      /* S_DMA_80 */
-#define OMAP36XX_DMA_UART4_RX          82      /* S_DMA_81 */
-
-/* Only for AM35xx */
-#define AM35XX_DMA_UART4_TX            54
-#define AM35XX_DMA_UART4_RX            55
-
-#endif /* __OMAP2PLUS_DMA_CHANNEL_H */
index 534974e..5da7a42 100644 (file)
@@ -17,7 +17,6 @@
 #include "hdq1w.h"
 
 #include "omap_hwmod_common_data.h"
-#include "dma.h"
 
 /* UART */
 
@@ -89,32 +88,32 @@ struct omap_hwmod_class omap2_venc_hwmod_class = {
 
 /* Common DMA request line data */
 struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
+       { .name = "rx", .dma_req = 50, },
+       { .name = "tx", .dma_req = 49, },
        { .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
+       { .name = "rx", .dma_req = 52, },
+       { .name = "tx", .dma_req = 51, },
        { .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
+       { .name = "rx", .dma_req = 54, },
+       { .name = "tx", .dma_req = 53, },
        { .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
+       { .name = "tx", .dma_req = 27 },
+       { .name = "rx", .dma_req = 28 },
        { .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
+       { .name = "tx", .dma_req = 29 },
+       { .name = "rx", .dma_req = 30 },
        { .dma_req = -1 }
 };
 
index 31c7126..fa99154 100644 (file)
@@ -35,7 +35,6 @@
 #include "prm-regbits-34xx.h"
 #include "cm-regbits-34xx.h"
 
-#include "dma.h"
 #include "i2c.h"
 #include "mmc.h"
 #include "wd_timer.h"
@@ -548,8 +547,8 @@ static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
 };
 
 static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
-       { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
+       { .name = "rx", .dma_req = 82, },
+       { .name = "tx", .dma_req = 81, },
        { .dma_req = -1 }
 };
 
@@ -577,8 +576,8 @@ static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
 };
 
 static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
-       { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
-       { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
+       { .name = "rx", .dma_req = 55, },
+       { .name = "tx", .dma_req = 54, },
        { .dma_req = -1 }
 };
 
@@ -857,8 +856,8 @@ static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
 };
 
 static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
-       { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
+       { .name = "tx", .dma_req = 25 },
+       { .name = "rx", .dma_req = 26 },
        { .dma_req = -1 }
 };
 
@@ -3581,7 +3580,7 @@ static struct omap_hwmod_irq_info omap3_sham_mpu_irqs[] = {
 };
 
 static struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP34XX_DMA_SHA1MD5_RX, },
+       { .name = "rx", .dma_req = 69, },
        { .dma_req = -1 }
 };
 
@@ -3642,8 +3641,8 @@ static struct omap_hwmod_class omap3xxx_aes_class = {
 };
 
 static struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP34XX_DMA_AES2_TX, },
-       { .name = "rx", .dma_req = OMAP34XX_DMA_AES2_RX, },
+       { .name = "tx", .dma_req = 65, },
+       { .name = "rx", .dma_req = 66, },
        { .dma_req = -1 }
 };
 
index e06c34b..4d463ca 100644 (file)
@@ -701,8 +701,8 @@ int omap_request_dma(int dev_id, const char *dev_name,
        for (ch = 0; ch < dma_chan_count; ch++) {
                if (free_ch == -1 && dma_chan[ch].dev_id == -1) {
                        free_ch = ch;
-                       if (dev_id == 0)
-                               break;
+                       /* Exit after first free channel found */
+                       break;
                }
        }
        if (free_ch == -1) {
@@ -894,11 +894,12 @@ void omap_start_dma(int lch)
                int next_lch, cur_lch;
                char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
 
-               dma_chan_link_map[lch] = 1;
                /* Set the link register of the first channel */
                enable_lnk(lch);
 
                memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
+               dma_chan_link_map[lch] = 1;
+
                cur_lch = dma_chan[lch].next_lch;
                do {
                        next_lch = dma_chan[cur_lch].next_lch;
@@ -2110,8 +2111,6 @@ exit_dma_irq_fail:
        }
 
 exit_dma_lch_fail:
-       kfree(p);
-       kfree(d);
        kfree(dma_chan);
        return ret;
 }
@@ -2132,8 +2131,6 @@ static int omap_system_dma_remove(struct platform_device *pdev)
                        free_irq(dma_irq, (void *)(irq_rel + 1));
                }
        }
-       kfree(p);
-       kfree(d);
        kfree(dma_chan);
        return 0;
 }