* [U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate enum dma_data_direction
@ 2017-08-25 15:50 Masahiro Yamada
2017-08-25 16:34 ` Andy Shevchenko
2017-09-13 2:29 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2017-08-25 15:50 UTC (permalink / raw)
To: u-boot
Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
duplicated definitions of enum dma_data_direction.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/include/asm/dma-mapping.h | 8 ++------
arch/nds32/include/asm/dma-mapping.h | 6 +-----
arch/x86/include/asm/dma-mapping.h | 8 ++------
drivers/ata/sata_dwc.c | 1 +
drivers/ata/sata_dwc.h | 7 -------
drivers/mmc/uniphier-sd.c | 2 +-
include/linux/dma-direction.h | 13 +++++++++++++
7 files changed, 20 insertions(+), 25 deletions(-)
create mode 100644 include/linux/dma-direction.h
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index a5821f54e567..287466800e4b 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -8,13 +8,9 @@
#ifndef __ASM_ARM_DMA_MAPPING_H
#define __ASM_ARM_DMA_MAPPING_H
-#define dma_mapping_error(x, y) 0
+#include <linux/dma-direction.h>
-enum dma_data_direction {
- DMA_BIDIRECTIONAL = 0,
- DMA_TO_DEVICE = 1,
- DMA_FROM_DEVICE = 2,
-};
+#define dma_mapping_error(x, y) 0
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
{
diff --git a/arch/nds32/include/asm/dma-mapping.h b/arch/nds32/include/asm/dma-mapping.h
index 25e5a1b6ec8a..a627306ed852 100644
--- a/arch/nds32/include/asm/dma-mapping.h
+++ b/arch/nds32/include/asm/dma-mapping.h
@@ -7,11 +7,7 @@
#ifndef __ASM_NDS_DMA_MAPPING_H
#define __ASM_NDS_DMA_MAPPING_H
-enum dma_data_direction {
- DMA_BIDIRECTIONAL = 0,
- DMA_TO_DEVICE = 1,
- DMA_FROM_DEVICE = 2,
-};
+#include <linux/dma-direction.h>
static void *dma_alloc_coherent(size_t len, unsigned long *handle)
{
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 7de4c08e36ea..43073ad2524f 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -8,13 +8,9 @@
#ifndef __ASM_X86_DMA_MAPPING_H
#define __ASM_X86_DMA_MAPPING_H
-#define dma_mapping_error(x, y) 0
+#include <linux/dma-direction.h>
-enum dma_data_direction {
- DMA_BIDIRECTIONAL = 0,
- DMA_TO_DEVICE = 1,
- DMA_FROM_DEVICE = 2,
-};
+#define dma_mapping_error(x, y) 0
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
{
diff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c
index a226ca2decb5..2f3b2ddb411f 100644
--- a/drivers/ata/sata_dwc.c
+++ b/drivers/ata/sata_dwc.c
@@ -26,6 +26,7 @@
#include <command.h>
#include <pci.h>
#include <asm/processor.h>
+#include <linux/dma-direction.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <malloc.h>
diff --git a/drivers/ata/sata_dwc.h b/drivers/ata/sata_dwc.h
index e2d9e0c1fce8..17fb20cf437b 100644
--- a/drivers/ata/sata_dwc.h
+++ b/drivers/ata/sata_dwc.h
@@ -401,13 +401,6 @@ struct ata_device {
#endif
};
-enum dma_data_direction {
- DMA_BIDIRECTIONAL = 0,
- DMA_TO_DEVICE = 1,
- DMA_FROM_DEVICE = 2,
- DMA_NONE = 3,
-};
-
struct ata_link {
struct ata_port *ap;
int pmp;
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index e272b1415324..721b75fddace 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -11,10 +11,10 @@
#include <mmc.h>
#include <dm.h>
#include <linux/compat.h>
+#include <linux/dma-direction.h>
#include <linux/io.h>
#include <linux/sizes.h>
#include <asm/unaligned.h>
-#include <asm/dma-mapping.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/include/linux/dma-direction.h b/include/linux/dma-direction.h
new file mode 100644
index 000000000000..95b6a82f5951
--- /dev/null
+++ b/include/linux/dma-direction.h
@@ -0,0 +1,13 @@
+#ifndef _LINUX_DMA_DIRECTION_H
+#define _LINUX_DMA_DIRECTION_H
+/*
+ * These definitions mirror those in pci.h, so they can be used
+ * interchangeably with their PCI_ counterparts.
+ */
+enum dma_data_direction {
+ DMA_BIDIRECTIONAL = 0,
+ DMA_TO_DEVICE = 1,
+ DMA_FROM_DEVICE = 2,
+ DMA_NONE = 3,
+};
+#endif
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate enum dma_data_direction
2017-08-25 15:50 [U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate enum dma_data_direction Masahiro Yamada
@ 2017-08-25 16:34 ` Andy Shevchenko
2017-09-13 2:29 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2017-08-25 16:34 UTC (permalink / raw)
To: u-boot
On Sat, 2017-08-26 at 00:50 +0900, Masahiro Yamada wrote:
> Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
> duplicated definitions of enum dma_data_direction.
>
Makes sense.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/arm/include/asm/dma-mapping.h | 8 ++------
> arch/nds32/include/asm/dma-mapping.h | 6 +-----
> arch/x86/include/asm/dma-mapping.h | 8 ++------
> drivers/ata/sata_dwc.c | 1 +
> drivers/ata/sata_dwc.h | 7 -------
> drivers/mmc/uniphier-sd.c | 2 +-
> include/linux/dma-direction.h | 13 +++++++++++++
> 7 files changed, 20 insertions(+), 25 deletions(-)
> create mode 100644 include/linux/dma-direction.h
>
> diff --git a/arch/arm/include/asm/dma-mapping.h
> b/arch/arm/include/asm/dma-mapping.h
> index a5821f54e567..287466800e4b 100644
> --- a/arch/arm/include/asm/dma-mapping.h
> +++ b/arch/arm/include/asm/dma-mapping.h
> @@ -8,13 +8,9 @@
> #ifndef __ASM_ARM_DMA_MAPPING_H
> #define __ASM_ARM_DMA_MAPPING_H
>
> -#define dma_mapping_error(x, y) 0
> +#include <linux/dma-direction.h>
>
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL = 0,
> - DMA_TO_DEVICE = 1,
> - DMA_FROM_DEVICE = 2,
> -};
> +#define dma_mapping_error(x, y) 0
>
> static inline void *dma_alloc_coherent(size_t len, unsigned long
> *handle)
> {
> diff --git a/arch/nds32/include/asm/dma-mapping.h
> b/arch/nds32/include/asm/dma-mapping.h
> index 25e5a1b6ec8a..a627306ed852 100644
> --- a/arch/nds32/include/asm/dma-mapping.h
> +++ b/arch/nds32/include/asm/dma-mapping.h
> @@ -7,11 +7,7 @@
> #ifndef __ASM_NDS_DMA_MAPPING_H
> #define __ASM_NDS_DMA_MAPPING_H
>
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL = 0,
> - DMA_TO_DEVICE = 1,
> - DMA_FROM_DEVICE = 2,
> -};
> +#include <linux/dma-direction.h>
>
> static void *dma_alloc_coherent(size_t len, unsigned long *handle)
> {
> diff --git a/arch/x86/include/asm/dma-mapping.h
> b/arch/x86/include/asm/dma-mapping.h
> index 7de4c08e36ea..43073ad2524f 100644
> --- a/arch/x86/include/asm/dma-mapping.h
> +++ b/arch/x86/include/asm/dma-mapping.h
> @@ -8,13 +8,9 @@
> #ifndef __ASM_X86_DMA_MAPPING_H
> #define __ASM_X86_DMA_MAPPING_H
>
> -#define dma_mapping_error(x, y) 0
> +#include <linux/dma-direction.h>
>
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL = 0,
> - DMA_TO_DEVICE = 1,
> - DMA_FROM_DEVICE = 2,
> -};
> +#define dma_mapping_error(x, y) 0
>
> static inline void *dma_alloc_coherent(size_t len, unsigned long
> *handle)
> {
> diff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c
> index a226ca2decb5..2f3b2ddb411f 100644
> --- a/drivers/ata/sata_dwc.c
> +++ b/drivers/ata/sata_dwc.c
> @@ -26,6 +26,7 @@
> #include <command.h>
> #include <pci.h>
> #include <asm/processor.h>
> +#include <linux/dma-direction.h>
> #include <linux/errno.h>
> #include <asm/io.h>
> #include <malloc.h>
> diff --git a/drivers/ata/sata_dwc.h b/drivers/ata/sata_dwc.h
> index e2d9e0c1fce8..17fb20cf437b 100644
> --- a/drivers/ata/sata_dwc.h
> +++ b/drivers/ata/sata_dwc.h
> @@ -401,13 +401,6 @@ struct ata_device {
> #endif
> };
>
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL = 0,
> - DMA_TO_DEVICE = 1,
> - DMA_FROM_DEVICE = 2,
> - DMA_NONE = 3,
> -};
> -
> struct ata_link {
> struct ata_port *ap;
> int pmp;
> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
> index e272b1415324..721b75fddace 100644
> --- a/drivers/mmc/uniphier-sd.c
> +++ b/drivers/mmc/uniphier-sd.c
> @@ -11,10 +11,10 @@
> #include <mmc.h>
> #include <dm.h>
> #include <linux/compat.h>
> +#include <linux/dma-direction.h>
> #include <linux/io.h>
> #include <linux/sizes.h>
> #include <asm/unaligned.h>
> -#include <asm/dma-mapping.h>
>
> DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/include/linux/dma-direction.h b/include/linux/dma-
> direction.h
> new file mode 100644
> index 000000000000..95b6a82f5951
> --- /dev/null
> +++ b/include/linux/dma-direction.h
> @@ -0,0 +1,13 @@
> +#ifndef _LINUX_DMA_DIRECTION_H
> +#define _LINUX_DMA_DIRECTION_H
> +/*
> + * These definitions mirror those in pci.h, so they can be used
> + * interchangeably with their PCI_ counterparts.
> + */
> +enum dma_data_direction {
> + DMA_BIDIRECTIONAL = 0,
> + DMA_TO_DEVICE = 1,
> + DMA_FROM_DEVICE = 2,
> + DMA_NONE = 3,
> +};
> +#endif
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] dma: import linux/dma-direction.h to consolidate enum dma_data_direction
2017-08-25 15:50 [U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate enum dma_data_direction Masahiro Yamada
2017-08-25 16:34 ` Andy Shevchenko
@ 2017-09-13 2:29 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-09-13 2:29 UTC (permalink / raw)
To: u-boot
On Sat, Aug 26, 2017 at 12:50:17AM +0900, Masahiro Yamada wrote:
> Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
> duplicated definitions of enum dma_data_direction.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170912/42b5c779/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-13 2:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 15:50 [U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate enum dma_data_direction Masahiro Yamada
2017-08-25 16:34 ` Andy Shevchenko
2017-09-13 2:29 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.