From patchwork Sun Apr 19 17:07:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212273 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 F03F2C54FC9 for ; Sun, 19 Apr 2020 17:08:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D08A921473 for ; Sun, 19 Apr 2020 17:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316095; bh=OFl0DgxoIf3Yo+GEOQZISzTrDAkAGWJkRNFX3IleGW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1nlpD1lYGc5nz7eL3s3KncfFpF7q21+vdaxqvxZXPDzmYUXtQOTHc7yhLxk/D+9+Z SZPGnOUZbuIR7UdJAPld004UOWKPkKnTgYHIl0uWNxeIxADUGjFcWK0B2nX8JD+jMI m2mflCwxRyuDqJzONJ8xSvbEJV8qmllBRJg8+dVc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726539AbgDSRIP (ORCPT ); Sun, 19 Apr 2020 13:08:15 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:36528 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbgDSRIO (ORCPT ); Sun, 19 Apr 2020 13:08:14 -0400 Received: by mail-oi1-f195.google.com with SMTP id s202so6772001oih.3; Sun, 19 Apr 2020 10:08:14 -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:mime-version:content-transfer-encoding; bh=7u0a7x6gVwqXn6aqvyWZupXMzL8Fz9JGwbGpr6xl9qw=; b=eO0fliPgoog6YqL+nxl+R+wOQmXHdagxZmg9qeU8mBTaF8+58foeGa/JLdQ9ZW/UEE tmDSk89BQ/KNfum1fJRp9/cgbu73i8k/GnjakamE9JZKB7LkrCbZaU+fXBYbp40in3Qu OaXjl3A7+qSJQIImR1/HVtZSrw7iKNzouApLyg55BEYQjEOEyP++hs/1YS8mLhxqwhEX MyuQk6tkINEZmcCgKRiA6iR+gM6rgMy/Z8LdMF9l3cF1xxgaej4h3dApwG4wOMTWcQY6 P0r3rIMf/a3kLDe8xhwEGTKOeEHB9HhNNLiKVEiuerkeYtodksfu7kue2W8PHNUHUXY0 MasQ== X-Gm-Message-State: AGi0PuakPfKBFl9oUrMgDYfy5c4NenGSvnE0QvfX0HR/oTgegJFoTv02 bPjfXD5J3kV/IlsJqqH32A== X-Google-Smtp-Source: APiQypIylm12TEGbRXZrDBPw2xjm/2k4Np+huyFbHSGpX+YqkB9/f2+MfTS6wgL2Gcpce4PpGiVy8w== X-Received: by 2002:a05:6808:a91:: with SMTP id q17mr7982316oij.102.1587316093748; Sun, 19 Apr 2020 10:08:13 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:13 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 01/17] ARM: vexpress: Move vexpress_flags_set() into arch code Date: Sun, 19 Apr 2020 12:07:54 -0500 Message-Id: <20200419170810.5738-2-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org vexpress_flags_set() is only used by the platform SMP related code and has nothing to do with the vexpress-sysreg MFD driver other than both access the same h/w block. It's also only needed for 32-bit systems and must be built-in for them. Let's move vexpress_flags_set() closer to where it is being used. This will allow for vexpress-sysreg to be built as a module. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Lee Jones Signed-off-by: Rob Herring --- arch/arm/mach-vexpress/Kconfig | 1 - arch/arm/mach-vexpress/core.h | 1 + arch/arm/mach-vexpress/dcscb.c | 1 + arch/arm/mach-vexpress/v2m.c | 23 +++++++++++++++++++++++ drivers/mfd/vexpress-sysreg.c | 19 ------------------- include/linux/vexpress.h | 4 ---- 6 files changed, 25 insertions(+), 24 deletions(-) diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 726a68085c3b..18951cd20d9d 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -22,7 +22,6 @@ menuconfig ARCH_VEXPRESS select REGULATOR_FIXED_VOLTAGE if REGULATOR select VEXPRESS_CONFIG select VEXPRESS_SYSCFG - select MFD_VEXPRESS_SYSREG help This option enables support for systems using Cortex processor based ARM core and logic (FPGA) tiles on the Versatile Express motherboard, diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h index f4a7519084f1..bda78675c55d 100644 --- a/arch/arm/mach-vexpress/core.h +++ b/arch/arm/mach-vexpress/core.h @@ -1,3 +1,4 @@ bool vexpress_smp_init_ops(void); +void vexpress_flags_set(u32 data); extern const struct smp_operations vexpress_smp_dt_ops; diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c index 46a903c88c6a..a0554d7d04f7 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c @@ -20,6 +20,7 @@ #include #include +#include "core.h" #define RST_HOLD0 0x0 #define RST_HOLD1 0x4 diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 95886b3bb9dd..ffe7c7a85ae9 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -1,8 +1,31 @@ // SPDX-License-Identifier: GPL-2.0 +#include +#include #include #include "core.h" +#define SYS_FLAGSSET 0x030 +#define SYS_FLAGSCLR 0x034 + +void vexpress_flags_set(u32 data) +{ + static void __iomem *base; + + if (!base) { + struct device_node *node = of_find_compatible_node(NULL, NULL, + "arm,vexpress-sysreg"); + + base = of_iomap(node, 0); + } + + if (WARN_ON(!base)) + return; + + writel(~0, base + SYS_FLAGSCLR); + writel(data, base + SYS_FLAGSSET); +} + static const char * const v2m_dt_match[] __initconst = { "arm,vexpress", NULL, diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index c68ff56dbdb1..0b9cc67706c7 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -42,24 +41,6 @@ #define SYS_MISC_MASTERSITE (1 << 14) -void vexpress_flags_set(u32 data) -{ - static void __iomem *base; - - if (!base) { - struct device_node *node = of_find_compatible_node(NULL, NULL, - "arm,vexpress-sysreg"); - - base = of_iomap(node, 0); - } - - if (WARN_ON(!base)) - return; - - writel(~0, base + SYS_FLAGSCLR); - writel(data, base + SYS_FLAGSSET); -} - /* The sysreg block is just a random collection of various functions... */ static struct syscon_platform_data vexpress_sysreg_sys_id_pdata = { diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index 0e130b5077a5..2ec7992b054c 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h @@ -40,8 +40,4 @@ struct device *vexpress_config_bridge_register(struct device *parent, struct regmap *devm_regmap_init_vexpress_config(struct device *dev); -/* Platform control */ - -void vexpress_flags_set(u32 data); - #endif From patchwork Sun Apr 19 17:07:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212272 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 75D89C54FC9 for ; Sun, 19 Apr 2020 17:08:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C66421927 for ; Sun, 19 Apr 2020 17:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316099; bh=PQahhGI9a1IpkbYLA4Opp9ZmWVfvsDFRho7lLuaUQXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RWgiGJOvoUG89K43ji7eBh2bnV1d3gxaxplsNw1zp2p1bzU3T0+7nRWVDDXr0Mgoy 3jViHaKOIwEr78D1C4RaYMrrAKE1cuoC1zANeXsKuoAlNzhSL2esq3t74FhacDFi4a ZVIoGxTgvj7qfNkwtI1S6Xuk4h86wsAJ9XuYwzk8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725932AbgDSRIS (ORCPT ); Sun, 19 Apr 2020 13:08:18 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:43637 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbgDSRIS (ORCPT ); Sun, 19 Apr 2020 13:08:18 -0400 Received: by mail-ot1-f66.google.com with SMTP id g14so5954670otg.10; Sun, 19 Apr 2020 10:08:17 -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:mime-version:content-transfer-encoding; bh=J4W1MOddjCCw9dJQYLiEdJO8bx77R5HtOxEd/Z5DPRs=; b=dG+WO6E7anSCss5mEEnTN7NJVeuVofNwCgYn7tNI+xTsFZKzZR/CT5OIh/LbAR3nx2 /mEA+U5/x4CSfTLi++D6jojfO3nGVZXZ+Q/lKTAve38RF2mQPb/q9Nk4JjbMXPP/aEJz aQ9BkVD+8Rq9Bjuw2MKBIWEpvdXS4GgV8sBx9MpyYBoOrX70Sb3ZfPZUmhkXqRBZRg+p 8KO2l+O8cbGppYhbYXhy7DktE3xhVbEfwZAEQcqe3stYNpr7UjPoRUQBHjfHBWydh129 oASC//RA/0vUFW/n1g3lM6cX5ASMQg0SP3GEA975cFWrDq6PSKIK5s2uocBVPz7cLPxP KirQ== X-Gm-Message-State: AGi0Puaspczsl0XQ0IygxACza2ng7uCUyFzzkGpMn5M3cUEfd8i8Iy8d OcpLejX5wcUfbAwUqmY5vw== X-Google-Smtp-Source: APiQypK0fJJhWegtefihZ3xqlHSSIU1Y4BN4GM5zgOcJ5aHxuge40tlIXHFeRHdB9gUqefM8BlqeQw== X-Received: by 2002:a9d:423:: with SMTP id 32mr6922257otc.334.1587316097257; Sun, 19 Apr 2020 10:08:17 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:16 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 03/17] arm64: vexpress: Don't select CONFIG_VEXPRESS_CONFIG Date: Sun, 19 Apr 2020 12:07:56 -0500 Message-Id: <20200419170810.5738-4-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org CONFIG_VEXPRESS_CONFIG has 'default y if ARCH_VEXPRESS', so selecting is unnecessary. It also prevents setting CONFIG_VEXPRESS_CONFIG to a module. Cc: Catalin Marinas Cc: Will Deacon Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Signed-off-by: Rob Herring --- arch/arm64/Kconfig.platforms | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 9c084f995e0f..5c38dc56b808 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -278,7 +278,6 @@ config ARCH_VEXPRESS select GPIOLIB select PM select PM_GENERIC_DOMAINS - select VEXPRESS_CONFIG help This enables support for the ARMv8 software model (Versatile Express). From patchwork Sun Apr 19 17:07:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212271 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 E82C0C54FCB for ; Sun, 19 Apr 2020 17:08:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA16122240 for ; Sun, 19 Apr 2020 17:08:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316102; bh=mSVZ9744iRMyFHCrYw20NJhqoVeef8ONoiuPrNobXjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pQR0L67CdqB9116+UxcJgLjhnbUjB99jBpj1N5v/kxhT2UfZKnMTxPpzheoVGkdee q1q/IgO1ZJY5ccBTf0fH6XTAafDeNA1DvE9QMuGPYpKk5mJ2D16B4ft5jmZoBGTVfJ tLFwCvxjt7TLRbiskY6FajeYA9CWHj6FNFtM8h0g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726639AbgDSRIW (ORCPT ); Sun, 19 Apr 2020 13:08:22 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:32817 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbgDSRIV (ORCPT ); Sun, 19 Apr 2020 13:08:21 -0400 Received: by mail-ot1-f66.google.com with SMTP id j26so5980694ots.0; Sun, 19 Apr 2020 10:08:20 -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:mime-version:content-transfer-encoding; bh=Dfjp1gZuZ5vkk5hbQ7tBLiYF+WukIQyW6RLLpGIIUfY=; b=MYyYf8f5dqDnsQwkuWfkfzjYlQqeTD9AY1ZT8yzIDX2LxD1ENgHfNahyIZm13zobJ0 kyElrfE591p0OKFphmE7D1lhoXrLWzabQuswyr17HhAz06ZqeXkqkDaqCYZydaF4qCm2 fG4SlqX6jGH9Avfx4qhy/h0x+aYQaSNsiCrKOZ+pdo9sa/Vir0sjRmWnNNxumDCXHqxp D64/mQiCri2mPnicgJ2oteYAcSnHls+NRiy8qlM08AgeVtC941LpbSsSknb/EG7/m/hh ClnO+UZeAF5V2Ye240ovs3vbnuix5rnSjikaeAPDQkUyLIQkHLgHYz3nP0opPWoZr4aH +1sQ== X-Gm-Message-State: AGi0PuZ2iTMjGX/twhwvAfMSr+lD3dLF86g44cL3R2UYMhVr51lzujtn oUwwW+vZ2EOoFXQpFslV4w== X-Google-Smtp-Source: APiQypIPS0+XDNzclSv4AnGvJhw/FAlVfJCrCq8sLXv1l6bDtJmCpkeDjmWLFW1j0V9Ur0kffusBUQ== X-Received: by 2002:a9d:19ca:: with SMTP id k68mr6856344otk.232.1587316099983; Sun, 19 Apr 2020 10:08:19 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:19 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 05/17] clk: versatile: Kill CONFIG_COMMON_CLK_VERSATILE Date: Sun, 19 Apr 2020 12:07:58 -0500 Message-Id: <20200419170810.5738-6-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org CONFIG_COMMON_CLK_VERSATILE doesn't really do anything other than hiding Arm Ltd reference platform clock drivers. It is both selected by the platforms that need it and has a 'depends on' for those platforms. It selects REGMAP_MMIO, but really CONFIG_ICST should do that. Also, CONFIG_ICST can't be enabled for COMPILE_TEST unless something else selected it. Cc: Catalin Marinas Cc: Will Deacon Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- arch/arm/mach-integrator/Kconfig | 1 - arch/arm/mach-realview/Kconfig | 1 - arch/arm/mach-versatile/Kconfig | 1 - arch/arm/mach-vexpress/Kconfig | 1 - arch/arm64/Kconfig.platforms | 1 - drivers/clk/Makefile | 2 +- drivers/clk/versatile/Kconfig | 13 ++----------- 7 files changed, 3 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index 982eabc36163..d59ba15a6b69 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig @@ -3,7 +3,6 @@ menuconfig ARCH_INTEGRATOR bool "ARM Ltd. Integrator family" depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6 select ARM_AMBA - select COMMON_CLK_VERSATILE select HAVE_TCM select ICST select MFD_SYSCON diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index e7633c0aaae7..83ec9eeb3e5f 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig @@ -6,7 +6,6 @@ menuconfig ARCH_REALVIEW select ARM_GIC select ARM_TIMER_SP804 select CLK_SP810 - select COMMON_CLK_VERSATILE select GPIO_PL061 if GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index f5c275434d6c..d88e7725bf99 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -6,7 +6,6 @@ config ARCH_VERSATILE select ARM_TIMER_SP804 select ARM_VIC select CLKSRC_VERSATILE - select COMMON_CLK_VERSATILE select CPU_ARM926T select ICST select MFD_SYSCON diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 18951cd20d9d..2d1fdec4c230 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -7,7 +7,6 @@ menuconfig ARCH_VEXPRESS select ARM_GIC select ARM_GLOBAL_TIMER select ARM_TIMER_SP804 - select COMMON_CLK_VERSATILE select GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 5c38dc56b808..25cbb556d863 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -274,7 +274,6 @@ config ARCH_UNIPHIER config ARCH_VEXPRESS bool "ARMv8 software model (Versatile Express)" - select COMMON_CLK_VERSATILE select GPIOLIB select PM select PM_GENERIC_DOMAINS diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index f4169cc2fd31..fb30c16e1596 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -114,7 +114,7 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/ obj-y += ti/ obj-$(CONFIG_CLK_UNIPHIER) += uniphier/ obj-$(CONFIG_ARCH_U8500) += ux500/ -obj-$(CONFIG_COMMON_CLK_VERSATILE) += versatile/ +obj-y += versatile/ ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_X86) += x86/ endif diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig index c2618f1477a2..3465fb291998 100644 --- a/drivers/clk/versatile/Kconfig +++ b/drivers/clk/versatile/Kconfig @@ -1,22 +1,14 @@ # SPDX-License-Identifier: GPL-2.0-only config ICST - bool - -config COMMON_CLK_VERSATILE - bool "Clock driver for ARM Reference designs" - depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \ - ARCH_VERSATILE || ARCH_VEXPRESS || ARM64 || \ - COMPILE_TEST + bool "Clock driver for ARM Reference designs ICST" if COMPILE_TEST select REGMAP_MMIO ---help--- Supports clocking on ARM Reference designs: - Integrator/AP and Integrator/CP - RealView PB1176, EB, PB11MP and PBX - - Versatile Express config CLK_SP810 bool "Clock driver for ARM SP810 System Controller" - depends on COMMON_CLK_VERSATILE default y if ARCH_VEXPRESS ---help--- Supports clock muxing (REFCLK/TIMCLK to TIMERCLKEN0-3) capabilities @@ -24,8 +16,7 @@ config CLK_SP810 config CLK_VEXPRESS_OSC bool "Clock driver for Versatile Express OSC clock generators" - depends on COMMON_CLK_VERSATILE - depends on VEXPRESS_CONFIG + depends on VEXPRESS_CONFIG || COMPILE_TEST default y if ARCH_VEXPRESS ---help--- Simple regmap-based driver driving clock generators on Versatile From patchwork Sun Apr 19 17:08:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212270 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 A074EC54FC9 for ; Sun, 19 Apr 2020 17:08:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FA6521473 for ; Sun, 19 Apr 2020 17:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316104; bh=mhzbVJqxAxt8YmJGmMp5WgR1glzCSk1rI5KLPvv+nEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=p744s263Y7kw+Itm2Ccpf1kxzDVVzH+tYpG7BwylDpIHhiaMSNCURGNQ3IhycEAml drduTAHyAHxZwkrrt67X7RANOCH3yqbYqWlfJsfnqoY+dAOf8aH7MPtkPMXgrI0ZZi 2dnh7ax37DSESIMkOlCIxhWPq2yWWXOx67q7qpYA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbgDSRIY (ORCPT ); Sun, 19 Apr 2020 13:08:24 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:41521 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgDSRIX (ORCPT ); Sun, 19 Apr 2020 13:08:23 -0400 Received: by mail-ot1-f67.google.com with SMTP id c3so5953476otp.8; Sun, 19 Apr 2020 10:08:22 -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:mime-version:content-transfer-encoding; bh=qR3APrxTNCGqJRTKnyGqCjhSnTFRpHkLD/ZqBvxeFJA=; b=HufbYbquHdoFv8LncRJ9dohMGRDUePppp2/s0w9TQhq/7U18i0w0cz6k5WsSmr8acb Kj41vMzsGcHH0ci3T4PcPwAfZV4g4C4na9qzDyBqQkdoZATD9LUHLN+rRRPCFSWzZ6i8 N78/6BJ2cgTHyYrGcmDXV1T7mumxIZhD2rLn5Qu8XshNLGGM2nAMtYVGBMibVESVbWOJ ow5OcqYn/7jhUf//i0F4B30aGv+tzzpLWmIpjXt6dbQ9IP1UYhFM0O33VmnuuHUCYL7a 2zL1IBGCjQyYQ44J+3d6pmIbJgWwp+o2SRq1vypAPLCvbXDGV+NBz4MWpwUzA/P1oXQS Vnfg== X-Gm-Message-State: AGi0PuYwQYO1B3+KCpbefSTUOyoA99VjIQ/nIirpWQPJY5q8qy5E5C3s Znl6chlKPhWedXx2ElfZcA== X-Google-Smtp-Source: APiQypJRBqdugWx8PeDgR8OJglN2KN7qjTUoljyMmF8u89tlJuk3/msimvMwYF6xrm67UkXj9aqsmw== X-Received: by 2002:a9d:805:: with SMTP id 5mr6859221oty.111.1587316102393; Sun, 19 Apr 2020 10:08:22 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:21 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 07/17] clk: vexpress-osc: Use the devres clock API variants Date: Sun, 19 Apr 2020 12:08:00 -0500 Message-Id: <20200419170810.5738-8-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org In preparation to enable the vexpress-osc clock driver as a module, convert the driver to use the managed devres clock API variants. With this, a driver .remove() hook is not needed. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Signed-off-by: Rob Herring --- drivers/clk/versatile/clk-vexpress-osc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c index 7ade146a3ea9..5bb1d5a714d0 100644 --- a/drivers/clk/versatile/clk-vexpress-osc.c +++ b/drivers/clk/versatile/clk-vexpress-osc.c @@ -65,8 +65,8 @@ static int vexpress_osc_probe(struct platform_device *pdev) { struct clk_init_data init; struct vexpress_osc *osc; - struct clk *clk; u32 range[2]; + int ret; osc = devm_kzalloc(&pdev->dev, sizeof(*osc), GFP_KERNEL); if (!osc) @@ -92,11 +92,11 @@ static int vexpress_osc_probe(struct platform_device *pdev) osc->hw.init = &init; - clk = clk_register(NULL, &osc->hw); - if (IS_ERR(clk)) - return PTR_ERR(clk); + ret = devm_clk_hw_register(&pdev->dev, &osc->hw); + if (ret < 0) + return ret; - of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, clk); + devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get, &osc->hw); clk_hw_set_rate_range(&osc->hw, osc->rate_min, osc->rate_max); dev_dbg(&pdev->dev, "Registered clock '%s'\n", init.name); From patchwork Sun Apr 19 17:08:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212269 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 65B24C5321D for ; Sun, 19 Apr 2020 17:08:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C80F21473 for ; Sun, 19 Apr 2020 17:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316107; bh=2eKZYMGpV/7p77KCmWiP04HNK2UQ8WOtShOvV49pc1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=CXEDm5RXCTo8f/5Dk/Q1J6zw1jfcypiBe+YPx0HZkZoPsXF3GshHOGIFlqI1bBjhx I5ynCMeyUm64cfrkk87aAa8OBz5tzzzsvfRvuGjdJlGna2+uaOTp1oOuvtybDdsR5S 9KzQeHoVdXeUzU4UvHlLfBZqXFkkGGSmiuriQrZQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726666AbgDSRI0 (ORCPT ); Sun, 19 Apr 2020 13:08:26 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:39113 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgDSRI0 (ORCPT ); Sun, 19 Apr 2020 13:08:26 -0400 Received: by mail-ot1-f65.google.com with SMTP id m13so5960703otf.6; Sun, 19 Apr 2020 10:08:25 -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:mime-version:content-transfer-encoding; bh=lL7kUnqrt4NzPOQyXcvp2n9d+Q96MUmdmOUa848dWDw=; b=TbRSyoNAc/KpttP9vH5M3igKmsGsicMlwqjahmPrey+zkfBqC1BWOKMJjBgO4H/95j q5jPJZki5iee7ZDZI5EPMsgKqYdLf+l3Vn+xS2NwYsF+7GqVRTcQBLNmKOZlzCFQJBKG jSQHeoy/MKowjAVLed35kaeM2IdbcFzZsFULFfCXjgj0XwhLSFQcr7tPivfZbTGK5W/N dZEXw1UfG27xuNgssy/93QQBL5QATnexrWRNN/M+K/NupWlnPPvk/95h/cI51T15UAXV pibNom3bmK+Irt7bugE8iy4ivoaAKlhtfWgJvpV+E24MxQZ8/HQbi6EAyJ3Nu1so07qr R+CA== X-Gm-Message-State: AGi0PuZ/fPVzTtpDn/ZHfibqRTYL6yF0AQGQha3AIl++QjFLOK1C2ATM k/2yHhLcMCeoqGcMkSpiXg== X-Google-Smtp-Source: APiQypKx5UHUpB9QQwwicGLNrpuxItDEsWq2VRAkb1J7481iH3Fbl73Y40DGbCP6jlP+0VPeKXgkNg== X-Received: by 2002:a9d:2dc1:: with SMTP id g59mr6383687otb.90.1587316105171; Sun, 19 Apr 2020 10:08:25 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:24 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 09/17] mfd: vexpress-sysreg: Drop selecting CONFIG_CLKSRC_MMIO Date: Sun, 19 Apr 2020 12:08:02 -0500 Message-Id: <20200419170810.5738-10-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Nothing in the VExpress sysregs nor the MFD child drivers use CONFIG_CLKSRC_MMIO. There's the 24MHz counter, but that's handled by drivers/clocksource/timer-versatile.c which doesn't use CONFIG_CLKSRC_MMIO either. So let's just drop CONFIG_CLKSRC_MMIO. As the !ARCH_USES_GETTIMEOFFSET dependency was added for CONFIG_CLKSRC_MMIO, that can be dropped, too. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Lee Jones Signed-off-by: Rob Herring --- drivers/mfd/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 0a59249198d3..b1311dea2da1 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -2029,9 +2029,8 @@ endmenu config MFD_VEXPRESS_SYSREG bool "Versatile Express System Registers" - depends on VEXPRESS_CONFIG && GPIOLIB && !ARCH_USES_GETTIMEOFFSET + depends on VEXPRESS_CONFIG && GPIOLIB default y - select CLKSRC_MMIO select GPIO_GENERIC_PLATFORM select MFD_CORE select MFD_SYSCON From patchwork Sun Apr 19 17:08:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212268 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 37D5CC54FCB for ; Sun, 19 Apr 2020 17:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18A4121473 for ; Sun, 19 Apr 2020 17:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316110; bh=C5VGZ3DiWWPmJZySKJGbExqFh+rjsoFWpTaoqyg6fdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OrBCQLieNBSoDcfeTX3MaFiPIq3Fm7jBMgiVwV1xUSvFnstmxY2H3SvP9gi0cNTxF cfof904iOsDjBqpzt230tpl2qjVw1x8QAknFsNEysVzFI1SFUw1Czv67U7aVF7T5dJ dpe94gtNiI/UM3dgkHB89IRnaM+bbxznG8Gh1BXg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726673AbgDSRI3 (ORCPT ); Sun, 19 Apr 2020 13:08:29 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:36705 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgDSRI2 (ORCPT ); Sun, 19 Apr 2020 13:08:28 -0400 Received: by mail-ot1-f66.google.com with SMTP id b13so5968636oti.3; Sun, 19 Apr 2020 10:08:28 -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:mime-version:content-transfer-encoding; bh=HpigmDdLGgTxwi4cNTPUYj5dEoa36081Zy4k4zJz1VY=; b=tzgMgP0PqnQmZXmPe+hp7yD0Y18xWNPesvnQMHSb83PgEpPyAmPaz30em887uAsUVt AtICtiYkFe6AZPhyYlNYB2G2tGvrRDtd6nNx9Lr/dlFQ9ir8POT6vZgN4u1zU0QOen9K TWITdWPNAD6CoE5uCE6N6zEOpcVLz2hcRNd6AO2nDsXEJ+9HliZltSqkMyctaV1k+i2l b1Dup0HAI/98nGsrFApW+y3MEjzT6WKSoKCXGvhBkHo1cpvBEFPsVHk63GrIfqedMMh0 DgPPdyCToeBGDIAYI3lGfB+zG+wD7PsQx7ZArR7ufcl3paUfOzEA7hFC/wIMgqomAnoE NWxQ== X-Gm-Message-State: AGi0PuZjnemgMwtJiOZFWcc8R3LmN3gqVPGOaBo8pgEUYrlg9ITlypIc kCviW+sC6LYBHqgQmhxWxw== X-Google-Smtp-Source: APiQypJgZQt1Jy5vrd9fOU0cBVwNlY4pfSaPWLayv3NzXhAUoYJ3R81Cc7lBObtyZw4FxEChoAE4fA== X-Received: by 2002:a05:6830:1495:: with SMTP id s21mr6391348otq.38.1587316108297; Sun, 19 Apr 2020 10:08:28 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:27 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 11/17] mfd: vexpress-sysreg: Use devres API variants Date: Sun, 19 Apr 2020 12:08:04 -0500 Message-Id: <20200419170810.5738-12-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use the managed devm_gpiochip_add_data() and devm_mfd_add_devices() instead of their unmanaged counterparts. With this, no .remove() hook is needed for driver unbind. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Lee Jones Signed-off-by: Rob Herring --- drivers/mfd/vexpress-sysreg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index 90a4eda2ba2b..9fb37fa689e0 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -140,9 +140,9 @@ static int vexpress_sysreg_probe(struct platform_device *pdev) bgpio_init(mmc_gpio_chip, &pdev->dev, 0x4, base + SYS_MCI, NULL, NULL, NULL, NULL, 0); mmc_gpio_chip->ngpio = 2; - gpiochip_add_data(mmc_gpio_chip, NULL); + devm_gpiochip_add_data(&pdev->dev, mmc_gpio_chip, NULL); - return mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, + return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, vexpress_sysreg_cells, ARRAY_SIZE(vexpress_sysreg_cells), mem, 0, NULL); } From patchwork Sun Apr 19 17:08:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212267 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 DC403C38A30 for ; Sun, 19 Apr 2020 17:08:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCE962224F for ; Sun, 19 Apr 2020 17:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316114; bh=wmna9sOc8KcOyfckxnz1vArOa4qSCLT9jyMrPClQiqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=wKxKdl3ajlMDjNyaqyg/R+QSboBMeH32n9oAp9zH/Z/UM+mCpGXBlNyfEfLlfPVyg aNhHzDNNrfc5BZToTLqffOs516XXjbt4y+GdJfz5c0ea/InOQgmM0bhF4f5PYSx4EW 6+xGlIVPG7a5AioWaYpW/hhqugbnV1ceAmzFt8os= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbgDSRIe (ORCPT ); Sun, 19 Apr 2020 13:08:34 -0400 Received: from mail-oo1-f65.google.com ([209.85.161.65]:33896 "EHLO mail-oo1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726674AbgDSRId (ORCPT ); Sun, 19 Apr 2020 13:08:33 -0400 Received: by mail-oo1-f65.google.com with SMTP id q204so1591980ooq.1; Sun, 19 Apr 2020 10:08:32 -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:mime-version:content-transfer-encoding; bh=/wB2U6U0ewgKGp4KSPn+vSVDTtuFAzErpi8wcYMw6Fo=; b=J330on2EgzdkMLi2/N5HetUHoxJl7mS4qTXMNe1ccQP23uw+Wb0Kvs5B+2yJEWBD/I +WzrP3wOxAgQGAHJoc+7c7PfLJrsIKzTpA39fIHxSjbS/PEyas/w3MEVcLIs4bYupMEq rJ5UQ2M/05hQYFnqmxKwKN+ukoOz0Mwk3oaDYwdNbH2mpUKBFQL88em7XZN5UH+NWU0D 6xS3W7tET1RYGjUVsZfkAa8ILZYqZPK1vRA6e2q9OEZCts6rU5SLep0E8BXson/vFsR/ fQImbJPH+nC0ygqaEd2jCgbKrGnvro6qK5RI/39JtHMXQlvINs83Ulw6P0uS56u4Rp0s rryg== X-Gm-Message-State: AGi0PubosoL4wv9E78d+6DBNnx7YE5Ag86kjZDNplz5kMAr5eFDJlK7U CN0giwNRJbVMpZAzWWb6Y3Zp+Lc= X-Google-Smtp-Source: APiQypImHT/KiAE2mwj4qy0evl0L7k4NWcklyJuzb3ysWeesGWHDLxv/Jj7+ufFs8HRp8SjUd7oBZw== X-Received: by 2002:a4a:7011:: with SMTP id r17mr9863390ooc.17.1587316112203; Sun, 19 Apr 2020 10:08:32 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:31 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 14/17] bus: vexpress-config: simplify config bus probing Date: Sun, 19 Apr 2020 12:08:07 -0500 Message-Id: <20200419170810.5738-15-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The vexpress-config initialization is dependent on the vexpress-syscfg driver probing. As vexpress-config was not a driver, deferred probe could not be used and instead initcall ordering was relied upon. This is fragile and doesn't work for modules. Let's move the config bus init into the vexpress-syscfg probe. This eliminates the initcall ordering requirement and the need to create a struct device and the "vexpress-config" class. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Rob Herring --- drivers/bus/vexpress-config.c | 118 ++++++---------------------------- 1 file changed, 21 insertions(+), 97 deletions(-) diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c index 43f5beac9811..43deb4df140b 100644 --- a/drivers/bus/vexpress-config.c +++ b/drivers/bus/vexpress-config.c @@ -56,7 +56,6 @@ struct vexpress_config_bridge { static DEFINE_MUTEX(vexpress_config_mutex); -static struct class *vexpress_config_class; static u32 vexpress_config_site_master = VEXPRESS_SITE_MASTER; @@ -121,9 +120,6 @@ struct regmap *devm_regmap_init_vexpress_config(struct device *dev) struct regmap *regmap; struct regmap **res; - if (WARN_ON(dev->parent->class != vexpress_config_class)) - return ERR_PTR(-ENODEV); - bridge = dev_get_drvdata(dev->parent); if (WARN_ON(!bridge)) return ERR_PTR(-EINVAL); @@ -146,94 +142,6 @@ struct regmap *devm_regmap_init_vexpress_config(struct device *dev) } EXPORT_SYMBOL_GPL(devm_regmap_init_vexpress_config); -static struct device *vexpress_config_bridge_register(struct device *parent, - struct vexpress_config_bridge_ops *ops, void *context) -{ - struct device *dev; - struct vexpress_config_bridge *bridge; - - if (!vexpress_config_class) { - vexpress_config_class = class_create(THIS_MODULE, - "vexpress-config"); - if (IS_ERR(vexpress_config_class)) - return (void *)vexpress_config_class; - } - - dev = device_create(vexpress_config_class, parent, 0, - NULL, "%s.bridge", dev_name(parent)); - - if (IS_ERR(dev)) - return dev; - - bridge = devm_kmalloc(dev, sizeof(*bridge), GFP_KERNEL); - if (!bridge) { - put_device(dev); - device_unregister(dev); - return ERR_PTR(-ENOMEM); - } - bridge->ops = ops; - bridge->context = context; - - dev_set_drvdata(dev, bridge); - - dev_dbg(parent, "Registered bridge '%s', parent node %p\n", - dev_name(dev), parent->of_node); - - return dev; -} - - -static int vexpress_config_node_match(struct device *dev, const void *data) -{ - const struct device_node *node = data; - - dev_dbg(dev, "Parent node %p, looking for %p\n", - dev->parent->of_node, node); - - return dev->parent->of_node == node; -} - -static int vexpress_config_populate(struct device_node *node) -{ - struct device_node *bridge; - struct device *parent; - int ret; - - bridge = of_parse_phandle(node, "arm,vexpress,config-bridge", 0); - if (!bridge) - return -EINVAL; - - parent = class_find_device(vexpress_config_class, NULL, bridge, - vexpress_config_node_match); - of_node_put(bridge); - if (WARN_ON(!parent)) - return -ENODEV; - - ret = of_platform_populate(node, NULL, NULL, parent); - - put_device(parent); - - return ret; -} - -static int __init vexpress_config_init(void) -{ - int err = 0; - struct device_node *node; - - /* Need the config devices early, before the "normal" devices... */ - for_each_compatible_node(node, NULL, "arm,vexpress,config-bus") { - err = vexpress_config_populate(node); - if (err) { - of_node_put(node); - break; - } - } - - return err; -} -postcore_initcall(vexpress_config_init); - static int vexpress_syscfg_exec(struct vexpress_syscfg_func *func, int index, bool write, u32 *data) { @@ -430,7 +338,8 @@ static int vexpress_syscfg_probe(struct platform_device *pdev) { struct vexpress_syscfg *syscfg; struct resource *res; - struct device *bridge; + struct vexpress_config_bridge *bridge; + struct device_node *node; syscfg = devm_kzalloc(&pdev->dev, sizeof(*syscfg), GFP_KERNEL); if (!syscfg) @@ -443,11 +352,26 @@ static int vexpress_syscfg_probe(struct platform_device *pdev) if (IS_ERR(syscfg->base)) return PTR_ERR(syscfg->base); - /* Must use dev.parent (MFD), as that's where DT phandle points at... */ - bridge = vexpress_config_bridge_register(pdev->dev.parent, - &vexpress_syscfg_bridge_ops, syscfg); + bridge = devm_kmalloc(&pdev->dev, sizeof(*bridge), GFP_KERNEL); + if (!bridge) + return -ENOMEM; + + bridge->ops = &vexpress_syscfg_bridge_ops; + bridge->context = syscfg; + + dev_set_drvdata(&pdev->dev, bridge); - return PTR_ERR_OR_ZERO(bridge); + for_each_compatible_node(node, NULL, "arm,vexpress,config-bus") { + struct device_node *bridge_np; + + bridge_np = of_parse_phandle(node, "arm,vexpress,config-bridge", 0); + if (bridge_np != pdev->dev.parent->of_node) + continue; + + of_platform_populate(node, NULL, NULL, &pdev->dev); + } + + return 0; } static const struct platform_device_id vexpress_syscfg_id_table[] = { From patchwork Sun Apr 19 17:08:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212266 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 494BEC5321D for ; Sun, 19 Apr 2020 17:08:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25C6B206E9 for ; Sun, 19 Apr 2020 17:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316116; bh=dXPVqpF+ngnYd7JsTUUGCJe+uGcob32MS9jRZ/YVLHg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FBvRKd53tQHZcuqGpoZ0V/1eMyWRdT/vOS3/WQsv/OTSS+1bv0PUUysbD5v1t0LyG 0nAs3GLyslkj09JTNmgEE5HJmxjSluTARUMn7qy+191LkxrnCy8obWv/BePIlov9uB sXTVAR9iTO4ChGNZOnTd+ZRfF7RZ7VcC/AmBaBXY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726696AbgDSRIf (ORCPT ); Sun, 19 Apr 2020 13:08:35 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:44290 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbgDSRIe (ORCPT ); Sun, 19 Apr 2020 13:08:34 -0400 Received: by mail-ot1-f65.google.com with SMTP id j4so5946500otr.11; Sun, 19 Apr 2020 10:08:33 -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:mime-version:content-transfer-encoding; bh=+cM/b65rtjeKyTmogfwhiHXUftLjv62lN3bT8OJ3Ce0=; b=uX8CsuVPJBBthEvkvDdhg3SzF6zs2npXc/5ZPayCq99gwPdWCUqefPM/OpZWNjmeTX 54z3aOGDJhFn1sfyo9PdY3Jv2Ak8MtO6UAhYaQ0hSerds9o4EpSxxKtHD7VPxLxFGGVY b0tV5M/8s5eMO6mX6kAYVT54+CpbYdDAQv2LeaKCV7f7j/Y5b/x9JOMW2nfccFPkeiak 8KPCNGKDfvyeowYxTjhzxWyuwL1Xhb0aJqnIj8/s6U6+QyFrRJt1qXHqSlfwpCQ1pSua 9u4VW0pYu+rvPpyZpP6t+G+NaZd9YWbyzLAH9J3tQ2k9YCJ99zthiD4xJHiS0Bm3CCaE 6iuQ== X-Gm-Message-State: AGi0PuZNuyRweXGdDK/BLUz2ESc9n7o0yVRUZo82wP4T64A3mi+Mja9W eOVM1RPQvGDYL9qXWyi8ZA== X-Google-Smtp-Source: APiQypJ/DjvcatWrwEm/6IPNwh+ISFDJPdeQJhuYT6YbJyt335a7TOpxUQKLngc/mptPSkp4wzuW+A== X-Received: by 2002:a9d:7e92:: with SMTP id m18mr6258749otp.269.1587316113317; Sun, 19 Apr 2020 10:08:33 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:32 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 15/17] vexpress: Move site master init to vexpress-config bus Date: Sun, 19 Apr 2020 12:08:08 -0500 Message-Id: <20200419170810.5738-16-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org There's only a single caller of vexpress_config_set_master() from vexpress-sysreg.c. Let's just make the registers needed available to vexpress-config and move all the code there. The registers needed aren't used anywhere else either. With this, we can get rid of the private API between these 2 drivers. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Lee Jones Cc: Greg Kroah-Hartman Signed-off-by: Rob Herring --- drivers/bus/vexpress-config.c | 37 +++++++++++++++++++++++++++++++---- drivers/mfd/vexpress-sysreg.c | 25 +---------------------- include/linux/vexpress.h | 9 --------- 3 files changed, 34 insertions(+), 37 deletions(-) diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c index 43deb4df140b..caa35a4cb34d 100644 --- a/drivers/bus/vexpress-config.c +++ b/drivers/bus/vexpress-config.c @@ -14,9 +14,17 @@ #include #include -#define SYS_CFGDATA 0x0 +#define SYS_MISC 0x0 +#define SYS_MISC_MASTERSITE (1 << 14) -#define SYS_CFGCTRL 0x4 +#define SYS_PROCID0 0x24 +#define SYS_PROCID1 0x28 +#define SYS_HBI_MASK 0xfff +#define SYS_PROCIDx_HBI_SHIFT 0 + +#define SYS_CFGDATA 0x40 + +#define SYS_CFGCTRL 0x44 #define SYS_CFGCTRL_START (1 << 31) #define SYS_CFGCTRL_WRITE (1 << 30) #define SYS_CFGCTRL_DCC(n) (((n) & 0xf) << 26) @@ -25,10 +33,14 @@ #define SYS_CFGCTRL_POSITION(n) (((n) & 0xf) << 12) #define SYS_CFGCTRL_DEVICE(n) (((n) & 0xfff) << 0) -#define SYS_CFGSTAT 0x8 +#define SYS_CFGSTAT 0x48 #define SYS_CFGSTAT_ERR (1 << 1) #define SYS_CFGSTAT_COMPLETE (1 << 0) +#define VEXPRESS_SITE_MB 0 +#define VEXPRESS_SITE_DB1 1 +#define VEXPRESS_SITE_DB2 2 +#define VEXPRESS_SITE_MASTER 0xf struct vexpress_syscfg { struct device *dev; @@ -59,7 +71,7 @@ static DEFINE_MUTEX(vexpress_config_mutex); static u32 vexpress_config_site_master = VEXPRESS_SITE_MASTER; -void vexpress_config_set_master(u32 site) +static void vexpress_config_set_master(u32 site) { vexpress_config_site_master = site; } @@ -340,6 +352,8 @@ static int vexpress_syscfg_probe(struct platform_device *pdev) struct resource *res; struct vexpress_config_bridge *bridge; struct device_node *node; + int master; + u32 dt_hbi; syscfg = devm_kzalloc(&pdev->dev, sizeof(*syscfg), GFP_KERNEL); if (!syscfg) @@ -361,6 +375,21 @@ static int vexpress_syscfg_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, bridge); + master = readl(syscfg->base + SYS_MISC) & SYS_MISC_MASTERSITE ? + VEXPRESS_SITE_DB2 : VEXPRESS_SITE_DB1; + vexpress_config_set_master(master); + + /* Confirm board type against DT property, if available */ + if (of_property_read_u32(of_root, "arm,hbi", &dt_hbi) == 0) { + u32 id = readl(syscfg->base + (master == VEXPRESS_SITE_DB1 ? + SYS_PROCID0 : SYS_PROCID1)); + u32 hbi = (id >> SYS_PROCIDx_HBI_SHIFT) & SYS_HBI_MASK; + + if (WARN_ON(dt_hbi != hbi)) + dev_warn(&pdev->dev, "DT HBI (%x) is not matching hardware (%x)!\n", + dt_hbi, hbi); + } + for_each_compatible_node(node, NULL, "arm,vexpress,config-bus") { struct device_node *bridge_np; diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index eeeeb1d26d5d..aaf24af287dd 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -14,7 +14,6 @@ #include #include #include -#include #define SYS_ID 0x000 #define SYS_SW 0x004 @@ -37,11 +36,6 @@ #define SYS_CFGCTRL 0x0a4 #define SYS_CFGSTAT 0x0a8 -#define SYS_HBI_MASK 0xfff -#define SYS_PROCIDx_HBI_SHIFT 0 - -#define SYS_MISC_MASTERSITE (1 << 14) - /* The sysreg block is just a random collection of various functions... */ static struct bgpio_pdata vexpress_sysreg_sys_led_pdata = { @@ -94,7 +88,7 @@ static struct mfd_cell vexpress_sysreg_cells[] = { .name = "vexpress-syscfg", .num_resources = 1, .resources = (struct resource []) { - DEFINE_RES_MEM(SYS_CFGDATA, 0xc), + DEFINE_RES_MEM(SYS_MISC, 0x4c), }, } }; @@ -104,8 +98,6 @@ static int vexpress_sysreg_probe(struct platform_device *pdev) struct resource *mem; void __iomem *base; struct gpio_chip *mmc_gpio_chip; - int master; - u32 dt_hbi; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) @@ -115,21 +107,6 @@ static int vexpress_sysreg_probe(struct platform_device *pdev) if (!base) return -ENOMEM; - master = readl(base + SYS_MISC) & SYS_MISC_MASTERSITE ? - VEXPRESS_SITE_DB2 : VEXPRESS_SITE_DB1; - vexpress_config_set_master(master); - - /* Confirm board type against DT property, if available */ - if (of_property_read_u32(of_root, "arm,hbi", &dt_hbi) == 0) { - u32 id = readl(base + (master == VEXPRESS_SITE_DB1 ? - SYS_PROCID0 : SYS_PROCID1)); - u32 hbi = (id >> SYS_PROCIDx_HBI_SHIFT) & SYS_HBI_MASK; - - if (WARN_ON(dt_hbi != hbi)) - dev_warn(&pdev->dev, "DT HBI (%x) is not matching hardware (%x)!\n", - dt_hbi, hbi); - } - /* * Duplicated SYS_MCI pseudo-GPIO controller for compatibility with * older trees using sysreg node for MMC control lines. diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index 65096c792d57..2f9dd072f11f 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h @@ -10,15 +10,6 @@ #include #include -#define VEXPRESS_SITE_MB 0 -#define VEXPRESS_SITE_DB1 1 -#define VEXPRESS_SITE_DB2 2 -#define VEXPRESS_SITE_MASTER 0xf - -/* Config infrastructure */ - -void vexpress_config_set_master(u32 site); - /* Config regmap API */ struct regmap *devm_regmap_init_vexpress_config(struct device *dev); From patchwork Sun Apr 19 17:08:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 212265 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 20FD6C54FD2 for ; Sun, 19 Apr 2020 17:08:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8F0622240 for ; Sun, 19 Apr 2020 17:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587316118; bh=YWozikrx1BzPa6MCZo4amvbL5VTaAmBxngKt29TVU64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SGTqhYDVmqdbHe8KZ+50xDRS2Vjo9kejPlKUNmkq0q5R7y+ZP5OVm9eyukSjSiFRJ UsptJVHSmFnAFypvVX0SnN9p4v8t/fhbTv/v4s3GsYfhOKinU7oLLesWga3d3dlDnB GID5F9LiSa5PqwA1vSVDvTy8D2M/lIHGzndnZghY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgDSRIh (ORCPT ); Sun, 19 Apr 2020 13:08:37 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46770 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbgDSRIh (ORCPT ); Sun, 19 Apr 2020 13:08:37 -0400 Received: by mail-ot1-f65.google.com with SMTP id z25so2506431otq.13; Sun, 19 Apr 2020 10:08:36 -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:mime-version:content-transfer-encoding; bh=217EOOrFw1JguCx9/rRQyxEPzTa4GJD9mwcwW7ZPvKs=; b=isWEJd9aoVkWfU3+ZVtn9UHhggn9bxnanaijaQbv1U2D9xBzE83qVhaJsmjVvQjh39 8rdTHlNvJVJ2HkB9Dnj739j+3pUdttY8nOE6x3xKPGYoIhPRy/UJ3lROtegeh0W6a9Gy 0XSi2G7xxyvNWsYOyH6ZvaK1bE2EA+UIBfhtTY5paNfZ6IRKf6WJtL2vQiZfvgKRMvrZ /HmeezGGpr2dO6V8HqrHxp1thGNavCxRHUY/b3siKUjPRkykpEVkYltkSahcM/E2UJ6l RYflJyDm+H4JyNcYyvZG8nFlK8zPvHV0/0YFjxs13d/k5sjaHW0LAjd8IJk05ZrU+fti /fwA== X-Gm-Message-State: AGi0PuYt7ouC+N+wgz5qAAmkS/evjMPma1WKOCNKZf0SQFtyUl+Qsa2b Vdmo/hcNcjvuvP15i0uDwZIVjGA= X-Google-Smtp-Source: APiQypLTklldq06zQ7DWUiIK2HKqDOCjCs+VI4+8LpUA7eim5gCSTJk6qg/zaDS+25wQx2aPTMUM0g== X-Received: by 2002:a05:6830:3104:: with SMTP id b4mr3045929ots.250.1587316115620; Sun, 19 Apr 2020 10:08:35 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u205sm9661938oia.37.2020.04.19.10.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:35 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 17/17] ARM: vexpress: Don't select VEXPRESS_CONFIG Date: Sun, 19 Apr 2020 12:08:10 -0500 Message-Id: <20200419170810.5738-18-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200419170810.5738-1-robh@kernel.org> References: <20200419170810.5738-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org CONFIG_VEXPRESS_CONFIG has 'default y if ARCH_VEXPRESS', so selecting is unnecessary. Selecting it also prevents setting CONFIG_VEXPRESS_CONFIG to a module. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Signed-off-by: Rob Herring --- arch/arm/mach-vexpress/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 065e12991663..8391a5b3cd78 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -19,7 +19,6 @@ menuconfig ARCH_VEXPRESS select POWER_SUPPLY select REGULATOR if MMC_ARMMMCI select REGULATOR_FIXED_VOLTAGE if REGULATOR - select VEXPRESS_CONFIG help This option enables support for systems using Cortex processor based ARM core and logic (FPGA) tiles on the Versatile Express motherboard,