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 EC9B2C433EF for ; Sat, 23 Oct 2021 16:42:25 +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 E44F76054E for ; Sat, 23 Oct 2021 16:42:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E44F76054E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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 0DF7983173; Sat, 23 Oct 2021 18:42:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=redhat.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=redhat.com header.i=@redhat.com header.b="SVibSDCw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B314D8314C; Sat, 23 Oct 2021 18:31:34 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 9434E82F1D for ; Sat, 23 Oct 2021 18:31:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=wefu@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635006689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=koh+7hPAzOFEq4uPS69/abA1VGg0uVt5VWM3z3AFNsk=; b=SVibSDCwQ7D3ey9n0BWNSV8lqEBf+bJ3GLVgg/9h0XIsTpernSOfjCGgBVgSGFTQO1r/JM RecuMH6YCXzIchg0nK4jEUvvh855j4LdpBgErnq2/SpoYkBWjHq7aqa8sxS8GqzWo+otDb X/LztIr8iI9VOhn929kQO00rpv9vZiE= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-ZQjgL0whOF6VtfzqQw4new-1; Sat, 23 Oct 2021 12:31:28 -0400 X-MC-Unique: ZQjgL0whOF6VtfzqQw4new-1 Received: by mail-pj1-f70.google.com with SMTP id oc6-20020a17090b1c0600b001a0d6a48b8cso1681709pjb.6 for ; Sat, 23 Oct 2021 09:31:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=koh+7hPAzOFEq4uPS69/abA1VGg0uVt5VWM3z3AFNsk=; b=ldatxXmkRmscZCZjJL9dl/SvEHqmSf6FyHW+fgNtduF0JGVlV7ZZ+8Meo1yPofyE5T n4pDTt7Frcny3JZ47OtqncSZrWYbcOjRGESlFRp9ZNeXWYP5UZW2F4nKhLMgXRgVmU45 j0Fhq7SOaGXxj2hUq+6y4Nqd0wQE4YqYodBsEALeEEPdXd0uD76J2b99kjQqv0CoVyr4 QZIycGs+BlwAExXMx14wLpdnFbEOtMXu9X2q8Udh31wCYZjKBpsGaBwbcpx4n8D7uI71 QWagx2WTOBrxPCiCRUfMOrP7xNRIQGS+qflLNJt/3+fGNY9ZftzIc2hQA/06JeNjKIA1 9kfg== X-Gm-Message-State: AOAM531gGG20UYdhy7jKo4X2plvguY25Y2/VU82a8zqe6O8kqUEHB+78 4a5NIt+15JtR3RnW/lfy3eAhjnhkI+yY3fDyxHqQcK0qlw/uoUieUkKfn78ca+d/c0ljKuJEfYT G3g1i/TEPZaB6nUmqN0z6Mr/7mLMU0tIJxlK6ltFmJ4Ka1vts0MaFodB4YGdv X-Received: by 2002:a17:90a:7d11:: with SMTP id g17mr8138715pjl.150.1635006686560; Sat, 23 Oct 2021 09:31:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhV0YcSTVngDcDy+32UXldiByCzcg6h8dWPJUHUxJ43vcEhcpyoUb/mGL9iCp3BiBLxjtPUg== X-Received: by 2002:a17:90a:7d11:: with SMTP id g17mr8138666pjl.150.1635006686108; Sat, 23 Oct 2021 09:31:26 -0700 (PDT) Received: from samantha.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id c12sm13555031pfc.161.2021.10.23.09.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 09:31:25 -0700 (PDT) From: wefu@redhat.com To: u-boot@lists.denx.de, bmeng.cn@gmail.com, rick@andestech.com, nick.hu@sifive.com, ycliang@andestech.com Cc: tekkamanninja@gmail.com, tekkamanninja@163.com, Wei Fu Subject: [PATCH V2] riscv: add #define in asm/io.h for some device drivers Date: Sun, 24 Oct 2021 00:31:12 +0800 Message-Id: <20211023163112.750490-1-wefu@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=wefu@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Mailman-Approved-At: Sat, 23 Oct 2021 18:42:20 +0200 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: Wei Fu This patch adds memcpy_fromio and memcpy_toio definitions for some device drivers which have these definitions, like cadence_qspi_apb.c Signed-off-by: Wei Fu Reviewed-by: Bin Meng --- 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 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