]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dma: iop-adma: allow building without platform headers
authorArnd Bergmann <arnd@arndb.de>
Fri, 9 Aug 2019 16:33:18 +0000 (18:33 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 14 Aug 2019 13:36:22 +0000 (15:36 +0200)
Now that iop3xx and iop13xx are gone, the iop-adma driver no
longer needs to deal with incompatible register layout defined
in machine specific header files.

Move the iop32x specific definitions into drivers/dma/iop-adma.h
and the platform_data into include/linux/platform_data/dma-iop32x.h,
and change the machine code to no longer reference those.

The DMA0_ID/DMA1_ID/AAU_ID macros are required as part of the
platform data interface and still need to be visible, so move
those from one header to the other.

Link: https://lore.kernel.org/r/20190809163334.489360-4-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-iop32x/include/mach/adma.h [deleted file]
arch/arm/plat-iop/adma.c
drivers/dma/Kconfig
drivers/dma/iop-adma.c
drivers/dma/iop-adma.h [moved from arch/arm/include/asm/hardware/iop3xx-adma.h with 99% similarity]
include/linux/platform_data/dma-iop32x.h [moved from arch/arm/include/asm/hardware/iop_adma.h with 98% similarity]

diff --git a/arch/arm/mach-iop32x/include/mach/adma.h b/arch/arm/mach-iop32x/include/mach/adma.h
deleted file mode 100644 (file)
index 2b20063..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef IOP32X_ADMA_H
-#define IOP32X_ADMA_H
-#include <asm/hardware/iop3xx-adma.h>
-#endif
-
index 368496471e605fc171d969d366e5d0c4ae2e6d48..601cc9c11b0713e5fd6f5a6321c348546c3b4f85 100644 (file)
@@ -6,8 +6,7 @@
 #include <linux/platform_device.h>
 #include <asm/hardware/iop3xx.h>
 #include <linux/dma-mapping.h>
-#include <mach/adma.h>
-#include <asm/hardware/iop_adma.h>
+#include <linux/platform_data/dma-iop32x.h>
 
 #define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT
 #define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC
index cc84863bc52bbd4af71aa7300eda8936a3092c95..7c511e3db4c8e7cff0d89128f2e509eda114a536 100644 (file)
@@ -294,8 +294,8 @@ config INTEL_IOATDMA
          If unsure, say N.
 
 config INTEL_IOP_ADMA
-       tristate "Intel IOP ADMA support"
-       depends on ARCH_IOP32X
+       tristate "Intel IOP32x ADMA support"
+       depends on ARCH_IOP32X || COMPILE_TEST
        select DMA_ENGINE
        select ASYNC_TX_ENABLE_CHANNEL_SWITCH
        help
index aebdd671651a661e9bade1c962132c1bfa76429a..03f4a588cf7faf4ba5c6973b5be0f2f346124152 100644 (file)
@@ -22,8 +22,7 @@
 #include <linux/raid/pq.h>
 #include <linux/slab.h>
 
-#include <mach/adma.h>
-
+#include "iop-adma.h"
 #include "dmaengine.h"
 
 #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common)
similarity index 99%
rename from arch/arm/include/asm/hardware/iop3xx-adma.h
rename to drivers/dma/iop-adma.h
index 6d998df17efd1a54a9cb26c3a34e159328499289..c499c9578f0097d4f00c3ef215a7f3e80fe0f555 100644 (file)
@@ -6,8 +6,7 @@
 #define _ADMA_H
 #include <linux/types.h>
 #include <linux/io.h>
-#include <mach/hardware.h>
-#include <asm/hardware/iop_adma.h>
+#include <linux/platform_data/dma-iop32x.h>
 
 /* Memory copy units */
 #define DMA_CCR(chan)          (chan->mmr_base + 0x0)
 #define AAU_EDCR1_IDX  17
 #define AAU_EDCR2_IDX  26
 
-#define DMA0_ID 0
-#define DMA1_ID 1
-#define AAU_ID 2
-
 struct iop3xx_aau_desc_ctrl {
        unsigned int int_en:1;
        unsigned int blk1_cmd_ctrl:3;
similarity index 98%
rename from arch/arm/include/asm/hardware/iop_adma.h
rename to include/linux/platform_data/dma-iop32x.h
index bcedbab90ac05a2d9bc65757b46abe43d982d301..ac83cff89549c7fdb82d41f10654b62142789471 100644 (file)
 #endif
 #define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x))
 
+#define DMA0_ID 0
+#define DMA1_ID 1
+#define AAU_ID 2
+
 /**
  * struct iop_adma_device - internal representation of an ADMA device
  * @pdev: Platform device