From patchwork Mon Jul 20 14:21:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11674091 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 750531392 for ; Mon, 20 Jul 2020 14:27:52 +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 4EDD92065E for ; Mon, 20 Jul 2020 14:27:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="adP95jAQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EDD92065E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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:In-Reply-To:References:List-Owner; bh=0mSkBmMR/12pddKJYzfbroMm5hFQynOJpgvvoZCWlEI=; b=adP95jAQjuMBlpYIrBXREMsKzK zJl7SGwpkjA5zZ6hfJKzcWbFz7Ec15mDpHJ+KLNgk86U2Yqs8KmjbZEd+A/OWe3gHHdvT3j44vFfI j3Vh6jqLdZGanjMqRlRvw4223Bdpx9Lcb9aZwuCafZplBpau7zkeWdMqcCjOdmle+I0ovA1Kdx4Al FFIWIeQbRtW4PvCs1x3noUOTqMG9zGOEEYWSjZVGzurOuluf36OM9d+oXlhWHPF61bcHHFRnXank3 eQtLkosm1iDg1CvNKAzdWOeKqlRMuu8mz+2UpGTG+lEHvDe2R9y14dfL9o2KeEQdQ5UvZlR+B9jNn qhH1joRw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxWk8-0003As-QB; Mon, 20 Jul 2020 14:26:12 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxWk6-00039T-Ox for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 14:26:11 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1F2282002FE; Mon, 20 Jul 2020 16:26:06 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 32CC12002DC; Mon, 20 Jul 2020 16:25:56 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E3256402C3; Mon, 20 Jul 2020 22:07:07 +0800 (SGT) From: Anson Huang To: catalin.marinas@arm.com, will@kernel.org, lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com, p.zabel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, bjorn.andersson@linaro.org, leoyang.li@nxp.com, vkoul@kernel.org, geert+renesas@glider.be, olof@lixom.net, amurray@thegoodpenguin.co.uk, treding@nvidia.com, vidyas@nvidia.com, hayashi.kunihiko@socionext.com, jonnyc@amazon.com, eswara.kota@linux.intel.com, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH V3 1/3] reset: imx7: Support module build Date: Mon, 20 Jul 2020 22:21:59 +0800 Message-Id: <1595254921-26050-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_102610_911660_D68D2D04 X-CRM114-Status: GOOD ( 12.17 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.21 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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: Linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use module_platform_driver(), add module device table, author, description and license to support module build, and CONFIG_RESET_IMX7 is changed to default 'y' ONLY for i.MX7D, other platforms need to select it in defconfig. Signed-off-by: Anson Huang --- Changes since V2: - use module_platform_driver() instead of builtin_platform_driver(). --- drivers/reset/Kconfig | 5 +++-- drivers/reset/reset-imx7.c | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index d9efbfd..19f9773 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -65,9 +65,10 @@ config RESET_HSDK This enables the reset controller driver for HSDK board. config RESET_IMX7 - bool "i.MX7/8 Reset Driver" if COMPILE_TEST + tristate "i.MX7/8 Reset Driver" depends on HAS_IOMEM - default SOC_IMX7D || (ARM64 && ARCH_MXC) + depends on SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST + default y if SOC_IMX7D select MFD_SYSCON help This enables the reset controller driver for i.MX7 SoCs. diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index d170fe6..9832033 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -8,7 +8,7 @@ */ #include -#include +#include #include #include #include @@ -386,6 +386,7 @@ static const struct of_device_id imx7_reset_dt_ids[] = { { .compatible = "fsl,imx8mp-src", .data = &variant_imx8mp }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE(of, imx7_reset_dt_ids); static struct platform_driver imx7_reset_driver = { .probe = imx7_reset_probe, @@ -394,4 +395,8 @@ static struct platform_driver imx7_reset_driver = { .of_match_table = imx7_reset_dt_ids, }, }; -builtin_platform_driver(imx7_reset_driver); +module_platform_driver(imx7_reset_driver); + +MODULE_AUTHOR("Andrey Smirnov "); +MODULE_DESCRIPTION("NXP i.MX7 reset driver"); +MODULE_LICENSE("GPL v2"); From patchwork Mon Jul 20 14:22:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11674087 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 342DF6C1 for ; Mon, 20 Jul 2020 14:27:34 +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 0D59822B4D for ; Mon, 20 Jul 2020 14:27:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="v5KNduOs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D59822B4D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=itEO8wQwzD1OtORQh3qavCIjc2r1Z3qs6k22PiXPT/c=; b=v5KNduOsoCkKTsdYjoHFLhK8ln J5uApzH6iJ165rpcU1JpivkzmuC68ivCGrBV1LkdYFA9oPWUBkW7jG7IoP9eFkrV2AhqMETOeJPNq 9bWb9DHmk1/mghqCAKYDeGh5+qHyGCZB48rOOzHC0tR1wr833nhqT0YX1fncFdAR+mvUsBt49wER7 /eA+9fCAZvAWK5k5habOcjux2qo3eYnJ/i3GZSDhJzH5lVpl/UjwOBSky0a4ro4oPtpxYXF3kO9hG LNYg1bwhdSzgp47zQxOAr6DV7U36N9mbsEYprObSv/NSxMTOb8TdWgMHuRCO9yI4A5M6jbcJJfZWJ 5MYflbaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxWkB-0003BM-Mu; Mon, 20 Jul 2020 14:26:15 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxWk7-00039f-2u for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 14:26:11 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7CDEF1A020A; Mon, 20 Jul 2020 16:26:08 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5ED471A020F; Mon, 20 Jul 2020 16:25:58 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 16F6540305; Mon, 20 Jul 2020 22:07:10 +0800 (SGT) From: Anson Huang To: catalin.marinas@arm.com, will@kernel.org, lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com, p.zabel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, bjorn.andersson@linaro.org, leoyang.li@nxp.com, vkoul@kernel.org, geert+renesas@glider.be, olof@lixom.net, amurray@thegoodpenguin.co.uk, treding@nvidia.com, vidyas@nvidia.com, hayashi.kunihiko@socionext.com, jonnyc@amazon.com, eswara.kota@linux.intel.com, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH V3 2/3] arm64: defconfig: Select CONFIG_RESET_IMX7 as module by default Date: Mon, 20 Jul 2020 22:22:00 +0800 Message-Id: <1595254921-26050-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595254921-26050-1-git-send-email-Anson.Huang@nxp.com> References: <1595254921-26050-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_102611_249501_0FB4D97D X-CRM114-Status: UNSURE ( 7.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.13 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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: Linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org i.MX7 reset driver now supports module build, it is no longer enabled by default, need to select it explicitly. Signed-off-by: Anson Huang --- No change. --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 39b3ac7..6c764bd 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -921,6 +921,7 @@ CONFIG_PWM_SAMSUNG=y CONFIG_PWM_SUN4I=m CONFIG_PWM_TEGRA=m CONFIG_QCOM_PDC=y +CONFIG_RESET_IMX7=m CONFIG_RESET_QCOM_AOSS=y CONFIG_RESET_QCOM_PDC=m CONFIG_RESET_TI_SCI=y From patchwork Mon Jul 20 14:22:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11674089 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 722B91392 for ; Mon, 20 Jul 2020 14:27:49 +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 4C4682065E for ; Mon, 20 Jul 2020 14:27:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G03o6RR0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C4682065E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=kwZe/ueZM6s4KPua4nYWKpkL2PcsEPFok5voI3h6VAw=; b=G03o6RR0tLgU7q6uXIov/j0Uxy 25fn2vpIsYhUI+Zo62LGlPOH4BWuaBTgTPPviVmuHYnmXD3HqAwh7vJiLcZIxDOtJBu87GQr16G2c uwyDLq+Qtb5gpFpohm74qDY5h5RnWVcKJmNWd1ykzhPrR7vj+nlmzkEOQw+M5XU/sSREcrmxO/e0K bhQrFoz/j1CIlgmnPlQj1jqHqcM9S+nMc8+w44tH4ZG6BZAZEBNeQdDBCPSCAzZIo/FHT2papFEc2 wspmxY6bA2IsbYV/DPOJ8jSBPZfOxkxoB1fjdcju7mS3IggH6LBcCeJs8wL9CTA6Mvquc/XdQvaQ7 vHHBxPYg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxWkJ-0003Di-66; Mon, 20 Jul 2020 14:26:23 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxWk7-0003A0-EB for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 14:26:12 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9B7A720129C; Mon, 20 Jul 2020 16:26:10 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9E7D02002FB; Mon, 20 Jul 2020 16:26:00 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 48BBA40309; Mon, 20 Jul 2020 22:07:12 +0800 (SGT) From: Anson Huang To: catalin.marinas@arm.com, will@kernel.org, lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com, p.zabel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, bjorn.andersson@linaro.org, leoyang.li@nxp.com, vkoul@kernel.org, geert+renesas@glider.be, olof@lixom.net, amurray@thegoodpenguin.co.uk, treding@nvidia.com, vidyas@nvidia.com, hayashi.kunihiko@socionext.com, jonnyc@amazon.com, eswara.kota@linux.intel.com, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH V3 3/3] pci: imx: Select RESET_IMX7 by default Date: Mon, 20 Jul 2020 22:22:01 +0800 Message-Id: <1595254921-26050-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595254921-26050-1-git-send-email-Anson.Huang@nxp.com> References: <1595254921-26050-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_102611_574065_B62FC3EC X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.21 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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: Linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org i.MX7 reset driver now supports module build and it is no longer built in by default, so i.MX PCI driver needs to select it explicitly due to it is NOT supporting loadable module currently. Signed-off-by: Anson Huang --- No change. --- drivers/pci/controller/dwc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 044a376..bcf63ce 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -90,6 +90,7 @@ config PCI_EXYNOS config PCI_IMX6 bool "Freescale i.MX6/7/8 PCIe controller" + select RESET_IMX7 depends on ARCH_MXC || COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST