From patchwork Mon Jul 9 15:41:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 941397 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41PV4F1LTdz9rvt for ; Tue, 10 Jul 2018 01:43:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933345AbeGIPnm (ORCPT ); Mon, 9 Jul 2018 11:43:42 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:43123 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932867AbeGIPmC (ORCPT ); Mon, 9 Jul 2018 11:42:02 -0400 Received: by mail-oi0-f68.google.com with SMTP id b15-v6so36666070oib.10; Mon, 09 Jul 2018 08:42:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=03fLRQWBWjrnrq//f5qAO73beSpbPCDyJ89HOkL1LXw=; b=Q2HH4gHxmP6vM/m8GZ2qSBKvuT1fv/R52qU0B/MCuGEyZ8VDeuR7JHAxNk/MA6hQ2H Lif0yEDQD1nL4VJ5+htjr9kYzVib1Gghzs9tf+6wZ6l++xofj7FWEDCcYNIqP/Hp7ooz 7HpUYdNOUxiwubERYaK+EJ2VPfRZ5BJY7BOZva4bgW1jNbUTtrXUDLdNE31g/Y/iLbEs dv7n5Hj/fZX064cDR38AgkmMSAhd0FxBbD4lQCMTscOC7L3OqbmtjC8jKx3EcKcTVOrQ pRTIA8IGVa8ylXl+KW0bpL7JdtzCAyGdabUWH2wQ7zofJiODsSjOK+0M2EPXCrqFqiZZ KtOQ== X-Gm-Message-State: APt69E3KIXmAkfm+tIfUfJnDLRQssduQYjjP9vNQ+XZ/oNfLChzv6oDO gc84u6YodPXijRhUUwbzyQ== X-Google-Smtp-Source: AAOMgpeUE33/sCrpWJFxntA3qcfXLbA4kljyhyv+IzhJAWRZVkSGqCplNupuUWsyuqz/3P0jlYAX9g== X-Received: by 2002:aca:665b:: with SMTP id a88-v6mr24312433oic.101.1531150922149; Mon, 09 Jul 2018 08:42:02 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id z196-v6sm30759391oig.12.2018.07.09.08.42.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 08:42:01 -0700 (PDT) From: Rob Herring To: Greg Kroah-Hartman Cc: Linus Walleij , Alexander Graf , Bjorn Andersson , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Joerg Roedel , Robin Murphy , Mark Brown , Frank Rowand , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, boot-architecture@lists.linaro.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 2/6] dt-bindings: pinctrl: add a 'pinctrl-use-default' property Date: Mon, 9 Jul 2018 09:41:49 -0600 Message-Id: <20180709154153.15742-3-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180709154153.15742-1-robh@kernel.org> References: <20180709154153.15742-1-robh@kernel.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Pin setup may be optional in some cases such as the reset default works or the pin setup is done by the bootloader. In these cases, it is optional for the OS to support managing the pin controller and pin setup. In order to support this scenario, add a property 'pinctrl-use-default' to indicate that the pin configuration is optional. Signed-off-by: Rob Herring --- .../devicetree/bindings/pinctrl/pinctrl-bindings.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt index ad9bbbba36e9..cef2b5855d60 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt @@ -103,6 +103,12 @@ Optional properties: #pinctrl-cells: Number of pin control cells in addition to the index within the pin controller device instance +pinctrl-use-default: Boolean. Indicates that the OS can use the boot default + pin configuration. This allows using an OS that does not have a + driver for the pin controller. This property can be set either + globally for the pin controller or in child nodes for individual + pin group control. + Pin controller devices should contain the pin configuration nodes that client devices reference. From patchwork Mon Jul 9 15:41:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 941396 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41PV2r07KXz9rvt for ; Tue, 10 Jul 2018 01:42:44 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933512AbeGIPmO (ORCPT ); Mon, 9 Jul 2018 11:42:14 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:40506 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933650AbeGIPmJ (ORCPT ); Mon, 9 Jul 2018 11:42:09 -0400 Received: by mail-oi0-f66.google.com with SMTP id w126-v6so36703041oie.7; Mon, 09 Jul 2018 08:42:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3bGancJVr3XeRqzVj1sUBDCgPaP76cWtWFpfgEAONTQ=; b=A0QM6SREowOWs/R1IYoBExOdw90tNQKjjSqq24Fhm4C85YqTiVQsgJTLbhK/BmU5cE OFHfuRaXlkn5tzWVw3Fs+wJDPzgDkKfyZyfEMFcTUmEnriRVruktxYTfeM3m65w9q8I5 alKMGfPbecPEM0HaxXC5F8RZRz/2KbwMN4My0XYc3FxNSITevMVc+3DxNf7ndExQ3i8e j7PvfUvBPiXVufXI/SuGXgurmViwSSuyWIIrIVcf7MJAqt1m+k/jfq9OdwwJDk6wXcZ/ ARaSJiMKFHl/dasp+rZk4OclJqjcJ0e8tYPK3T8SkR3ajnaCffBuz+P0WCL1duAWFKAW Jobg== X-Gm-Message-State: APt69E2vLHgxy5wbVM34xiozZlhqqeUuaaOWCbHN22HNfTDBrtPdSr4i WvPUnZKeOFC+2sDx1em7vQ== X-Google-Smtp-Source: AAOMgpcGl0TWQRbEkfOsMouoS/7suj4gT5CwtsM330MHZur1nSNVxOYZjX4G+MDJMIDKHc33u2EtWA== X-Received: by 2002:aca:dc08:: with SMTP id t8-v6mr24974652oig.226.1531150928299; Mon, 09 Jul 2018 08:42:08 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id z196-v6sm30759391oig.12.2018.07.09.08.42.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 08:42:07 -0700 (PDT) From: Rob Herring To: Greg Kroah-Hartman Cc: Linus Walleij , Alexander Graf , Bjorn Andersson , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Joerg Roedel , Robin Murphy , Mark Brown , Frank Rowand , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, boot-architecture@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Kukjin Kim , Krzysztof Kozlowski , Rob Clark , Heiko Stuebner , iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, Will Deacon , Marek Szyprowski , Joerg Roedel Subject: [PATCH v4 5/6] iommu: Remove IOMMU_OF_DECLARE Date: Mon, 9 Jul 2018 09:41:52 -0600 Message-Id: <20180709154153.15742-6-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180709154153.15742-1-robh@kernel.org> References: <20180709154153.15742-1-robh@kernel.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Now that we use the driver core to stop deferred probe for missing drivers, IOMMU_OF_DECLARE can be removed. This is slightly less optimal than having a list of built-in drivers in that we'll now defer probe twice before giving up. This shouldn't have a significant impact on boot times as past discussions about deferred probe have given no evidence of deferred probe having a substantial impact. Cc: Robin Murphy Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Rob Clark Cc: Heiko Stuebner Cc: Frank Rowand Cc: linux-arm-kernel@lists.infradead.org Cc: iommu@lists.linux-foundation.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org Acked-by: Will Deacon Acked-by: Marek Szyprowski Acked-by: Joerg Roedel Signed-off-by: Rob Herring --- drivers/iommu/arm-smmu-v3.c | 2 -- drivers/iommu/arm-smmu.c | 7 ------- drivers/iommu/exynos-iommu.c | 2 -- drivers/iommu/ipmmu-vmsa.c | 3 --- drivers/iommu/msm_iommu.c | 2 -- drivers/iommu/of_iommu.c | 19 +------------------ drivers/iommu/qcom_iommu.c | 2 -- drivers/iommu/rockchip-iommu.c | 2 -- include/asm-generic/vmlinux.lds.h | 2 -- include/linux/of_iommu.h | 4 ---- 10 files changed, 1 insertion(+), 44 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 1d647104bccc..22bdabd3d8e0 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -2915,8 +2915,6 @@ static struct platform_driver arm_smmu_driver = { }; module_platform_driver(arm_smmu_driver); -IOMMU_OF_DECLARE(arm_smmuv3, "arm,smmu-v3"); - MODULE_DESCRIPTION("IOMMU API for ARM architected SMMUv3 implementations"); MODULE_AUTHOR("Will Deacon "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index f7a96bcf94a6..c73cfce1ccc0 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -2211,13 +2211,6 @@ static struct platform_driver arm_smmu_driver = { }; module_platform_driver(arm_smmu_driver); -IOMMU_OF_DECLARE(arm_smmuv1, "arm,smmu-v1"); -IOMMU_OF_DECLARE(arm_smmuv2, "arm,smmu-v2"); -IOMMU_OF_DECLARE(arm_mmu400, "arm,mmu-400"); -IOMMU_OF_DECLARE(arm_mmu401, "arm,mmu-401"); -IOMMU_OF_DECLARE(arm_mmu500, "arm,mmu-500"); -IOMMU_OF_DECLARE(cavium_smmuv2, "cavium,smmu-v2"); - MODULE_DESCRIPTION("IOMMU API for ARM architected SMMU implementations"); MODULE_AUTHOR("Will Deacon "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 85879cfec52f..b128cb4372d3 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -1390,5 +1390,3 @@ static int __init exynos_iommu_init(void) return ret; } core_initcall(exynos_iommu_init); - -IOMMU_OF_DECLARE(exynos_iommu_of, "samsung,exynos-sysmmu"); diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index 40ae6e87cb88..f026aa16d5f1 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -1108,9 +1108,6 @@ static void __exit ipmmu_exit(void) subsys_initcall(ipmmu_init); module_exit(ipmmu_exit); -IOMMU_OF_DECLARE(ipmmu_vmsa_iommu_of, "renesas,ipmmu-vmsa"); -IOMMU_OF_DECLARE(ipmmu_r8a7795_iommu_of, "renesas,ipmmu-r8a7795"); - MODULE_DESCRIPTION("IOMMU API for Renesas VMSA-compatible IPMMU"); MODULE_AUTHOR("Laurent Pinchart "); MODULE_LICENSE("GPL v2"); diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 0d3350463a3f..27377742600d 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -877,7 +877,5 @@ static void __exit msm_iommu_driver_exit(void) subsys_initcall(msm_iommu_driver_init); module_exit(msm_iommu_driver_exit); -IOMMU_OF_DECLARE(msm_iommu_of, "qcom,apq8064-iommu"); - MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Stepan Moskovchenko "); diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 78ddf47dd67a..f7787e757244 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -27,9 +27,6 @@ #define NO_IOMMU 1 -static const struct of_device_id __iommu_of_table_sentinel - __used __section(__iommu_of_table_end); - /** * of_get_dma_window - Parse *dma-window property and returns 0 if found. * @@ -98,19 +95,6 @@ int of_get_dma_window(struct device_node *dn, const char *prefix, int index, } EXPORT_SYMBOL_GPL(of_get_dma_window); -static bool of_iommu_driver_present(struct device_node *np) -{ - /* - * If the IOMMU still isn't ready by the time we reach init, assume - * it never will be. We don't want to defer indefinitely, nor attempt - * to dereference __iommu_of_table after it's been freed. - */ - if (system_state >= SYSTEM_RUNNING) - return false; - - return of_match_node(&__iommu_of_table, np); -} - static int of_iommu_xlate(struct device *dev, struct of_phandle_args *iommu_spec) { @@ -120,8 +104,7 @@ static int of_iommu_xlate(struct device *dev, ops = iommu_ops_from_fwnode(fwnode); if ((ops && !ops->of_xlate) || - !of_device_is_available(iommu_spec->np) || - (!ops && !of_iommu_driver_present(iommu_spec->np))) + !of_device_is_available(iommu_spec->np)) return NO_IOMMU; err = iommu_fwspec_init(dev, &iommu_spec->np->fwnode, ops); diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index fe88a4880d3a..b48aee82d14b 100644 --- a/drivers/iommu/qcom_iommu.c +++ b/drivers/iommu/qcom_iommu.c @@ -945,7 +945,5 @@ static void __exit qcom_iommu_exit(void) module_init(qcom_iommu_init); module_exit(qcom_iommu_exit); -IOMMU_OF_DECLARE(qcom_iommu_dev, "qcom,msm-iommu-v1"); - MODULE_DESCRIPTION("IOMMU API for QCOM IOMMU v1 implementations"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 054cd2c8e9c8..de8d3bf91b23 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1284,8 +1284,6 @@ static int __init rk_iommu_init(void) } subsys_initcall(rk_iommu_init); -IOMMU_OF_DECLARE(rk_iommu_of, "rockchip,iommu"); - MODULE_DESCRIPTION("IOMMU API for Rockchip"); MODULE_AUTHOR("Simon Xue and Daniel Kurtz "); MODULE_ALIAS("platform:rockchip-iommu"); diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index e373e2e10f6a..f173b5f30dbe 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -218,7 +218,6 @@ #define TIMER_OF_TABLES() OF_TABLE(CONFIG_TIMER_OF, timer) #define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip) #define CLK_OF_TABLES() OF_TABLE(CONFIG_COMMON_CLK, clk) -#define IOMMU_OF_TABLES() OF_TABLE(CONFIG_OF_IOMMU, iommu) #define RESERVEDMEM_OF_TABLES() OF_TABLE(CONFIG_OF_RESERVED_MEM, reservedmem) #define CPU_METHOD_OF_TABLES() OF_TABLE(CONFIG_SMP, cpu_method) #define CPUIDLE_METHOD_OF_TABLES() OF_TABLE(CONFIG_CPU_IDLE, cpuidle_method) @@ -601,7 +600,6 @@ CLK_OF_TABLES() \ RESERVEDMEM_OF_TABLES() \ TIMER_OF_TABLES() \ - IOMMU_OF_TABLES() \ CPU_METHOD_OF_TABLES() \ CPUIDLE_METHOD_OF_TABLES() \ KERNEL_DTB() \ diff --git a/include/linux/of_iommu.h b/include/linux/of_iommu.h index 4fa654e4b5a9..f3d40dd7bb66 100644 --- a/include/linux/of_iommu.h +++ b/include/linux/of_iommu.h @@ -32,8 +32,4 @@ static inline const struct iommu_ops *of_iommu_configure(struct device *dev, #endif /* CONFIG_OF_IOMMU */ -extern struct of_device_id __iommu_of_table; - -#define IOMMU_OF_DECLARE(name, compat) OF_DECLARE_1(iommu, name, compat, NULL) - #endif /* __OF_IOMMU_H */