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>
This commit is contained in:
Arnd Bergmann 2019-08-09 18:33:18 +02:00
Родитель 00c9755524
Коммит aad7ad2a01
6 изменённых файлов: 9 добавлений и 18 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -6,8 +6,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <asm/hardware/iop3xx.h> #include <asm/hardware/iop3xx.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <mach/adma.h> #include <linux/platform_data/dma-iop32x.h>
#include <asm/hardware/iop_adma.h>
#define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT #define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT
#define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC #define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC

Просмотреть файл

@ -294,8 +294,8 @@ config INTEL_IOATDMA
If unsure, say N. If unsure, say N.
config INTEL_IOP_ADMA config INTEL_IOP_ADMA
tristate "Intel IOP ADMA support" tristate "Intel IOP32x ADMA support"
depends on ARCH_IOP32X depends on ARCH_IOP32X || COMPILE_TEST
select DMA_ENGINE select DMA_ENGINE
select ASYNC_TX_ENABLE_CHANNEL_SWITCH select ASYNC_TX_ENABLE_CHANNEL_SWITCH
help help

Просмотреть файл

@ -22,8 +22,7 @@
#include <linux/raid/pq.h> #include <linux/raid/pq.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <mach/adma.h> #include "iop-adma.h"
#include "dmaengine.h" #include "dmaengine.h"
#define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common) #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common)

Просмотреть файл

@ -6,8 +6,7 @@
#define _ADMA_H #define _ADMA_H
#include <linux/types.h> #include <linux/types.h>
#include <linux/io.h> #include <linux/io.h>
#include <mach/hardware.h> #include <linux/platform_data/dma-iop32x.h>
#include <asm/hardware/iop_adma.h>
/* Memory copy units */ /* Memory copy units */
#define DMA_CCR(chan) (chan->mmr_base + 0x0) #define DMA_CCR(chan) (chan->mmr_base + 0x0)
@ -34,10 +33,6 @@
#define AAU_EDCR1_IDX 17 #define AAU_EDCR1_IDX 17
#define AAU_EDCR2_IDX 26 #define AAU_EDCR2_IDX 26
#define DMA0_ID 0
#define DMA1_ID 1
#define AAU_ID 2
struct iop3xx_aau_desc_ctrl { struct iop3xx_aau_desc_ctrl {
unsigned int int_en:1; unsigned int int_en:1;
unsigned int blk1_cmd_ctrl:3; unsigned int blk1_cmd_ctrl:3;

Просмотреть файл

@ -17,6 +17,10 @@
#endif #endif
#define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x)) #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 * struct iop_adma_device - internal representation of an ADMA device
* @pdev: Platform device * @pdev: Platform device