Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp194756pxb; Sat, 11 Sep 2021 02:24:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWChoAPL95ppjgsnApjNbINAkzblsqwqP94gg3MB0d+In2SJ/bdi6T29tood2Ip+nnDb+5 X-Received: by 2002:a50:eacc:: with SMTP id u12mr2424129edp.140.1631352288596; Sat, 11 Sep 2021 02:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631352288; cv=none; d=google.com; s=arc-20160816; b=A28brzFU61N+HH9NUuVluTpzfNxVGJ10Lf3lUne1e76lobHQTEHHu/93/g5cLspnCY RRSIW4WE0no23sPwhPseJu3Q1Y2zFYp565ssFqO6Gh5SXLPQmD8iafAfAQRly8896RJ2 18CKRWScgT9S/Yc1XYSatJboAOQ94qPV1cCouNkP4vPtpiW8A1GtjnFKtMKm0dtdDNpy TRBh+wdLCSBLNiqfM6ScJkpG+R2RG1ItTc1mCuKchXLrCrvcpEYoVkTI7UaUNgh2qzM3 lqhLZdcElSe48xCI8r7BsOK4WwVZ/mGNn+JRtBqVJ7HSc466yzEB51akONJUeGkOwf+t OaTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+p5J6crUCJDaoWoOy87azO2mmexMpWTnaEvMY/42+ng=; b=ATz+ddXiD30YUGDMHxFfz2bfS6d0u6PoWvC3h6zmU/ru33ovQHugzZNpa4MOgq83R9 H2F7RqwgwxGxhfQ5AZUhcPJJZi+gRpMHfHNzKR3eLqb63VIXZDqZdo95absYZW69R5Ob pMcB7U8UIQM5zz4UPY7bMAy3lKJfB3wxAXCJMTkoTmPLPm0J4Twn4m9a818S2nxAn2ka /3gwocMIrxtLX0L4P17ZQcEEAB0Wk94Sh/j6fhOtYLpmv0X8pD+Ix85LVp1mRubNjS6N NFyEhcl3binSWSG8x14NidJlyLM2giG2IW1yJV06n5UIheTeka+/gwxMxfTo0xF+pwAg 0ZVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZtZx2lq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lv23si1799541ejb.127.2021.09.11.02.24.25; Sat, 11 Sep 2021 02:24:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZtZx2lq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235500AbhIKJXb (ORCPT + 99 others); Sat, 11 Sep 2021 05:23:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:42492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235543AbhIKJX1 (ORCPT ); Sat, 11 Sep 2021 05:23:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6151E611F2; Sat, 11 Sep 2021 09:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631352135; bh=HpczDCI/VmO/hoLx97DUXUTuxC7jnTK5MeZdEMO4bFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZtZx2lq4XG8v1qS1EWbvBLfNb6/XMkIMsAPC9iBdpu5kJ3ty01Kd9zQ90LE95YrZt Vp0UxnDyBGBEnhmgUGxF/HUs7jSAHUiQohJyGJ6a5ThnI/pA5oHmlVMOSArIH1UFmF GoKANXwnhfdMeD3dOsV+TNFodHvXoSnDTem82IJ1j18vQOxvdu5JkZnT+YrpRwivOe QkdVMLiZub4dbxP9XJwfZ2123nKfJhaLdk12sJsX64+ejmGX6ul+98kQRXbbEMqoSF hkztwP4YgeHHjvkTvts88Sedq0SrOLV3ebYqGgHPPUqLBjVLYutvDKcnQhMNMrAC7P zLizmKvVCNd/A== From: guoren@kernel.org To: anup.patel@wdc.com, atish.patra@wdc.com, palmerdabbelt@google.com, guoren@kernel.org, christoph.muellner@vrull.eu, philipp.tomsich@vrull.eu, hch@lst.de, liush@allwinnertech.com, wefu@redhat.com, lazyparser@gmail.com, drew@beagleboard.org Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, taiten.peng@canonical.com, aniket.ponkshe@canonical.com, heinrich.schuchardt@canonical.com, gordan.markus@canonical.com, Guo Ren Subject: [RFC PATCH V4 3/6] RISC-V: Support a new config option for non-coherent DMA Date: Sat, 11 Sep 2021 17:21:36 +0800 Message-Id: <20210911092139.79607-4-guoren@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210911092139.79607-1-guoren@kernel.org> References: <20210911092139.79607-1-guoren@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Atish Patra In future, there will be more RISC-V platforms with non-coherent DMA. Instead of selecting all the required config options in every soc, create a new config that selects all the required configs related non-coherent DMA. Signed-off-by: Atish Patra RISC-V: Support DMA_DIRECT_REMAP for non-coherent DMA Signed-off-by: Guo Ren --- arch/riscv/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 3ab3730bee92..d18a59ea10e5 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -213,6 +213,15 @@ config PGTABLE_LEVELS config LOCKDEP_SUPPORT def_bool y +config RISCV_DMA_NONCOHERENT + bool + select ARCH_HAS_DMA_PREP_COHERENT + select ARCH_HAS_SYNC_DMA_FOR_DEVICE + select ARCH_HAS_SYNC_DMA_FOR_CPU + select ARCH_HAS_SETUP_DMA_OPS + select DMA_GLOBAL_POOL + select DMA_DIRECT_REMAP + source "arch/riscv/Kconfig.socs" source "arch/riscv/Kconfig.erratas" -- 2.25.1