{"id":805950,"url":"http://patchwork.ozlabs.org/api/patches/805950/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com>","list_archive_url":null,"date":"2017-08-25T15:50:17","name":"[U-Boot] dma: import linux/dma-direction.h to consolidate enum dma_data_direction","commit_ref":"b27af39935855c88ef2203dcfc1ff54e013237c4","pull_url":null,"state":"accepted","archived":false,"hash":"15f58e37048ccf795b42fdbcaa33038e1758642e","submitter":{"id":65882,"url":"http://patchwork.ozlabs.org/api/people/65882/?format=json","name":"Masahiro Yamada","email":"yamada.masahiro@socionext.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/805950/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/805950/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=nifty.com header.i=@nifty.com\n\theader.b=\"Yj8nlcuF\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xf5Hl27plz9sNd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 26 Aug 2017 01:51:31 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid E94B7C21F6B; Fri, 25 Aug 2017 15:51:24 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 2C9B1C21EEC;\n\tFri, 25 Aug 2017 15:51:22 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 4236DC21EEC; Fri, 25 Aug 2017 15:51:20 +0000 (UTC)","from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77])\n\tby lists.denx.de (Postfix) with ESMTPS id 81FBCC21C73\n\tfor <u-boot@lists.denx.de>; Fri, 25 Aug 2017 15:51:18 +0000 (UTC)","from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp\n\t[122.131.185.176]) (authenticated)\n\tby conuserg-10.nifty.com with ESMTP id v7PFoNwd025245;\n\tSat, 26 Aug 2017 00:50:24 +0900"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=T_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Filter":"OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v7PFoNwd025245","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1503676224;\n\tbh=dVIpB+doFmmQKRWMMTYhfQIHFIdLDRdEaSITGnIArsI=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Yj8nlcuFRoPP2C454VrbTA/JQlErbY12slkI0IR2I0fRUNdQRER749yIBeyFtDGDx\n\tGYso+ZCyctCbeg0wD+oX1bGd6kY10EYnnXCdYibcVu4hT4t2u0msST4dTBNEdi14MD\n\tKR3ZDajMcRnVNngXad7IhmPFqsN1rB1qM/VFUsT8YcwKrEBpt1Z4ckkzmWivkLX87B\n\txQ1yOep7yavJsW7PbgXCKyxUCFBvDhAPpmBMNz4SyGMtT4nAzCUzSlvZ/wfaCVFlrb\n\tPsL9JCrzy0rEJ3byBOilO76xqGWYIZAS4rbeaiLPFgb+kUY1iVbJJcnx/00c5vMUAs\n\tDThbtJuR+tuow==","X-Nifty-SrcIP":"[122.131.185.176]","From":"Masahiro Yamada <yamada.masahiro@socionext.com>","To":"u-boot@lists.denx.de","Date":"Sat, 26 Aug 2017 00:50:17 +0900","Message-Id":"<1503676217-27262-1-git-send-email-yamada.masahiro@socionext.com>","X-Mailer":"git-send-email 2.7.4","Cc":"Albert Aribaud <albert.u.boot@aribaud.net>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tMacpaul Lin <macpaul@andestech.com>","Subject":"[U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate\n\tenum dma_data_direction","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete\nduplicated definitions of enum dma_data_direction.\n\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n\n arch/arm/include/asm/dma-mapping.h   |  8 ++------\n arch/nds32/include/asm/dma-mapping.h |  6 +-----\n arch/x86/include/asm/dma-mapping.h   |  8 ++------\n drivers/ata/sata_dwc.c               |  1 +\n drivers/ata/sata_dwc.h               |  7 -------\n drivers/mmc/uniphier-sd.c            |  2 +-\n include/linux/dma-direction.h        | 13 +++++++++++++\n 7 files changed, 20 insertions(+), 25 deletions(-)\n create mode 100644 include/linux/dma-direction.h","diff":"diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h\nindex a5821f54e567..287466800e4b 100644\n--- a/arch/arm/include/asm/dma-mapping.h\n+++ b/arch/arm/include/asm/dma-mapping.h\n@@ -8,13 +8,9 @@\n #ifndef __ASM_ARM_DMA_MAPPING_H\n #define __ASM_ARM_DMA_MAPPING_H\n \n-#define\tdma_mapping_error(x, y)\t0\n+#include <linux/dma-direction.h>\n \n-enum dma_data_direction {\n-\tDMA_BIDIRECTIONAL\t= 0,\n-\tDMA_TO_DEVICE\t\t= 1,\n-\tDMA_FROM_DEVICE\t\t= 2,\n-};\n+#define\tdma_mapping_error(x, y)\t0\n \n static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)\n {\ndiff --git a/arch/nds32/include/asm/dma-mapping.h b/arch/nds32/include/asm/dma-mapping.h\nindex 25e5a1b6ec8a..a627306ed852 100644\n--- a/arch/nds32/include/asm/dma-mapping.h\n+++ b/arch/nds32/include/asm/dma-mapping.h\n@@ -7,11 +7,7 @@\n #ifndef __ASM_NDS_DMA_MAPPING_H\n #define __ASM_NDS_DMA_MAPPING_H\n \n-enum dma_data_direction {\n-\tDMA_BIDIRECTIONAL\t= 0,\n-\tDMA_TO_DEVICE\t\t= 1,\n-\tDMA_FROM_DEVICE\t\t= 2,\n-};\n+#include <linux/dma-direction.h>\n \n static void *dma_alloc_coherent(size_t len, unsigned long *handle)\n {\ndiff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h\nindex 7de4c08e36ea..43073ad2524f 100644\n--- a/arch/x86/include/asm/dma-mapping.h\n+++ b/arch/x86/include/asm/dma-mapping.h\n@@ -8,13 +8,9 @@\n #ifndef __ASM_X86_DMA_MAPPING_H\n #define __ASM_X86_DMA_MAPPING_H\n \n-#define\tdma_mapping_error(x, y)\t0\n+#include <linux/dma-direction.h>\n \n-enum dma_data_direction {\n-\tDMA_BIDIRECTIONAL\t= 0,\n-\tDMA_TO_DEVICE\t\t= 1,\n-\tDMA_FROM_DEVICE\t\t= 2,\n-};\n+#define\tdma_mapping_error(x, y)\t0\n \n static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)\n {\ndiff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c\nindex a226ca2decb5..2f3b2ddb411f 100644\n--- a/drivers/ata/sata_dwc.c\n+++ b/drivers/ata/sata_dwc.c\n@@ -26,6 +26,7 @@\n #include <command.h>\n #include <pci.h>\n #include <asm/processor.h>\n+#include <linux/dma-direction.h>\n #include <linux/errno.h>\n #include <asm/io.h>\n #include <malloc.h>\ndiff --git a/drivers/ata/sata_dwc.h b/drivers/ata/sata_dwc.h\nindex e2d9e0c1fce8..17fb20cf437b 100644\n--- a/drivers/ata/sata_dwc.h\n+++ b/drivers/ata/sata_dwc.h\n@@ -401,13 +401,6 @@ struct ata_device {\n #endif\n };\n \n-enum dma_data_direction {\n-\tDMA_BIDIRECTIONAL = 0,\n-\tDMA_TO_DEVICE = 1,\n-\tDMA_FROM_DEVICE = 2,\n-\tDMA_NONE = 3,\n-};\n-\n struct ata_link {\n \tstruct ata_port\t\t*ap;\n \tint\t\t\tpmp;\ndiff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c\nindex e272b1415324..721b75fddace 100644\n--- a/drivers/mmc/uniphier-sd.c\n+++ b/drivers/mmc/uniphier-sd.c\n@@ -11,10 +11,10 @@\n #include <mmc.h>\n #include <dm.h>\n #include <linux/compat.h>\n+#include <linux/dma-direction.h>\n #include <linux/io.h>\n #include <linux/sizes.h>\n #include <asm/unaligned.h>\n-#include <asm/dma-mapping.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n \ndiff --git a/include/linux/dma-direction.h b/include/linux/dma-direction.h\nnew file mode 100644\nindex 000000000000..95b6a82f5951\n--- /dev/null\n+++ b/include/linux/dma-direction.h\n@@ -0,0 +1,13 @@\n+#ifndef _LINUX_DMA_DIRECTION_H\n+#define _LINUX_DMA_DIRECTION_H\n+/*\n+ * These definitions mirror those in pci.h, so they can be used\n+ * interchangeably with their PCI_ counterparts.\n+ */\n+enum dma_data_direction {\n+\tDMA_BIDIRECTIONAL = 0,\n+\tDMA_TO_DEVICE = 1,\n+\tDMA_FROM_DEVICE = 2,\n+\tDMA_NONE = 3,\n+};\n+#endif\n","prefixes":["U-Boot"]}