Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3795845pxu; Wed, 9 Dec 2020 00:13:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3JXY5bkGq5IALVpebkWuNCXh0tw+W/wI6Cd8+FaR/n0GKPQPkU1i0MNAqZAV0f32W+G/8 X-Received: by 2002:a50:e786:: with SMTP id b6mr891467edn.242.1607501606305; Wed, 09 Dec 2020 00:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607501606; cv=none; d=google.com; s=arc-20160816; b=AA2+F1hgdK3ITPhBAfDtFBnrZ64zXFAOJF1FIjC5S2RCk9geE5yzdaLMsr+VrLMA3v enmM/uo6er0gQ6hc/EuE/6DDT9y7O4aLjlM15kd+Pyn4uR0r1Ph1hgNcWihDfKNBmpN+ K6XFF/6AYYXILeICJOmbEjiXIkvx3iBiCZitZ9xtFWqL69qlOUxEkSRhePdoD1z5Tg3p OJhyRIGyZ6LWvGCdXrwL+oAfP3epN1s5/7wskGbFHVl5yemAAnZRwX6U1VubMIV2dvIs xkDoeRoXOgegk2cj74keIg1DvmBjRxGb6I2aZToK6KEbIZiQ5fUsJpQPTb09SCIZWNSK 1rFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=A5JU52OZ34e6iAqTBOpOih7mA6ILgyEvq4lvnfsvIw0=; b=NgBeAVBeD4Sj6EHi2cRCx3lw0/a8p2QbPTXCgFzBmtbMqXkfxK/lQLPTKMIhJCpWto s+ltwhAK//Q20xa2r9qaNcuLWpanqDzaaDoGliiQWENk5WBgWTBIqSuwhigR87WHO/hN hocYGYSslhku5aLq1p2pICn4znnG/X7LwbIodKybZChJWwUJ6UeBTJ4KLTnJbuljj+kV MMirLIK1KUOfFd2bWhcxGczWfM2dxJ16fL1rVY1paodAm+pGCBcJYMVcECbu9x7bg8fy OoKEf6oTg5/gzOvGk5satuXPPAbNc8kDV/yZ7ksZ+ptUzp6PLfAZjJ1ORYHGppRP6hRr KX0A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i6si459365edl.178.2020.12.09.00.13.03; Wed, 09 Dec 2020 00:13:26 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728580AbgLIIDo (ORCPT + 99 others); Wed, 9 Dec 2020 03:03:44 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:50636 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728488AbgLIIDR (ORCPT ); Wed, 9 Dec 2020 03:03:17 -0500 X-UUID: 33cfc6846652424babc66fd0d288a653-20201209 X-UUID: 33cfc6846652424babc66fd0d288a653-20201209 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1621728826; Wed, 09 Dec 2020 16:02:33 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 9 Dec 2020 16:02:28 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 9 Dec 2020 16:02:31 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Will Deacon , Robin Murphy CC: Krzysztof Kozlowski , Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , Subject: [PATCH v5 07/27] iommu/mediatek: Use the common mtk-smi-larb-port.h Date: Wed, 9 Dec 2020 16:00:42 +0800 Message-ID: <20201209080102.26626-8-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201209080102.26626-1-yong.wu@mediatek.com> References: <20201209080102.26626-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the common larb-port header in the source code. Signed-off-by: Yong Wu Acked-by: Krzysztof Kozlowski --- drivers/iommu/mtk_iommu.c | 7 ------- drivers/iommu/mtk_iommu.h | 1 + drivers/memory/mtk-smi.c | 1 + include/soc/mediatek/smi.h | 2 -- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index c072cee532c2..6451d83753e1 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -103,13 +103,6 @@ #define MTK_PROTECT_PA_ALIGN 256 -/* - * Get the local arbiter ID and the portid within the larb arbiter - * from mtk_m4u_id which is defined by MTK_M4U_ID. - */ -#define MTK_M4U_TO_LARB(id) (((id) >> 5) & 0xf) -#define MTK_M4U_TO_PORT(id) ((id) & 0x1f) - #define HAS_4GB_MODE BIT(0) /* HW will use the EMI clock if there isn't the "bclk". */ #define HAS_BCLK BIT(1) diff --git a/drivers/iommu/mtk_iommu.h b/drivers/iommu/mtk_iommu.h index df32b3e3408b..d0c93652bdbe 100644 --- a/drivers/iommu/mtk_iommu.h +++ b/drivers/iommu/mtk_iommu.h @@ -17,6 +17,7 @@ #include #include #include +#include #define MTK_LARB_COM_MAX 8 #define MTK_LARB_SUBCOM_MAX 4 diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index ac350f8d1e20..2beb67908f3c 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -14,6 +14,7 @@ #include #include #include +#include #include /* mt8173 */ diff --git a/include/soc/mediatek/smi.h b/include/soc/mediatek/smi.h index 5a34b87d89e3..9371bf572ab8 100644 --- a/include/soc/mediatek/smi.h +++ b/include/soc/mediatek/smi.h @@ -11,8 +11,6 @@ #ifdef CONFIG_MTK_SMI -#define MTK_LARB_NR_MAX 16 - #define MTK_SMI_MMU_EN(port) BIT(port) struct mtk_smi_larb_iommu { -- 2.18.0