diff mbox

[01/30] dmaengine: move jz4740 header from asm

Message ID 1473960849-23024-2-git-send-email-vinod.koul@intel.com (mailing list archive)
State Superseded
Headers show

Commit Message

Vinod Koul Sept. 15, 2016, 5:33 p.m. UTC
jz4740 driver exposes slave id interface values in asm header. Moving it
out helps the driver to be fine with COMPILE_TEST, so move for better
coverage

Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 arch/mips/include/asm/mach-jz4740/dma.h | 32 --------------------------------
 drivers/dma/dma-jz4740.c                |  3 +--
 drivers/mmc/host/jz4740_mmc.c           |  2 +-
 include/linux/dma/jz-dma.h              | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 34 insertions(+), 35 deletions(-)
 delete mode 100644 arch/mips/include/asm/mach-jz4740/dma.h
 create mode 100644 include/linux/dma/jz-dma.h

Comments

Lars-Peter Clausen Sept. 15, 2016, 6:12 p.m. UTC | #1
On 09/15/2016 07:33 PM, Vinod Koul wrote:
> jz4740 driver exposes slave id interface values in asm header. Moving it
> out helps the driver to be fine with COMPILE_TEST, so move for better
> coverage

The driver is actually not using anything from the include. Just removing
the include directive should be fine and is less churn.

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann Sept. 16, 2016, 7:47 a.m. UTC | #2
On Thursday, September 15, 2016 8:12:03 PM CEST Lars-Peter Clausen wrote:
> On 09/15/2016 07:33 PM, Vinod Koul wrote:
> > jz4740 driver exposes slave id interface values in asm header. Moving it
> > out helps the driver to be fine with COMPILE_TEST, so move for better
> > coverage
> 
> The driver is actually not using anything from the include. Just removing
> the include directive should be fine and is less churn.

I suppose the header could be completely removed now, and the
list turned into a "dma_slave_map" array, this is one of the
few remaining users of the "slave_id" field in the dma configuration
and we should try to remove that at some point.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lars-Peter Clausen Sept. 16, 2016, 12:10 p.m. UTC | #3
On 09/16/2016 09:47 AM, Arnd Bergmann wrote:
> On Thursday, September 15, 2016 8:12:03 PM CEST Lars-Peter Clausen wrote:
>> On 09/15/2016 07:33 PM, Vinod Koul wrote:
>>> jz4740 driver exposes slave id interface values in asm header. Moving it
>>> out helps the driver to be fine with COMPILE_TEST, so move for better
>>> coverage
>>
>> The driver is actually not using anything from the include. Just removing
>> the include directive should be fine and is less churn.
> 
> I suppose the header could be completely removed now, and the
> list turned into a "dma_slave_map" array, this is one of the
> few remaining users of the "slave_id" field in the dma configuration
> and we should try to remove that at some point.

Yeah, it is on my list, I'll try to take care of it soonish.

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul Sept. 16, 2016, 2:49 p.m. UTC | #4
On Thu, Sep 15, 2016 at 08:12:03PM +0200, Lars-Peter Clausen wrote:
> On 09/15/2016 07:33 PM, Vinod Koul wrote:
> > jz4740 driver exposes slave id interface values in asm header. Moving it
> > out helps the driver to be fine with COMPILE_TEST, so move for better
> > coverage
> 
> The driver is actually not using anything from the include. Just removing
> the include directive should be fine and is less churn.

Yes it does :) I will drop the move and remove the include..

Thanks
diff mbox

Patch

diff --git a/arch/mips/include/asm/mach-jz4740/dma.h b/arch/mips/include/asm/mach-jz4740/dma.h
deleted file mode 100644
index 14ecc5313d2d..000000000000
--- a/arch/mips/include/asm/mach-jz4740/dma.h
+++ /dev/null
@@ -1,32 +0,0 @@ 
-/*
- *  Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
- *  JZ7420/JZ4740 DMA definitions
- *
- *  This program is free software; you can redistribute it and/or modify it
- *  under  the terms of the GNU General	 Public License as published by the
- *  Free Software Foundation;  either version 2 of the License, or (at your
- *  option) any later version.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef __ASM_MACH_JZ4740_DMA_H__
-#define __ASM_MACH_JZ4740_DMA_H__
-
-enum jz4740_dma_request_type {
-	JZ4740_DMA_TYPE_AUTO_REQUEST	= 8,
-	JZ4740_DMA_TYPE_UART_TRANSMIT	= 20,
-	JZ4740_DMA_TYPE_UART_RECEIVE	= 21,
-	JZ4740_DMA_TYPE_SPI_TRANSMIT	= 22,
-	JZ4740_DMA_TYPE_SPI_RECEIVE	= 23,
-	JZ4740_DMA_TYPE_MMC_TRANSMIT	= 26,
-	JZ4740_DMA_TYPE_MMC_RECEIVE	= 27,
-	JZ4740_DMA_TYPE_TCU		= 28,
-	JZ4740_DMA_TYPE_SADC		= 29,
-	JZ4740_DMA_TYPE_SLCD		= 30,
-};
-
-#endif	/* __ASM_JZ4740_DMA_H__ */
diff --git a/drivers/dma/dma-jz4740.c b/drivers/dma/dma-jz4740.c
index 9689b36c005a..2ad5caf0b47c 100644
--- a/drivers/dma/dma-jz4740.c
+++ b/drivers/dma/dma-jz4740.c
@@ -20,8 +20,7 @@ 
 #include <linux/spinlock.h>
 #include <linux/irq.h>
 #include <linux/clk.h>
-
-#include <asm/mach-jz4740/dma.h>
+#include <linux/dma/jz-dma.h>
 
 #include "virt-dma.h"
 
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 684087db170b..3217bb237c49 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -32,7 +32,7 @@ 
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
 
-#include <asm/mach-jz4740/dma.h>
+#include <linux/dma/jz-dma.h>
 #include <asm/mach-jz4740/jz4740_mmc.h>
 
 #define JZ_REG_MMC_STRPCL	0x00
diff --git a/include/linux/dma/jz-dma.h b/include/linux/dma/jz-dma.h
new file mode 100644
index 000000000000..48419531e6ed
--- /dev/null
+++ b/include/linux/dma/jz-dma.h
@@ -0,0 +1,32 @@ 
+/*
+ *  Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
+ *  JZ7420/JZ4740 DMA definitions
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under  the terms of the GNU General	 Public License as published by the
+ *  Free Software Foundation;  either version 2 of the License, or (at your
+ *  option) any later version.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifndef __JZ4740_DMA_H__
+#define __JZ4740_DMA_H__
+
+enum jz4740_dma_request_type {
+	JZ4740_DMA_TYPE_AUTO_REQUEST	= 8,
+	JZ4740_DMA_TYPE_UART_TRANSMIT	= 20,
+	JZ4740_DMA_TYPE_UART_RECEIVE	= 21,
+	JZ4740_DMA_TYPE_SPI_TRANSMIT	= 22,
+	JZ4740_DMA_TYPE_SPI_RECEIVE	= 23,
+	JZ4740_DMA_TYPE_MMC_TRANSMIT	= 26,
+	JZ4740_DMA_TYPE_MMC_RECEIVE	= 27,
+	JZ4740_DMA_TYPE_TCU		= 28,
+	JZ4740_DMA_TYPE_SADC		= 29,
+	JZ4740_DMA_TYPE_SLCD		= 30,
+};
+
+#endif	/* __JZ4740_DMA_H__ */