diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-08-09 12:33:18 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-08-14 09:36:22 -0400 |
commit | aad7ad2a01e774f5cd0dde8f0bc6e253ae3f0d35 (patch) | |
tree | b6537d5cf903dc10b7bb972f84a2e517454108fa | |
parent | 00c9755524fbaa28117be774d7c92fddb5ca02f3 (diff) |
dma: iop-adma: allow building without platform headers
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>
-rw-r--r-- | arch/arm/mach-iop32x/include/mach/adma.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-iop/adma.c | 3 | ||||
-rw-r--r-- | drivers/dma/Kconfig | 4 | ||||
-rw-r--r-- | drivers/dma/iop-adma.c | 3 | ||||
-rw-r--r-- | drivers/dma/iop-adma.h (renamed from arch/arm/include/asm/hardware/iop3xx-adma.h) | 7 | ||||
-rw-r--r-- | include/linux/platform_data/dma-iop32x.h (renamed from arch/arm/include/asm/hardware/iop_adma.h) | 4 |
6 files changed, 9 insertions, 18 deletions
diff --git a/arch/arm/mach-iop32x/include/mach/adma.h b/arch/arm/mach-iop32x/include/mach/adma.h deleted file mode 100644 index 2b20063123ad..000000000000 --- a/arch/arm/mach-iop32x/include/mach/adma.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | #ifndef IOP32X_ADMA_H | ||
3 | #define IOP32X_ADMA_H | ||
4 | #include <asm/hardware/iop3xx-adma.h> | ||
5 | #endif | ||
6 | |||
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c index 368496471e60..601cc9c11b07 100644 --- a/arch/arm/plat-iop/adma.c +++ b/arch/arm/plat-iop/adma.c | |||
@@ -6,8 +6,7 @@ | |||
6 | #include <linux/platform_device.h> | 6 | #include <linux/platform_device.h> |
7 | #include <asm/hardware/iop3xx.h> | 7 | #include <asm/hardware/iop3xx.h> |
8 | #include <linux/dma-mapping.h> | 8 | #include <linux/dma-mapping.h> |
9 | #include <mach/adma.h> | 9 | #include <linux/platform_data/dma-iop32x.h> |
10 | #include <asm/hardware/iop_adma.h> | ||
11 | 10 | ||
12 | #define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT | 11 | #define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT |
13 | #define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC | 12 | #define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC |
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index cc84863bc52b..7c511e3db4c8 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig | |||
@@ -294,8 +294,8 @@ config INTEL_IOATDMA | |||
294 | If unsure, say N. | 294 | If unsure, say N. |
295 | 295 | ||
296 | config INTEL_IOP_ADMA | 296 | config INTEL_IOP_ADMA |
297 | tristate "Intel IOP ADMA support" | 297 | tristate "Intel IOP32x ADMA support" |
298 | depends on ARCH_IOP32X | 298 | depends on ARCH_IOP32X || COMPILE_TEST |
299 | select DMA_ENGINE | 299 | select DMA_ENGINE |
300 | select ASYNC_TX_ENABLE_CHANNEL_SWITCH | 300 | select ASYNC_TX_ENABLE_CHANNEL_SWITCH |
301 | help | 301 | help |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index aebdd671651a..03f4a588cf7f 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <linux/raid/pq.h> | 22 | #include <linux/raid/pq.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | 24 | ||
25 | #include <mach/adma.h> | 25 | #include "iop-adma.h" |
26 | |||
27 | #include "dmaengine.h" | 26 | #include "dmaengine.h" |
28 | 27 | ||
29 | #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common) | 28 | #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common) |
diff --git a/arch/arm/include/asm/hardware/iop3xx-adma.h b/drivers/dma/iop-adma.h index 6d998df17efd..c499c9578f00 100644 --- a/arch/arm/include/asm/hardware/iop3xx-adma.h +++ b/drivers/dma/iop-adma.h | |||
@@ -6,8 +6,7 @@ | |||
6 | #define _ADMA_H | 6 | #define _ADMA_H |
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/io.h> | 8 | #include <linux/io.h> |
9 | #include <mach/hardware.h> | 9 | #include <linux/platform_data/dma-iop32x.h> |
10 | #include <asm/hardware/iop_adma.h> | ||
11 | 10 | ||
12 | /* Memory copy units */ | 11 | /* Memory copy units */ |
13 | #define DMA_CCR(chan) (chan->mmr_base + 0x0) | 12 | #define DMA_CCR(chan) (chan->mmr_base + 0x0) |
@@ -34,10 +33,6 @@ | |||
34 | #define AAU_EDCR1_IDX 17 | 33 | #define AAU_EDCR1_IDX 17 |
35 | #define AAU_EDCR2_IDX 26 | 34 | #define AAU_EDCR2_IDX 26 |
36 | 35 | ||
37 | #define DMA0_ID 0 | ||
38 | #define DMA1_ID 1 | ||
39 | #define AAU_ID 2 | ||
40 | |||
41 | struct iop3xx_aau_desc_ctrl { | 36 | struct iop3xx_aau_desc_ctrl { |
42 | unsigned int int_en:1; | 37 | unsigned int int_en:1; |
43 | unsigned int blk1_cmd_ctrl:3; | 38 | unsigned int blk1_cmd_ctrl:3; |
diff --git a/arch/arm/include/asm/hardware/iop_adma.h b/include/linux/platform_data/dma-iop32x.h index bcedbab90ac0..ac83cff89549 100644 --- a/arch/arm/include/asm/hardware/iop_adma.h +++ b/include/linux/platform_data/dma-iop32x.h | |||
@@ -17,6 +17,10 @@ | |||
17 | #endif | 17 | #endif |
18 | #define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x)) | 18 | #define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x)) |
19 | 19 | ||
20 | #define DMA0_ID 0 | ||
21 | #define DMA1_ID 1 | ||
22 | #define AAU_ID 2 | ||
23 | |||
20 | /** | 24 | /** |
21 | * struct iop_adma_device - internal representation of an ADMA device | 25 | * struct iop_adma_device - internal representation of an ADMA device |
22 | * @pdev: Platform device | 26 | * @pdev: Platform device |