From patchwork Mon Jan 30 10:27:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 13120891 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5E1EC54EAA for ; Mon, 30 Jan 2023 10:31:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1tTvTJOWi+pYAK5+hFymTOXqbc738ey7eucYSBl6J2Y=; b=2MdIqrR1NMCqV+ gebBNlc5U/gGOowoAAztGd11F6yE8QqoZ9v/hzQo8rjrjlt1YD/+D3bBSfobJq+d4Cgixz5OpqBEV nOTBtHB0/69G1yLmNTiUVCmBNXbGDkbSFturoDPy70ptL+T3JYKh6tQ46wlwcCCLeti1dPhKlYro2 S6qMrtMZgKrkOSdCby5LEy4/swNqEatdQkKdjGXHEvHXv4aB2Rx79M5OL8wrAi4mDeGFX3nmjG7qG RzAjI5UOyjLHo1IXaBntvEWFbZM1nGCVJnROdWbvIoLuoBdYfZfzJHN8MNUMHpr0v6/zDV5gPgZd+ I/h8kuM+fmUjc8g4FcyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMRP0-0037cV-9m; Mon, 30 Jan 2023 10:28:42 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMRN1-0037Nr-Ad for linux-arm-kernel@lists.infradead.org; Mon, 30 Jan 2023 10:26:41 +0000 Received: by mail-wr1-x42e.google.com with SMTP id y1so10571161wru.2 for ; Mon, 30 Jan 2023 02:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h/rwlLDEtbW36VfCqW0mnDyKREjKUOT7fxTwKpedSJQ=; b=3E0zkA2gqTmqoeeFb3Q+vnT07aKxFwrUH34EgWo4WmsznGFTb6oc/GlWxTb3M5RUud UpNd0oOfSg9RHk2rK4Qtmk3soyvhnU8HOmBmEKP3nwmU3dlqRPt2zGLETL3HRegddjlw GMBvu07lIEFQjUx+90/7IwQ9Vf0kjB7AQhdWVa3SPuLup8G6jeOQa2sFj8MzYy4l+cAq j5vZgqbDnzOhOGRLq5GC+J8jqaJMkwz2FTQK7Q5eFL6tXwU3wKLq0HkrAn9m+l4Wx1ff NOUX31pnVurLmnDzXn/SttucqBwkn4mJ4IjYBq0um87+eUw7KmIB72WmryhMVtgR4zwq Rd4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h/rwlLDEtbW36VfCqW0mnDyKREjKUOT7fxTwKpedSJQ=; b=rK+woVnXrATFZ5w7Cpi3Nxdjs+jRHX//HxQgtCOurThbTvuqxgCYcRGLvNbxptIyn8 PXIzOD0lj6L93GbLfMQdBQi0osnUSi3+ABMdWLLRxcUbxB/Cg+psWAnCC5I/1+fX2tZR h6oVuF8FPOAgeclGpw8ebpinJJax4AJK7RumasSsiv4Tm/uPKL2W+GBjVXgDDing6Uhx bZCSPriRcVxHpoL7HtTtcE2MCz+qgypcVko6BMqm+E4z45yqhvKzJycYv+VA7wxnUb0r PIyXhplzc07ef00Afe+52Zhy7IDhLThndexgMgYODdR0QYIOz/9xPDNMiuFyHZtJdX8w Sw2A== X-Gm-Message-State: AFqh2kp02jtp2fZPaVC1e7Lqaq2N7gl84FbfnyfyqRwma+p+nWj1UdBe 5mEfKLUcCO3WPXyYLsA3jlIjnQ== X-Google-Smtp-Source: AMrXdXtCiNfSdUuMkTNChaAYiBD0oXk/tcW8F7bQQHQBjcoe+x26vkfwvHt6Gpl6NHBhKdyyS31KtA== X-Received: by 2002:a5d:46c2:0:b0:2bf:9468:340 with SMTP id g2-20020a5d46c2000000b002bf94680340mr29633671wrs.19.1675074397479; Mon, 30 Jan 2023 02:26:37 -0800 (PST) Received: from alex-T14.baylibre (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id s5-20020a5d5105000000b002bdfcd8c77csm11426785wrt.101.2023.01.30.02.26.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 02:26:37 -0800 (PST) From: Alexandre Bailon To: yong.wu@mediatek.com, joro@8bytes.org, will@kernel.org Cc: robin.murphy@arm.com, matthias.bgg@gmail.com, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, iommu@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alexandre Bailon Subject: [PATCH 1/3] dt-bindings: memory: mediatek: Add support of unmanaged iommu domain Date: Mon, 30 Jan 2023 11:27:20 +0100 Message-Id: <20230130102722.133271-2-abailon@baylibre.com> X-Mailer: git-send-email 2.38.2 In-Reply-To: <20230130102722.133271-1-abailon@baylibre.com> References: <20230130102722.133271-1-abailon@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230130_022639_384186_79A686A4 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, the only way to have an unmanaged domain for a device is having a dedicated iova region or bank. This adds a new bit to MTK_M4U_ID that allows defining devices that needs unmanaged iommu domain. Signed-off-by: Alexandre Bailon Reviewed-by: Alexandre Mergnat --- include/dt-bindings/memory/mtk-memory-port.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/dt-bindings/memory/mtk-memory-port.h b/include/dt-bindings/memory/mtk-memory-port.h index 2f68a0511a257..86896c776691a 100644 --- a/include/dt-bindings/memory/mtk-memory-port.h +++ b/include/dt-bindings/memory/mtk-memory-port.h @@ -7,11 +7,14 @@ #define __DT_BINDINGS_MEMORY_MTK_MEMORY_PORT_H_ #define MTK_LARB_NR_MAX 32 +#define MTK_UNMANAGED_DEVICE (1 << 31) #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) #define MTK_M4U_TO_LARB(id) (((id) >> 5) & 0x1f) #define MTK_M4U_TO_PORT(id) ((id) & 0x1f) +#define MTK_M4U_UNMANAGED(id) ((id) & MTK_UNMANAGED_DEVICE) #define MTK_IFAIOMMU_PERI_ID(port) MTK_M4U_ID(0, port) +#define MTK_M4U_UNMANAGED_ID(larb, port) (MTK_M4U_ID(larb, port) | MTK_UNMANAGED_DEVICE) #endif From patchwork Mon Jan 30 10:27:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 13120892 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67447C54EAA for ; Mon, 30 Jan 2023 10:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DzodgG0+n31B/MqDpFXbk0vkaVxUALmRyF3qtG1wDZA=; b=cV5ozDerQ4VKsU w1nzZMWw+36jSmGte1ns2RvL/2mgLlzessuFwxrm55nkvO63tXP/hz+iTQ+u6ECxcpmXjBaVGZCKW ink48GJY1aBpx+7hiACvQ9XEt4rRZVFabC1Z0F83RxiWAebUa45xCGQBNh7/sXMtGMnme09KyZZp6 XFBaT9RF8c+BQJqguQwEzEq66FkExSJQtPsNZmrMjMWtHznRAoNMGb0cZ+2Utt8bzYuv+oCdBtwIR 0aDShuaSylXJm393PpEaImA2HZ6vbr975cAF0SQi+axKblxxfAYHPUkCtlqxoyzNVLFZ2+wedxn0w AMURPvAp/mlHfpohFzUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMRPh-0037lQ-Lj; Mon, 30 Jan 2023 10:29:26 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMRN2-0037OH-Ex for linux-arm-kernel@lists.infradead.org; Mon, 30 Jan 2023 10:26:41 +0000 Received: by mail-wr1-x42c.google.com with SMTP id m14so10091650wrg.13 for ; Mon, 30 Jan 2023 02:26:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mNpd3roa5gv6troS6TLhHBAaJw7HpklMLo5JJSNOuFM=; b=HvVgNisJ1GOros7sTO0b7jt6wckJtww8GE0pYFh/mdrEOLAcdKo8vPknDwup16osyM 116amBTSkKUkZ8ekVMYLvfeqfw5qoBdXOLh4SHUHOOcBkstUcLJjw95obMk6rJSVbKjS jHAE6s5PzQaftkaFWBDvZ1Y32Am60WjAZ4zjvWjfB6KlK/GbXWqaBDgX+ZUj+kieeJ3N xlZglbm8ucQewISN4rZyw375sWGlYOOpp9mK5o81r+L+y9Nu5mUB36mXBzJdTCCW4/1Q NXgBjgb+wtTtDdgBkmjtDiARGJcZK4ENi17cLkZgpm92XEUBp+mW6HAo5xVLPYkbLeXk SXOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mNpd3roa5gv6troS6TLhHBAaJw7HpklMLo5JJSNOuFM=; b=cWIlcFcibRy1QC5qpv6NG+g087aZ3X2Ojah7CDIEMaZtsElJ8X3BSR5sERCqudfUU1 3B1i2Awob0v0rp7OjmzGU3I0CG1Rvb/SCiHoT9Uvx4T7BWODLGXGcnariy8OHVIbquYb fyArb8gKlE7GhlE5sGVLnzhgWP/CZYvgyMXYpoBUfhezPueuL9Xy43HuXkz6vA+EbT/k PqsRN/vcnoJvASbczTA7itNwkPB5Y9Q3nf5Te33KDKdpV9Dv4JJeDKS92EJfY9Y9bhsw 2x9qME0EeruQYkl0/beAXdgoCNcYNLp/+kKjdDijaxUxtIpfH6oUw+1By1t8PlGWaOvz xKVA== X-Gm-Message-State: AO0yUKU7746vqSusSM852uLbANzCgQ5mIU4PxuVuVuGXUCV0uMMMlyeH iS1UnS84RfyfgT2FaYopJEvCdg== X-Google-Smtp-Source: AK7set9AyBy9CX25oVJxOx8ewKugRbpLcfdp5pWqnHAyLQivzN79VIqqC6uSU+2kFVMMMrl1nKkKlA== X-Received: by 2002:a5d:5c08:0:b0:2bf:b775:babd with SMTP id cc8-20020a5d5c08000000b002bfb775babdmr21396377wrb.28.1675074398562; Mon, 30 Jan 2023 02:26:38 -0800 (PST) Received: from alex-T14.baylibre (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id s5-20020a5d5105000000b002bdfcd8c77csm11426785wrt.101.2023.01.30.02.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 02:26:38 -0800 (PST) From: Alexandre Bailon To: yong.wu@mediatek.com, joro@8bytes.org, will@kernel.org Cc: robin.murphy@arm.com, matthias.bgg@gmail.com, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, iommu@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alexandre Bailon Subject: [PATCH 2/3] iommu: mediatek: Add support of unmanaged iommu domain Date: Mon, 30 Jan 2023 11:27:21 +0100 Message-Id: <20230130102722.133271-3-abailon@baylibre.com> X-Mailer: git-send-email 2.38.2 In-Reply-To: <20230130102722.133271-1-abailon@baylibre.com> References: <20230130102722.133271-1-abailon@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230130_022640_526274_FDA0CF05 X-CRM114-Status: GOOD ( 13.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, the driver can allocate an unmanaged iommu domain. But, this only works for SoC having multiple bank or multiple iova region. This updates the driver to also support unmanaged iommu domain if MTK_UNMANAGED_DEVICE is set in the iommu id. Signed-off-by: Alexandre Bailon Reviewed-by: Alexandre Mergnat --- drivers/iommu/mtk_iommu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 2badd6acfb23d..5884a1ad409a0 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -858,9 +858,15 @@ static int mtk_iommu_get_group_id(struct device *dev, const struct mtk_iommu_pla static struct iommu_group *mtk_iommu_device_group(struct device *dev) { struct mtk_iommu_data *c_data = dev_iommu_priv_get(dev), *data; + struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); struct list_head *hw_list = c_data->hw_list; struct iommu_group *group; int groupid; + int i; + + for (i = 0; i < fwspec->num_ids; i++) + if (MTK_M4U_UNMANAGED(fwspec->ids[i])) + return iommu_group_alloc(); data = mtk_iommu_get_frst_data(hw_list); if (!data) From patchwork Mon Jan 30 10:27:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 13120893 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7EC8C54EAA for ; Mon, 30 Jan 2023 10:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XcnD3pBlokN6HH2U1irA2z4bFQi3cKTEiJfTBv7BQZk=; b=iRQT3tMOWKxzsC XGH6+y30UaSMDBFKsaKKDZ5NMUHVLN3TSALjtN820FLArGJelW2kTJhts2tmJZkR0ZTlSIIa0M8Mj S1llyeoNPvjOLGSzuyUmOiITR7jOPSpeHnXNHdAcPjL2v9Id5PlSEb54Z56JRsf+SaICihPeSZ0kB thOdTgXSbccqjevCCxAQJXC7xXeUCP/lS7JF1QaKnFUBz18typwMLRPAxCC0/VaF/tJtDxcny5BhH 08DBKm/JwcHg5bh+nYhB5g6q9swNAwg8uSsk3b4KvVZSBajjLaRXv+/Ub9cgINudcsAXSxjGmWZFZ KpeXGshGoAPWnkiZFbpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMRRd-0038AT-Rc; Mon, 30 Jan 2023 10:31:25 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMRN3-0037Ow-3r for linux-arm-kernel@lists.infradead.org; Mon, 30 Jan 2023 10:26:42 +0000 Received: by mail-wr1-x431.google.com with SMTP id m7so10550247wru.8 for ; Mon, 30 Jan 2023 02:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZPoBz9/1/N6ODRgUu0zywPKZ5Pb9peKUsXrjhFsletU=; b=ZRyN6STZ1TLPVz4LQ6q3JE4PIWOJj1I9SrDzQgnNUxCnJuucnPb47K5T+FT5VJqJhK O7/cyqU8K6RTZ+xoZ92FBBgXMi1SXmIumyAw3zE49VeVoVkCg+xC4bMIp9CwVBpGwgV+ y1MxJbFLq0iCWns2b+hVFDDcpyNc720nV1LmafAtHn/n2W96sBotkpDyOvna77pG9sP6 pPdfwpT2P+ZdYR6Qk6guRYpEpokyLcJ7bBJ2yNGthRpuCqIw7AOsVGJ/Yib4yo/Oh8fN FVTH/apMKrbFOcEOzGxtAc29B7xT//JupyxHXJDrXcqSVdyNziI2+Z/zZVg0y0FIe7Fe jywQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZPoBz9/1/N6ODRgUu0zywPKZ5Pb9peKUsXrjhFsletU=; b=Up4BmKLHzImpGwUK8yJLu71TEtjhIF+6cg45mgbTrk9YSBF6Bz2daaB22yCqkxYItQ OQn/S1ioVwR2KnDeP6xRlHkPsX+UWNbRnYwBWPFdsPG7VhI78a20G/D8Tw5TS4az8ZzZ DxB6qHWi/1ZdruBUuKz9goV56rLZOC73v2HbIIAmoEqHuxRWv2Y2sqMSStQjas6eyvPM qK4EXaDPxYKjNQUrkkux9CinVdywuLKrI6OigWh23QK0fVLi4o30fZLy1tIDF2jGwqye TJwKPvlSJHmRdBGj7Ne88LtLWLwYG9rX10fYuy2LQU6cL9eTdKj2qQ3yRQXoAT7unKwx DJBg== X-Gm-Message-State: AFqh2kpAGI465hs38A9FV8W96JRp97EX6/SiYKkq3WV2mT0MbIcUn6OH q8PvZAXL0ThsUGCw3OaU0bM2/A== X-Google-Smtp-Source: AMrXdXsW7ZQDGKlzFTYhQEjR+p+Zk8AHHZFaUSI9MHLnvUkGztcTA7MZHFFlS/Gqk/Zh0lJ9wDVJ1g== X-Received: by 2002:a05:6000:1e18:b0:2bc:846a:8ead with SMTP id bj24-20020a0560001e1800b002bc846a8eadmr46483687wrb.37.1675074399921; Mon, 30 Jan 2023 02:26:39 -0800 (PST) Received: from alex-T14.baylibre (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id s5-20020a5d5105000000b002bdfcd8c77csm11426785wrt.101.2023.01.30.02.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 02:26:39 -0800 (PST) From: Alexandre Bailon To: yong.wu@mediatek.com, joro@8bytes.org, will@kernel.org Cc: robin.murphy@arm.com, matthias.bgg@gmail.com, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, iommu@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alexandre Bailon Subject: [PATCH 3/3] dt-bindings: iommu: memory: Use unmanaged iommu domain for the APU Date: Mon, 30 Jan 2023 11:27:22 +0100 Message-Id: <20230130102722.133271-4-abailon@baylibre.com> X-Mailer: git-send-email 2.38.2 In-Reply-To: <20230130102722.133271-1-abailon@baylibre.com> References: <20230130102722.133271-1-abailon@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230130_022641_176575_2AC39036 X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This updates the iommu id to use unmanaged iommu domain for the APU. This is required by remoteproc to use the iommu. Signed-off-by: Alexandre Bailon Reviewed-by: Alexandre Mergnat --- include/dt-bindings/memory/mediatek,mt8365-larb-port.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dt-bindings/memory/mediatek,mt8365-larb-port.h b/include/dt-bindings/memory/mediatek,mt8365-larb-port.h index 56d5a5dd519e7..86d82a8f6017d 100644 --- a/include/dt-bindings/memory/mediatek,mt8365-larb-port.h +++ b/include/dt-bindings/memory/mediatek,mt8365-larb-port.h @@ -24,8 +24,8 @@ #define M4U_PORT_MDP_WROT0 MTK_M4U_ID(M4U_LARB0_ID, 7) #define M4U_PORT_MDP_RDMA1 MTK_M4U_ID(M4U_LARB0_ID, 8) #define M4U_PORT_DISP_FAKE0 MTK_M4U_ID(M4U_LARB0_ID, 9) -#define M4U_PORT_APU_READ MTK_M4U_ID(M4U_LARB0_ID, 10) -#define M4U_PORT_APU_WRITE MTK_M4U_ID(M4U_LARB0_ID, 11) +#define M4U_PORT_APU_READ MTK_M4U_UNMANAGED_ID(M4U_LARB0_ID, 10) +#define M4U_PORT_APU_WRITE MTK_M4U_UNMANAGED_ID(M4U_LARB0_ID, 11) /* larb1 */ #define M4U_PORT_VENC_RCPU MTK_M4U_ID(M4U_LARB1_ID, 0)