]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00152282 MX6: build with mx5 default configure failed
authorZeng Zhaoming <b32542@freescale.com>
Wed, 29 Jun 2011 08:14:55 +0000 (16:14 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:55 +0000 (08:32 +0200)
After merge mx6 MSL code, MX5 default configure build failed,
This is caused by mx6 macro definition, and wrongly removed sdma
common code.

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
arch/arm/plat-mxc/include/mach/dma.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/mxc.h

diff --git a/arch/arm/plat-mxc/include/mach/dma.h b/arch/arm/plat-mxc/include/mach/dma.h
new file mode 100644 (file)
index 0000000..ee137b4
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * 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 __ASM_ARCH_MXC_DMA_H__
+#define __ASM_ARCH_MXC_DMA_H__
+
+#include <linux/scatterlist.h>
+#include <linux/device.h>
+#include <linux/dmaengine.h>
+
+#define MXC_DMA_DYNAMIC_CHANNEL   255
+
+#define MXC_DMA_DONE             0x0
+#define MXC_DMA_REQUEST_TIMEOUT   0x1
+#define MXC_DMA_TRANSFER_ERROR    0x2
+
+/*
+ * This enumerates peripheral types. Used for SDMA.
+ */
+enum sdma_peripheral_type {
+       IMX_DMATYPE_SSI,        /* MCU domain SSI */
+       IMX_DMATYPE_SSI_SP,     /* Shared SSI */
+       IMX_DMATYPE_MMC,        /* MMC */
+       IMX_DMATYPE_SDHC,       /* SDHC */
+       IMX_DMATYPE_UART,       /* MCU domain UART */
+       IMX_DMATYPE_UART_SP,    /* Shared UART */
+       IMX_DMATYPE_FIRI,       /* FIRI */
+       IMX_DMATYPE_CSPI,       /* MCU domain CSPI */
+       IMX_DMATYPE_CSPI_SP,    /* Shared CSPI */
+       IMX_DMATYPE_SIM,        /* SIM */
+       IMX_DMATYPE_ATA,        /* ATA */
+       IMX_DMATYPE_CCM,        /* CCM */
+       IMX_DMATYPE_EXT,        /* External peripheral */
+       IMX_DMATYPE_MSHC,       /* Memory Stick Host Controller */
+       IMX_DMATYPE_MSHC_SP,    /* Shared Memory Stick Host Controller */
+       IMX_DMATYPE_DSP,        /* DSP */
+       IMX_DMATYPE_MEMORY,     /* Memory */
+       IMX_DMATYPE_FIFO_MEMORY,/* FIFO type Memory */
+       IMX_DMATYPE_SPDIF,      /* SPDIF */
+       IMX_DMATYPE_IPU_MEMORY, /* IPU Memory */
+       IMX_DMATYPE_ASRC,       /* ASRC */
+       IMX_DMATYPE_ESAI,       /* ESAI */
+};
+
+enum imx_dma_prio {
+       DMA_PRIO_HIGH = 0,
+       DMA_PRIO_MEDIUM = 1,
+       DMA_PRIO_LOW = 2
+};
+
+struct imx_dma_data {
+       int dma_request; /* DMA request line */
+       enum sdma_peripheral_type peripheral_type;
+       int priority;
+};
+
+struct imx_pcm_dma_params {
+       enum sdma_peripheral_type peripheral_type;
+       int dma;
+       unsigned long dma_addr;
+       int burstsize;
+};
+
+static inline int imx_dma_is_ipu(struct dma_chan *chan)
+{
+       return !strcmp(dev_name(chan->device->dev), "ipu-core");
+}
+
+static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
+{
+       return !strcmp(dev_name(chan->device->dev), "imx-sdma") ||
+               !strcmp(dev_name(chan->device->dev), "imx-dma");
+}
+
+#endif
index 1c768a1e6745c7725f72eb466711be794b6ab015..21d0ba268368b6290f638c8cf8abce82c48bc0f2 100755 (executable)
@@ -210,6 +210,8 @@ extern unsigned int __mxc_cpu_type;
 
 #ifdef CONFIG_SOC_IMX6Q
 #define cpu_is_mx6q()          (1)
+#else
+#define cpu_is_mx6q()          (0)
 #endif
 
 struct cpu_op {