From patchwork Fri Feb 14 05:41:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1237855 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=85.214.62.61; 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=a6ZRP2X6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Jj2Z1LNwz9sRN for ; Fri, 14 Feb 2020 16:42:46 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8177081264; Fri, 14 Feb 2020 06:42:24 +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="a6ZRP2X6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E43CC81264; Fri, 14 Feb 2020 06:42:16 +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-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) (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 5232481256 for ; Fri, 14 Feb 2020 06:42:09 +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-11.nifty.com with ESMTP id 01E5fpBZ001312; Fri, 14 Feb 2020 14:41:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 01E5fpBZ001312 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1581658913; bh=gOUumbNbnuRZYtenOkXC32K+DgJw/6WQ7sO/vQULRks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a6ZRP2X6HPPXQfU6p0X1zB4RTZU4qOLrYB+L707kvPMdPRRaH78iAztjanYixj2sb 6rxaCzmkJepJ6Oh+brkx89Rt5w4tXuyYEawUzgs1xE993r0+Sfhskdd3YgG8KVjHNw hM034Ojkpi2RuVKApIGsReqtG83EwaN1Eq29JQv9Z8mPmrHAs+1AHknd7Zdir46cES GrHRXmNW758tX6nC2fcnJi94dXYwr+/2HfM2vIzf23pdOVQaYHvj2SuqKgaTwgyn7F 3gkHDOKOp24svEIaplU/u3+dvxbuO/gN2YOssYEM8BJFLXzcpmOmpxMEPBQ9x1GMVd r+AZlT8Nhgouw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Peng Fan , Masahiro Yamada Subject: [PATCH v2 04/11] dma-mapping: add for all architectures Date: Fri, 14 Feb 2020 14:41:37 +0900 Message-Id: <20200214054144.18315-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200214054144.18315-1-yamada.masahiro@socionext.com> References: <20200214054144.18315-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 To avoid "asm/dma-mapping.h: No such file or directory" error, we need something. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch arch/arc/include/asm/dma-mapping.h | 1 + arch/m68k/include/asm/dma-mapping.h | 1 + arch/microblaze/include/asm/dma-mapping.h | 1 + arch/mips/include/asm/dma-mapping.h | 1 + arch/nios2/include/asm/dma-mapping.h | 25 +---------------------- arch/powerpc/include/asm/dma-mapping.h | 1 + arch/sandbox/include/asm/dma-mapping.h | 1 + arch/sh/include/asm/dma-mapping.h | 1 + arch/xtensa/include/asm/dma-mapping.h | 1 + 9 files changed, 9 insertions(+), 24 deletions(-) create mode 100644 arch/arc/include/asm/dma-mapping.h create mode 100644 arch/m68k/include/asm/dma-mapping.h create mode 100644 arch/microblaze/include/asm/dma-mapping.h create mode 100644 arch/mips/include/asm/dma-mapping.h create mode 100644 arch/powerpc/include/asm/dma-mapping.h create mode 100644 arch/sandbox/include/asm/dma-mapping.h create mode 100644 arch/sh/include/asm/dma-mapping.h create mode 100644 arch/xtensa/include/asm/dma-mapping.h diff --git a/arch/arc/include/asm/dma-mapping.h b/arch/arc/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/arc/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/m68k/include/asm/dma-mapping.h b/arch/m68k/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/m68k/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/microblaze/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/mips/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h index 65f67bc1f442..853b0877b33d 100644 --- a/arch/nios2/include/asm/dma-mapping.h +++ b/arch/nios2/include/asm/dma-mapping.h @@ -1,24 +1 @@ -#ifndef __ASM_NIOS2_DMA_MAPPING_H -#define __ASM_NIOS2_DMA_MAPPING_H - -#include -#include - -/* - * dma_alloc_coherent() return cache-line aligned allocation which is mapped - * to uncached io region. - */ -static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) -{ - unsigned long addr = (unsigned long)malloc_cache_aligned(len); - - if (!addr) - return NULL; - - invalidate_dcache_range(addr, addr + len); - if (handle) - *handle = addr; - - return map_physmem(addr, len, MAP_NOCACHE); -} -#endif /* __ASM_NIOS2_DMA_MAPPING_H */ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/powerpc/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/sandbox/include/asm/dma-mapping.h b/arch/sandbox/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/sandbox/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/sh/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h new file mode 100644 index 000000000000..853b0877b33d --- /dev/null +++ b/arch/xtensa/include/asm/dma-mapping.h @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */