Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50A6BC433EF for ; Thu, 30 Sep 2021 11:52:28 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AAB6761152 for ; Thu, 30 Sep 2021 11:52:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AAB6761152 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=163.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 73E2081725; Thu, 30 Sep 2021 13:52:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.b="oTKe+U8G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C1D2682128; Thu, 30 Sep 2021 13:52:22 +0200 (CEST) Received: from m12-11.163.com (m12-11.163.com [220.181.12.11]) by phobos.denx.de (Postfix) with ESMTP id C87E081725 for ; Thu, 30 Sep 2021 13:52:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tekkamanv@163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=Xym+L RF1oWWR6wL2n3vsFDqWIeCeOhfXrQr1whRYT9s=; b=oTKe+U8Gf77MFn7cKSSsc w71SOpeGBCkchZjj18SQbQPUHMoU9hlgn6xcskZ5uLRidM4rDvpR0XztmxYv43tF eIRRk2tUD8jOFSossT/ofvlDVoouOrhk0Z4+WHEfjfxYHUjAtYiIYr5rhwaUd8pH XTeUQsjEIwNKfSG+dLVFmk= Received: from samantha.redhat.com (unknown [220.162.164.126]) by smtp7 (Coremail) with SMTP id C8CowAD37JTkpFVh+IPUzQ--.56584S2; Thu, 30 Sep 2021 19:52:04 +0800 (CST) From: tekkamanv@163.com To: u-boot@lists.denx.de, bmeng.cn@gmail.com, rick@andestech.com, ycliang@andestech.com Cc: tekkamanv@starfivetech.com, tekkamanv@163.com, tekkamanninja@163.com Subject: [PATCH] riscv: add #define in asm/io.h for some device drivers Date: Thu, 30 Sep 2021 19:52:02 +0800 Message-Id: <20210930115202.447083-1-tekkamanv@163.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: C8CowAD37JTkpFVh+IPUzQ--.56584S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jry8Wr4UKr4rtFyfZFyrWFg_yoWftrb_Ga yxZw4kX3yxJF4Iq3ZrArn3AF18t3y8KFyDWwnagw15Cr12kr4UK3yFyryUGw15Cw4vvrsa 9a1kX345XF9I9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU8OeOPUUUUU== X-Originating-IP: [220.162.164.126] X-CM-SenderInfo: 5whnythpdq4qqrwthudrp/1tbiLwUeslUMaLZ1vwAAsL X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.103.2 at phobos.denx.de X-Virus-Status: Clean From: TekkamanV This patch add memcpy_fromio and memcpy_toio definitions for some device drivers which has these definitions, like cadence_qspi_apb.c Signed-off-by: TekkamanV --- arch/riscv/include/asm/io.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h index acf5a96449..b693fd8cd6 100644 --- a/arch/riscv/include/asm/io.h +++ b/arch/riscv/include/asm/io.h @@ -64,6 +64,10 @@ static inline phys_addr_t map_to_sysmem(const void *ptr) #define __raw_readl(a) __arch_getl(a) #define __raw_readq(a) __arch_getq(a) +/* adding for some drivers, like cadence_qspi_apb.c */ +#define memcpy_fromio(a, c, l) memcpy((a), (c), (l)) +#define memcpy_toio(c, a, l) memcpy((c), (a), (l)) + #define dmb() mb() #define __iormb() rmb() #define __iowmb() wmb() -- 2.25.4