Skip to content

Commit aad7ad2

Browse files
committed
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>
1 parent 00c9755 commit aad7ad2

6 files changed

Lines changed: 9 additions & 18 deletions

File tree

‎arch/arm/mach-iop32x/include/mach/adma.h‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎arch/arm/plat-iop/adma.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
#include <linux/platform_device.h>
77
#include <asm/hardware/iop3xx.h>
88
#include <linux/dma-mapping.h>
9-
#include <mach/adma.h>
10-
#include <asm/hardware/iop_adma.h>
9+
#include <linux/platform_data/dma-iop32x.h>
1110

1211
#define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT
1312
#define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC

‎drivers/dma/Kconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ config INTEL_IOATDMA
294294
If unsure, say N.
295295

296296
config INTEL_IOP_ADMA
297-
tristate "Intel IOP ADMA support"
298-
depends on ARCH_IOP32X
297+
tristate "Intel IOP32x ADMA support"
298+
depends on ARCH_IOP32X || COMPILE_TEST
299299
select DMA_ENGINE
300300
select ASYNC_TX_ENABLE_CHANNEL_SWITCH
301301
help

‎drivers/dma/iop-adma.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
#include <linux/raid/pq.h>
2323
#include <linux/slab.h>
2424

25-
#include <mach/adma.h>
26-
25+
#include "iop-adma.h"
2726
#include "dmaengine.h"
2827

2928
#define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common)

arch/arm/include/asm/hardware/iop3xx-adma.h renamed to drivers/dma/iop-adma.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
#define _ADMA_H
77
#include <linux/types.h>
88
#include <linux/io.h>
9-
#include <mach/hardware.h>
10-
#include <asm/hardware/iop_adma.h>
9+
#include <linux/platform_data/dma-iop32x.h>
1110

1211
/* Memory copy units */
1312
#define DMA_CCR(chan) (chan->mmr_base + 0x0)
@@ -34,10 +33,6 @@
3433
#define AAU_EDCR1_IDX 17
3534
#define AAU_EDCR2_IDX 26
3635

37-
#define DMA0_ID 0
38-
#define DMA1_ID 1
39-
#define AAU_ID 2
40-
4136
struct iop3xx_aau_desc_ctrl {
4237
unsigned int int_en:1;
4338
unsigned int blk1_cmd_ctrl:3;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#endif
1818
#define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x))
1919

20+
#define DMA0_ID 0
21+
#define DMA1_ID 1
22+
#define AAU_ID 2
23+
2024
/**
2125
* struct iop_adma_device - internal representation of an ADMA device
2226
* @pdev: Platform device

0 commit comments

Comments
 (0)