From patchwork Fri Feb 14 07:40:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1237903 X-Patchwork-Delegate: van.freenix@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=s8eEp79M; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48JlgC06TCz9s29 for ; Fri, 14 Feb 2020 18:41:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1645781256; Fri, 14 Feb 2020 08:40:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="s8eEp79M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8D278125D; Fri, 14 Feb 2020 08:40:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5CBFD81256 for ; Fri, 14 Feb 2020 08:40:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id 01E7eUJd020527; Fri, 14 Feb 2020 16:40:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 01E7eUJd020527 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1581666031; bh=s/sN5pPVmr5Y1EJLmZ28+eUv0VktV1+63TnV1OOpT/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s8eEp79MTwjC5i/KHF6bfoRLrteqbUdk3C1u6SXMyUipxntDQPUmiRUd1eDzpSS0G +8KIAloN8uGnuuuSbJoUO54xN4aM4QyjmeOlns3Tt8w+h9E5SZ8Bab3X2Aelw++NAD Rvk29ds4QLNWwlTEaEtjGXCG67VjX4MQyNPXGoVPagUdEGuu9KH+UjZ2nxHRhYNuYN 6AaFV8XXk4GAhgrdMfKMC6IttNkSTDnzkB5Kn2IaXx2Ed2rYHaP1+QOy0iQPR8O66w CFCoCWOPldqPNSG9ZaHIMCHU/t9Vyvo9HMafUwxYTUCjbACkkgzVYfxG2WZorpI6li 5KIvmt1Rzekyg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Peng Fan , Masahiro Yamada Subject: [PATCH v3 01/11] dma-mapping: fix the prototype of dma_map_single() Date: Fri, 14 Feb 2020 16:40:17 +0900 Message-Id: <20200214074027.19824-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200214074027.19824-1-yamada.masahiro@socionext.com> References: <20200214074027.19824-1-yamada.masahiro@socionext.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.1 at phobos.denx.de X-Virus-Status: Clean Make dma_map_single() return the dma address, and remove the pointless volatile. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None arch/arm/include/asm/dma-mapping.h | 5 +++-- arch/nds32/include/asm/dma-mapping.h | 5 +++-- arch/riscv/include/asm/dma-mapping.h | 5 +++-- arch/x86/include/asm/dma-mapping.h | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index d20703739fad..d0895a209666 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #define dma_mapping_error(x, y) 0 @@ -26,8 +27,8 @@ static inline void dma_free_coherent(void *addr) free(addr); } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr; diff --git a/arch/nds32/include/asm/dma-mapping.h b/arch/nds32/include/asm/dma-mapping.h index c8876ceadda6..9387dec34768 100644 --- a/arch/nds32/include/asm/dma-mapping.h +++ b/arch/nds32/include/asm/dma-mapping.h @@ -10,6 +10,7 @@ #include #include #include +#include #include static void *dma_alloc_coherent(size_t len, unsigned long *handle) @@ -18,8 +19,8 @@ static void *dma_alloc_coherent(size_t len, unsigned long *handle) return (void *)*handle; } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr; diff --git a/arch/riscv/include/asm/dma-mapping.h b/arch/riscv/include/asm/dma-mapping.h index 6cc39469590a..eac56f8fbdfa 100644 --- a/arch/riscv/include/asm/dma-mapping.h +++ b/arch/riscv/include/asm/dma-mapping.h @@ -10,6 +10,7 @@ #define __ASM_RISCV_DMA_MAPPING_H #include +#include #include #include #include @@ -28,8 +29,8 @@ static inline void dma_free_coherent(void *addr) free(addr); } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr; diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 900b99b8a69a..7e205e3313ac 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #define dma_mapping_error(x, y) 0 @@ -26,8 +27,8 @@ static inline void dma_free_coherent(void *addr) free(addr); } -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) +static inline dma_addr_t dma_map_single(void *vaddr, size_t len, + enum dma_data_direction dir) { unsigned long addr = (unsigned long)vaddr;