From patchwork Thu Jan 21 06:24:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WW9uZyBXdSAo5ZC05YuHKQ==?= X-Patchwork-Id: 12034877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DFB7C433DB for ; Thu, 21 Jan 2021 06:37:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13BDD221F8 for ; Thu, 21 Jan 2021 06:37:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13BDD221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vILwIu9Z4Ib/Cl3FMnvNcss0sualj7JiverBfVOOEmI=; b=2rNRbYFWZPH62YsXWYq+5ZGoM NUIvotq/3jveAEFyUb+RW+GsWITVk4zS9VxsDUskWeZGYmMXjKPdzutDohqTgGsc28r1z5oauKtou n0CHaklgX9YrS4QiL5aNJkDC22C0Ji0c2GZhjmnWyNgTnVV/GUw2JjQFFkXRfGQg3gA2rL4La65fI LMCO49xV8IPQH7olIJwwfUTPp7x+x0adgnZPeRMfXzbEcjB4Ia1ZnBzqX7ejgT4q4m2/ANXzvwk1u gqIX/lV8Wl4KiGjAo0TnGvq+DtlJUMV1a+sHkm+W48y+E8AVMcHm7VI6/Fy023Q/RaKfIwjY8LJ+7 vmszPURmA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2TYh-0003q1-Lp; Thu, 21 Jan 2021 06:35:07 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2TYe-0003nx-HG; Thu, 21 Jan 2021 06:35:05 +0000 X-UUID: 0b8e6f76bdc04955b6f3bc97e5551cd7-20210120 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=PHxeX2kIyIgfx1H8asHkYdsyBC/XtlxANKaYFjVy2Xw=; b=OUGN8h9QYBGQcYjxDSv+KUCF2+bnAG/v2LaVIAlerWJHx6OittDUOKz4X7B39TECWZJ4SRU+mT+rdEjL5boP7nuck7u3RGm04Xmkp9Ir2oM4kJwsWZ2kTOJ7ygBHNGi9inhqRKwwDx+2sh8tVFJW+o/83scOCKJK1jR7kuDtXk0=; X-UUID: 0b8e6f76bdc04955b6f3bc97e5551cd7-20210120 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 468179361; Wed, 20 Jan 2021 22:35:01 -0800 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 20 Jan 2021 22:25:12 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 21 Jan 2021 14:25:10 +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; Thu, 21 Jan 2021 14:25:09 +0800 From: Yong Wu To: Krzysztof Kozlowski , Matthias Brugger Subject: [PATCH 1/3] memory: mtk-smi: Use platform_register_drivers Date: Thu, 21 Jan 2021 14:24:27 +0800 Message-ID: <20210121062429.26504-2-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210121062429.26504-1-yong.wu@mediatek.com> References: <20210121062429.26504-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_013504_711914_047E839C X-CRM114-Status: GOOD ( 14.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, anan.sun@mediatek.com, Nicolas Boichat , srv_heupstream@mediatek.com, Robin Murphy , Joerg Roedel , linux-kernel@vger.kernel.org, yi.kuo@mediatek.com, Tomasz Figa , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, yong.wu@mediatek.com, Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In this file, we have 2 drivers, smi-common and smi-larb. Use platform_register_drivers. Signed-off-by: Yong Wu --- drivers/memory/mtk-smi.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index ac350f8d1e20..e2aebd2bfa8e 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -587,26 +587,13 @@ static struct platform_driver mtk_smi_common_driver = { } }; +static struct platform_driver * const smidrivers[] = { + &mtk_smi_common_driver, + &mtk_smi_larb_driver, +}; + static int __init mtk_smi_init(void) { - int ret; - - ret = platform_driver_register(&mtk_smi_common_driver); - if (ret != 0) { - pr_err("Failed to register SMI driver\n"); - return ret; - } - - ret = platform_driver_register(&mtk_smi_larb_driver); - if (ret != 0) { - pr_err("Failed to register SMI-LARB driver\n"); - goto err_unreg_smi; - } - return ret; - -err_unreg_smi: - platform_driver_unregister(&mtk_smi_common_driver); - return ret; + return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers)); } - module_init(mtk_smi_init); From patchwork Thu Jan 21 06:24:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WW9uZyBXdSAo5ZC05YuHKQ==?= X-Patchwork-Id: 12034875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FDFEC433E0 for ; Thu, 21 Jan 2021 06:36:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9214221FC for ; Thu, 21 Jan 2021 06:36:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9214221FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dBehcwj7dGkNr2R2dd0JniRbihAzodc7HZtesaCKN40=; b=EJHou1nt0Cu+H7TS9q60OrdZn lUgfE0ZpR/AyeFCIC1zP8REPvVeHNuFXbPvMGxu/N9C6zMiqMmlpldOeKiVDXtm7LbW/iY9Ia1wGt DlcP3JFxgn2KPxGJ27jqESq8SCxZB3YpdUmrWE5AKlpEy3rEYqrd3jIH1mdxbDg9+z7HW0e2Ej6nL fuShHZljnyx3FejUAIQztFIsmpEvGZEjWOmp+8l2gNZ8vwMaXWfyCvt2/LCG5A2aBI4GHTEAjIDhe 18Rf1x5YVaJqE5R7TrHFwriC/lDHJxYMCL5304S4l9RU769j4W1dSAQtCmLVLm25GVmTdZLHSJSEp 5FERfksag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2TYq-0003tz-Vx; Thu, 21 Jan 2021 06:35:17 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2TYf-0003nx-KB; Thu, 21 Jan 2021 06:35:06 +0000 X-UUID: ce2c9bbed3944685924fdabcf3fcb6c0-20210120 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=X5y9BHRQuKG0gK1kzm7WGmKfMrZdt3f0a6gX5csBgVE=; b=te8SzNJ29SHk7GfsFTqGrqWfpmoRb/gOWsk0Sw138hg1dUTliPWNqLWsDnkl+pZvILhpulyIDA917qR3U4Z5bdMs445SOEj27FokysptpnGJXr+in9ybUoy/TdmfBHCfrVIQOmsXBegmlv0i9EtuO3VmwYGmiV0YsD9/RmYopjY=; X-UUID: ce2c9bbed3944685924fdabcf3fcb6c0-20210120 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1198826836; Wed, 20 Jan 2021 22:35:01 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 20 Jan 2021 22:25:35 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 21 Jan 2021 14:25:22 +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; Thu, 21 Jan 2021 14:25:21 +0800 From: Yong Wu To: Krzysztof Kozlowski , Matthias Brugger Subject: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license Date: Thu, 21 Jan 2021 14:24:28 +0800 Message-ID: <20210121062429.26504-3-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210121062429.26504-1-yong.wu@mediatek.com> References: <20210121062429.26504-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 24476291C01264CB107719D7F0A11F842FC2D47325FB94F0AD32DB898B4DCD9F2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_013505_819576_E3E0B0C7 X-CRM114-Status: GOOD ( 11.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, anan.sun@mediatek.com, Nicolas Boichat , srv_heupstream@mediatek.com, Robin Murphy , Joerg Roedel , linux-kernel@vger.kernel.org, yi.kuo@mediatek.com, Tomasz Figa , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, yong.wu@mediatek.com, Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The config MTK_SMI always depends on MTK_IOMMU which is built-in currently. Thus we don't have module_exit before. This patch adds module_exit and module_license. It is a preparing patch for supporting MTK_SMI could been built as a module. Signed-off-by: Yong Wu --- drivers/memory/mtk-smi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index e2aebd2bfa8e..aa2a25abf04f 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -597,3 +597,13 @@ static int __init mtk_smi_init(void) return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers)); } module_init(mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ + platform_unregister_drivers(smidrivers, ARRAY_SIZE(smidrivers)); +} +module_exit(mtk_smi_exit); + +MODULE_DESCRIPTION("MediaTek SMI driver"); +MODULE_ALIAS("platform:MediaTek-SMI"); +MODULE_LICENSE("GPL v2"); From patchwork Thu Jan 21 06:24:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WW9uZyBXdSAo5ZC05YuHKQ==?= X-Patchwork-Id: 12034855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02444C433DB for ; Thu, 21 Jan 2021 06:35:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95979238EE for ; Thu, 21 Jan 2021 06:35:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95979238EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=S8OBsUoxb+iKCK/oA/R250AVHJgV770UFL4WeyHRmj0=; b=nlMCsdz1s3zxN0TQUtF5tiCVJ YF4HUaJpCnr3L9i9FznaSdSVhW0qeoiStsFVCVLPH8AZlllOPP9ncC0KbM9GI1lw98kEh4KFc0lSP NRgk3wonk0w275bchX0J/cSUUnIOAp3WFDXKulFdlHjpV8bjfgpB8bGQq3OQoJ+LsmklnF2j0di/U rpMHAMBrnnGFNn9asQvdtA8xCOt0UgNbXOe4lNJvjCd27J/VUcD5SQYWOQr5EvzhoBVWXgMuxW2PM WaKrKMxxMUwnvU8xmJjdzzxMDdVtZRLRPL9TujEgZcT2yQYPQM+oHQxc+mcruVzsePxZfge26hkDU x7rvQvamQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2TXj-0003cy-Mb; Thu, 21 Jan 2021 06:34:07 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2TXh-0003by-8t; Thu, 21 Jan 2021 06:34:06 +0000 X-UUID: b84c1893db9641248457c212c75ef926-20210120 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=v4tfapMg2ZzA9xEv1+2MPHFrNUHJ+FWRarMftvCe3oo=; b=TNXRTwUDcBzPX0C64mS0Q73IFM5lVP86Jxao9yslrFlEm9/vJMYLB0Yrc1Vzqrv9muH/NfCkcvu9O+ldFOlsXC8ScQliPzLy3RLqaZePeHwdhEgYkRiMdJDYpAsZMV1S0TSO1DuRWYls9WjKoe4bjXMtMVzTvobTwdQdQQpiDCc=; X-UUID: b84c1893db9641248457c212c75ef926-20210120 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1559051696; Wed, 20 Jan 2021 22:25:40 -0800 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 20 Jan 2021 22:25:38 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 21 Jan 2021 14:25:30 +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; Thu, 21 Jan 2021 14:25:29 +0800 From: Yong Wu To: Krzysztof Kozlowski , Matthias Brugger Subject: [PATCH 3/3] memory: mtk-smi: Switch MTK_SMI to tristate Date: Thu, 21 Jan 2021 14:24:29 +0800 Message-ID: <20210121062429.26504-4-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210121062429.26504-1-yong.wu@mediatek.com> References: <20210121062429.26504-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_013405_501171_783DAABF X-CRM114-Status: GOOD ( 15.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, anan.sun@mediatek.com, Nicolas Boichat , srv_heupstream@mediatek.com, Robin Murphy , Joerg Roedel , linux-kernel@vger.kernel.org, yi.kuo@mediatek.com, Tomasz Figa , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, yong.wu@mediatek.com, Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch switches MTK_SMI to tristate. Support it could be 'm'. Meanwhile, Fix a build issue while MTK_SMI is built as module. Signed-off-by: Yong Wu --- This patch has a little conflict with the mt8192 iommu patch which delete the MTK_LARB_NR_MAX in smi.h(It's still reviewing). This patch rebase on the clean v5.11-rc1. --- drivers/memory/Kconfig | 2 +- include/soc/mediatek/smi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig index 3ea6913df176..d5f0f4680880 100644 --- a/drivers/memory/Kconfig +++ b/drivers/memory/Kconfig @@ -173,7 +173,7 @@ config JZ4780_NEMC memory devices such as NAND and SRAM. config MTK_SMI - bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST + tristate "Mediatek SoC Memory Controller driver" if COMPILE_TEST depends on ARCH_MEDIATEK || COMPILE_TEST help This driver is for the Memory Controller module in MediaTek SoCs, diff --git a/include/soc/mediatek/smi.h b/include/soc/mediatek/smi.h index 5a34b87d89e3..29e2fb8f33d6 100644 --- a/include/soc/mediatek/smi.h +++ b/include/soc/mediatek/smi.h @@ -9,7 +9,7 @@ #include #include -#ifdef CONFIG_MTK_SMI +#if IS_ENABLED(CONFIG_MTK_SMI) #define MTK_LARB_NR_MAX 16