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 (Arm)" X-Patchwork-Id: 11497683 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 57C3F112C for ; Sun, 19 Apr 2020 17:08:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 35E36206E9 for ; Sun, 19 Apr 2020 17:08:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="igp9Rt5c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35E36206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=SWLNU56UYBP3x8ev3JYrAnOuBPxOHmsQ8+PtOB6CUy4=; b=igp9Rt5cshXU/S TzpeYsG4ic3Xqz0vlntHdh8o81i34tg3jDpAwhm1Omhn463vcPX7gIdag6C/gZq2Y3dRTjOoqp8R2 fTnF7btt2QUEUQydvytzncgitEzzqz0/UG4xauMAR5OHy60dXTu1K+Z5mEX0DpH7ZDg5j5YtbOktt rBh//ozdx90vGslESoicZHEppImIbLVt8V84IxyCISrvbmuNvOScXpQe55bovKqZS8Gx8mCZQbzrs JzTVIr929CZof/Yo5JRamYP4wr4lE9Lf+N9w/SpuQaD301me9J+i9oMCOpiihlvc+kolJ7tJRMvgV zishH5ldRPMq6UIAeYeQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQn-0001ug-Hg; Sun, 19 Apr 2020 17:08:33 +0000 Received: from mail-oi1-f194.google.com ([209.85.167.194]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQV-0001gI-8E for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:16 +0000 Received: by mail-oi1-f194.google.com with SMTP id d7so6749598oif.9 for ; 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=Edpv1/dlrXYlmfP9jvNYvdIutniR0zI52WzRCbh64gmy4OOHkN6Q11oaLxyIvLwTXg TQAulPzbzTG6QH7yLxfQ/buxDSEUj6DumrcuguO1LtEFMzWCEqvBrwb28EwVW3IbtolU JbtJmVad5rWkMYC4AmhjOQX//xFsZDtzwqlur8Cwa9kAIAi3169IJQdDUUrPAcWtXpwJ M8rNi6C6ZqwzFImy5385lI4nHAQ1nemK87ev9pW/TV9IK9dMKbBpBS/2QsTeJp+Oxihy iGiQWR+utpZMcg6pKRdX5a4IyKkWWv1q11zHxqs3+TpgJZwtqXYowyjFZDfsG5nQWvWe 1cnw== X-Gm-Message-State: AGi0PubzwGzbcdMCClDgSjLhhvihL4YEun7Fiy88qvBQquKf7rYMKxAj BlhZojY5cAaV9+fM0ZJUdw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100815_288783_1B3BAD06 X-CRM114-Status: GOOD ( 16.54 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.194 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.194 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Acked-by: Arnd Bergmann Acked-by: Liviu Dudau Reviewed-by: Sudeep Holla --- 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:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497685 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 38785112C for ; Sun, 19 Apr 2020 17:09:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DB0AA206E9 for ; Sun, 19 Apr 2020 17:09:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YG/ikaGm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB0AA206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=BhMyEAJTjhvzBAHnAzDsy4VEMurRujHAtyzKo9xaJr4=; b=YG/ikaGmkNwGMa oGEeqRXzsKP1CU9yZStoLlbDOp4WU04YWRJmUA8Tb3Kv5i8LQ0Xz+f9tO3Nj5/3HJZxTtcGiUNPAw 3HtpqyFaOtUV5rtEkp/TfI4nO+MgIsb0oDfbphpjWM+b5cHTu5rCTBiek109zP/mXjndXJHSrngbh 1ZAyTtlIWoejD9hsjIYbyevRuzAw6gNObrTAy2YVh5cWDJksp1/TZ1rUL8psn5HkBvXzf9KNh6yxt Mmxpt8q+u/TKs0ARMIRRwoTdfYJu9994stVD0QJxM7dX43kjE6i6nDiWBSsDM/LjyJdbTGPPBFzO4 ciiTOoDA3JwXrIF1aqrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDRG-0002Ga-6U; Sun, 19 Apr 2020 17:09:02 +0000 Received: from mail-oi1-f194.google.com ([209.85.167.194]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQW-0001gx-He for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:17 +0000 Received: by mail-oi1-f194.google.com with SMTP id a2so2125539oia.11 for ; Sun, 19 Apr 2020 10:08:16 -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=HR2vyc2PYWWn8G5dom55PqoQEPYuAFLiyICb8T+CViI=; b=gq+Zd/eShv9htH2o7Qkegxgp4Xd1oqJj55VIvNLEK578pkqPaDFy/i6dyPjtlR7wWb PSmXq/rE3lDoYs6zR0YacCKASh73HhgGK6KNJwBF8Mnmo+WDvIj3neYVy54ntEFPLkbv stGuFdszJrpCNpJTukX9fEuDxkW9nmfnoABmRFAirK35pj+m8K+zBwppdDZIVI3ufAg1 nODo1mxBqYqOZjqjJZZIZryyAMGNn4zjOg5CVaDp+Nbzk2DxG9iNod5G6WaovqJpRGc4 QvixzkUq1RLQ6W7xnksjRPUDldU+/RV8CF2L7h6mr1OlikG69aPi2nMvBpvT2UNs+Z7K 2aug== X-Gm-Message-State: AGi0PuZpyaJmYIZIsVWaWPSDEq7Ce47jw7iafjEkLa7DCBevrXQgWi0M LWIIZF8l9GCk8oopXj0yNA== X-Google-Smtp-Source: APiQypIN7x474BTSx5XNa9RZW9WcGvmIkvA4In5cY3QG7AbDCZt9ElM/lzxg5ccexbNWUlxXVVHWkg== X-Received: by 2002:aca:450a:: with SMTP id s10mr7885862oia.25.1587316095961; Sun, 19 Apr 2020 10:08:15 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:15 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 02/17] arm64: vexpress: Don't select CONFIG_POWER_RESET_VEXPRESS Date: Sun, 19 Apr 2020 12:07:55 -0500 Message-Id: <20200419170810.5738-3-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100816_578102_20F71EDA X-CRM114-Status: GOOD ( 10.86 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.194 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.194 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The VExpress power-off/reset driver is not needed on 64-bit platforms as PSCI power-off and reset can be used instead. Stop selecting it so it can be disabled and not always built-in. Cc: Catalin Marinas Cc: Will Deacon Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Signed-off-by: Rob Herring Acked-by: Arnd Bergmann Acked-by: Liviu Dudau --- arch/arm64/Kconfig.platforms | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 55d70cfe0f9e..9c084f995e0f 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 POWER_RESET_VEXPRESS select VEXPRESS_CONFIG help This enables support for the ARMv8 software model (Versatile 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 (Arm)" X-Patchwork-Id: 11497687 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 1FB6F6CA for ; Sun, 19 Apr 2020 17:09:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E817A206E9 for ; Sun, 19 Apr 2020 17:09:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="moIQT6I/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E817A206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=U0I9nUPytrGMHu1zN/9LFUyg9QllO2c3WZOEcd5MSiA=; b=moIQT6I/+LaPTG kntPCXzTvlPQMbwnY35blgrxbnhD57XT2G+tPg96t3Ci3AAIBUa2njscNxdndHWM/jhYYehcN3JUG Kr+1Dva5B1ceM3meOOoM6CRm5S7LEU7tPGTAZnUgLXsyY06wWRnhrl5ZtyMRzBpgRZ/nz0PCmXomB KG/cryF5S93kKYtXFRMgSi5IAdTAjRxyAh2UvQlKQfuYhCP4ku5ZioQ5DjGl3LxtZlTVJys+FNXIp +dIk0BKj07Pd+Kv15RMTW/4cs4ntAV1g0QNQ66Z/4QRSYMi72CJAVE3XgOx2yEq/vT0wYolSq8Cmy QYShVW6yzUJb7PqlRDJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDRe-0002av-04; Sun, 19 Apr 2020 17:09:26 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQY-0001hU-FY for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:19 +0000 Received: by mail-ot1-f66.google.com with SMTP id m18so5958194otq.9 for ; Sun, 19 Apr 2020 10:08:18 -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=TNhz2Qs91aTBfYyFwaprUapHoLV0+rQhqmiKKQXvetKn7As5+eCCcoFQHreRtZCsme ZVfwtLLhFjApVze8DLFO8sxpaOc+yFI1gvHheZioeFqYAk9jAOI/ZPkYE0FqzVFbuLWm xGiT58NF7PfibE/7QszWU/hIRx2PCiTT05169H4AIaMX9KxHBwp2Gz2IA3VXQcwqcg11 Y9zTFDx34SkwMQgD9WUtxxM9HBfYb021HK284yzsjpGwl86zKnxW4mLYm0tkWCzGnD3h YIyYN+76q37M/vlUMPAZWraw+y1Z4P7B2pgENZjooVgUah6OFy0Y225V9sIW/kwf/IN0 cQBA== X-Gm-Message-State: AGi0Puar8IYpl4ZKcoFHRwlqWFXGVKhkDIKLC8/OyRRLZx4DR+JQ2MiM 3rk6cTrRNW3V4oJE/KkuhSMGfGA= 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100818_520034_D15D5323 X-CRM114-Status: GOOD ( 10.28 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.66 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 -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.66 listed in wl.mailspike.net] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Reviewed-by: Sudeep Holla --- 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:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497689 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 729E96CA for ; Sun, 19 Apr 2020 17:09:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 23296206E9 for ; Sun, 19 Apr 2020 17:09:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jxVwpAcP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23296206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=UM+JBp0UGEPm+F4G/YF8mfaLJ9Kv0qHvBIjZqUzBwL8=; b=jxVwpAcPGW6ffV AG5OVG78MY5qTqe5hleByS0xKgXk0PYJdjB2q09EsnWYyllm2GHupoIYP12iI+1mv6PZz+7tbhGmv kw6PkkidjagbSK2WkHzjj5yrKI864ge4yQjEc4LJJhGPF3xBXJwgtw+2m6hwcL/3tZaQ+7gROtl3d QxSi36ci6Ymd11QEJDl1glPCmzFsNqp0CI6DukpjcHu6bk5BUyyG7eZ+OwaYigqItkGgMZL1sl7gf DpK+9l/r/LElCamM+Eqdlpso2NZRV5zgljSbsjMNSyr+KuLABzimoQNqDTubRaGgiHgpUzSOKUMZE eCtjs+VAr2QwajDDEtEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDRs-0002mc-OY; Sun, 19 Apr 2020 17:09:40 +0000 Received: from mail-oi1-f196.google.com ([209.85.167.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQZ-0001io-O7 for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:21 +0000 Received: by mail-oi1-f196.google.com with SMTP id r25so6772184oij.4 for ; Sun, 19 Apr 2020 10:08:19 -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=rkm1yVQrueouMlMynX/IUSbPHuMCnuzEP4ZMzc2uSk4=; b=GrMKezMh7dB9qqzFyOQWmYNYOcGamgawBnjbv0RgL6RrsEvRVBQdK2CqVWWbwXuQ2M kHvJHBkYz+qr86+kmUEGd9nwmqrlDfnsCmmooIZgzFiRnsgMokNkQIFQuY/6rXZDVfLI 4yLddef/TqA4DfXe1Gjru1uCy/72wr45YrhZkrGq1undjm6JK7vNud2gWEDf6dNSdLRh 9Ce8CsH6gFkV0yLvKYDD8h887+AJGCT0Ph5G1xTNoEr1EDDwBV2VwFUkHwwe7VnSNPqE 3INw0L5YM9+DI1h27C4M4oxG+aqwKHdEnoyOe4FNArUqeqKnCRVL45/R7KSL2KUwlSis 77dA== X-Gm-Message-State: AGi0PuZ8o9QDweChcKCbDuRoTtZRVI6U+xf8Oz0ALVTyVPUUyu63pS7p dsAA4oNFoTFZKpex944cnw== X-Google-Smtp-Source: APiQypLVQEjKhtfaW8eTl7YjGxsB7Qz3p8JXmiFRCoXKab90R013s1nz5LZs7Fjm2ta59f95TNmGeQ== X-Received: by 2002:aca:f254:: with SMTP id q81mr8228410oih.12.1587316098741; Sun, 19 Apr 2020 10:08:18 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:18 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 04/17] power/reset: vexpress: Support building as a module Date: Sun, 19 Apr 2020 12:07:57 -0500 Message-Id: <20200419170810.5738-5-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100819_801889_2A2D97DE X-CRM114-Status: GOOD ( 12.37 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.196 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 -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.196 listed in wl.mailspike.net] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Enable building the VExpress power-off/reset driver as a module. Cc: Catalin Marinas Cc: Will Deacon Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Sebastian Reichel Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Sudeep Holla --- drivers/power/reset/Kconfig | 2 +- drivers/power/reset/vexpress-poweroff.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index 890380302080..0ba18221ba40 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -182,7 +182,7 @@ config POWER_RESET_VERSATILE reference boards. config POWER_RESET_VEXPRESS - bool "ARM Versatile Express power-off and reset driver" + tristate "ARM Versatile Express power-off and reset driver" depends on ARM || ARM64 depends on VEXPRESS_CONFIG help diff --git a/drivers/power/reset/vexpress-poweroff.c b/drivers/power/reset/vexpress-poweroff.c index 90cbaa8341e3..8a6d3add894c 100644 --- a/drivers/power/reset/vexpress-poweroff.c +++ b/drivers/power/reset/vexpress-poweroff.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -87,6 +88,7 @@ static const struct of_device_id vexpress_reset_of_match[] = { }, {} }; +MODULE_DEVICE_TABLE(of, vexpress_reset_of_match); static int _vexpress_register_restart_handler(struct device *dev) { @@ -145,9 +147,5 @@ static struct platform_driver vexpress_reset_driver = { .of_match_table = vexpress_reset_of_match, }, }; - -static int __init vexpress_reset_init(void) -{ - return platform_driver_register(&vexpress_reset_driver); -} -device_initcall(vexpress_reset_init); +module_platform_driver(vexpress_reset_driver); +MODULE_LICENSE("GPL v2"); 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 (Arm)" X-Patchwork-Id: 11497693 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 25B5C6CA for ; Sun, 19 Apr 2020 17:10:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C891021927 for ; Sun, 19 Apr 2020 17:10:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VAkv2pV9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C891021927 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=79gFw0QOhrEcVNtibzhOB0K0ORodB1KN4jNkmfpJi4M=; b=VAkv2pV9grCXN+ gKNeC9K6HZv6UGyiCmORLOlM2Mbkj5+Rjjo/GKe1ASI0lUCRxCJSoW2V1K6T6bCHVrPFXFRXXMWy0 UXUPzq6SNI4E9mfi3mnoEOPD/tNMPreU2E29CBypwcbbSiRkIHMGIQdRofxnbJwmNr30T0Zs3yymK Y3WClCSxUmUmQL+z7iPIEAz3YTlQ/krJ+pADf5sPT1LISkuTL+7EzA88eEawt2xoWyyUjfZfNecXn Sqa/hSnmI/x4xHezzY9qgfqsrSUI7GSEScoFYwodK3mf297i8gJvJIpALRkgPI9Av8f2owS1YyT0v aTVkQBmbkcGgWtn17kdA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDSX-0005gu-8B; Sun, 19 Apr 2020 17:10:21 +0000 Received: from mail-ot1-f65.google.com ([209.85.210.65]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQc-0001jw-5Q for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:24 +0000 Received: by mail-ot1-f65.google.com with SMTP id i27so5960526ota.7 for ; 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=PD37Lm+n/Y9RFkO1PtZftuMuYXndd/U3O8gJ2gWQgqvrl0rfFjxa8qa86Bvev78DI9 h/TgGRsHhnqEeniH2Ja9o5r41A/IJaMcEJvRc+W6bqJtXs1/lK2A40n/5c47X8tTtjP4 FesXNexF+29QR5mlI5ra5Oa3UuaxrOke5Q3bZ02a2TqzatlrsruAAX+rkCLQ3M1PGyT8 QyHpgG0fvuVjNkSkBftq8ftQ+Dvn/PGB6WsJewjQMV+N4LWZl5M0HfvAj/XWFhvkOoat X2Z/JV+wYe8jf1tuSI0ZhQlgHFQKJFlbCiaMZ/NjnMBGrCWA4kXmK1mDzotr36NE4ozy 83mQ== X-Gm-Message-State: AGi0PuZQtlYQsYg63rXrUilT634fYJJkjMUjTkJ72VOo9nU8FpuORoV5 TVwVus6l9A5Yued2qUtNVA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100822_249376_F80F9981 X-CRM114-Status: GOOD ( 12.26 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.65 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Reviewed-by: Sudeep Holla --- 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:07:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497691 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 BE886112C for ; Sun, 19 Apr 2020 17:10:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2C912206E9 for ; Sun, 19 Apr 2020 17:10:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="flNmX6Br" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C912206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=WrRmdQHv4COpNjzIbk++aEEsiALdN5AjNQ625HHIeKU=; b=flNmX6BrCaroi7 TX3IIXU917WPHtvD8oZZ55CwArajKlvsgVBkk+i8DsSzlsO8aXUjYOJaMivDq1wDE5Ylz32hsqJOB sESu6kmIgTf5IuE1OmxK7EfwFk5aTCLgwmd9chcPzYZS9sldQe9JdIrC85ONAiwJ6GxviLmsefBM1 lvigpB842OVcV8MyMqoVY4PGJHj2RSwQOFcjWPN4CGOM36qDl3cZ2S38aYyvZlFesVaAsxGTpyrfi bcddyLMQaXImW6Oe9HmjCApd+9CWCpYZ4pMLC5jAAaIFoaBe0NtihfYG1gla1jDxdds9LwpFcv7eJ MUQ6pKvaXm2K/5/Ltf+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDS8-00030p-DS; Sun, 19 Apr 2020 17:09:56 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQc-0001l2-2C for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:23 +0000 Received: by mail-ot1-f66.google.com with SMTP id e20so5987278otl.2 for ; Sun, 19 Apr 2020 10:08:21 -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=Qrg4Kn0uV5CkM2HSImaTMyKeQJqbbeo+iRjf1bdrad0=; b=T+PCGcnCa6BBqtEfOOad4oxTCiECksKCeyni7W9329NJ6MX2j1CxFluVCSlx8xP2Yd xTA1hYnfgl6EFF6DTxNY1TBfIJto2pKengwdIIW+VjeEGnX7QU9U1M9UzCHRUSE8iVrr N6ukV4e4zyNX9NO0QUcqy27XcmdPRNAdoq9B2erKHawmqMAqh4C2FiPp9V/cx3Xu6g3Z 9EZ+kLmuCBRsXG6N5Winiy+2VtSzZqJ3K+m+6tV/MBejoB5tpfjIIulkpVSVV/LFCUxg VjCB0MAMsLuD5ujyxY4GeiQyZdEG1pfWdozNRpnSmBViIWB66IOV6vN6ckTGiDBlunxi 3Miw== X-Gm-Message-State: AGi0PubMqgyL4PzMpoSxRXFXEW3rkRU1mnHdb8m4OzljGZ7O/NLK6gnO b/cQUWeNzF9d68n/2EdfbA== X-Google-Smtp-Source: APiQypLaYTQQiTq4lbmbzauI24B6HAlyxCl7rv3Xs7I3W7EGTvoW/11+mJIDtPy2Q91CLPeIch7vLA== X-Received: by 2002:a9d:6303:: with SMTP id q3mr6861606otk.296.1587316101203; Sun, 19 Apr 2020 10:08:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:20 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 06/17] clk: versatile: Only enable SP810 on 32-bit by default Date: Sun, 19 Apr 2020 12:07:59 -0500 Message-Id: <20200419170810.5738-7-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100822_116090_2E975C7B X-CRM114-Status: GOOD ( 11.84 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.66 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.66 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org While 64-bit Arm reference platforms have SP810 for clocks for SP804 timers, they are not needed since the arch timers are used instead. Cc: Catalin Marinas Cc: Will Deacon 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 Acked-by: Arnd Bergmann Acked-by: Stephen Boyd Acked-by: Liviu Dudau --- drivers/clk/versatile/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig index 3465fb291998..5bdd5c98990b 100644 --- a/drivers/clk/versatile/Kconfig +++ b/drivers/clk/versatile/Kconfig @@ -9,7 +9,7 @@ config ICST config CLK_SP810 bool "Clock driver for ARM SP810 System Controller" - default y if ARCH_VEXPRESS + default y if (ARCH_VEXPRESS && ARM) ---help--- Supports clock muxing (REFCLK/TIMCLK to TIMERCLKEN0-3) capabilities of the ARM SP810 System Controller cell. 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 (Arm)" X-Patchwork-Id: 11497695 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 5D01F6CA for ; Sun, 19 Apr 2020 17:10:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3A767206E9 for ; Sun, 19 Apr 2020 17:10:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y4cABX/y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A767206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=1vAKTZMVafu6M4HpuYvZ0/igqGajWW8G50EGZvW59cs=; b=Y4cABX/yCGfx7i fLwRPJ19lycLSqBnIieFDNdIACw0sM4eR3aoaGLE/rtDOUijEdfJ4IiqGjJ1MgPmFOx6AuizUkzNT mL/sKqazN/hujHoeO7+sN4+pdvaO39iSxSx5uA28Ve/U1qrdzLaNJRTPfLCRLvtt7plfgPpx5vl5E n0CCZb1KYdi7bXCZYREj9aGZh5dM6aASOgQxZcgjcM6YRUoM3tYz4pEvoR7xOCggOQvqCuZiH5tE0 xpXJDifJHmrcne3GEQXQa3eNiPYE5NaHXnxScZ9SmkxcvCx0XOIniaDXqraLBDhgKD+1O709/NdNj J8Ty9RC9WBKnX4l02GBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDSn-0005vA-IX; Sun, 19 Apr 2020 17:10:37 +0000 Received: from mail-ot1-f68.google.com ([209.85.210.68]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQe-0001mD-Jj for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:26 +0000 Received: by mail-ot1-f68.google.com with SMTP id i22so5945634otp.12 for ; Sun, 19 Apr 2020 10:08:23 -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=EVccPyI8+fTFrYnVqGcnld+JN8+/mvlXmrmYLKGff1C0iSY5oJTt8V28iz7dBzAIoX +tx57BynsquOZVJrBOBBzHKQ7/wp440eb80PSaFe+goEZWQdIk6WdrCBdsPdQm2Wdjj7 LhzZhUaRfSRqTUlNFJOyjZx4ET0HZPMtbnYK4ENCXz1Dg068XB+ak7KzOr0jZ8w4KGfT E+JVK7+QhCCWRTO4bB4r1Nw1iB1LCdJ4VJwYH7F6WIRgyvO8OlQfLTktQTj1hA+tZd2F 3z32xq0AwF/N50MJl5z1As+nGQJkWgvpCHwKvWeuKfJWF0tzTZf9JI1QTcip97GFzf0L 3Crg== X-Gm-Message-State: AGi0PuZ7Kv4dW+rwi8HLz/M8mZF3wrtKJ7dESUqkHYYlj3FoEoF4DonO IatRoLmuW04Fy/a/ueY2baSDYlQ= 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100824_651500_F0BC8F1E X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.68 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.68 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Acked-by: Arnd Bergmann Reviewed-by: Stephen Boyd Acked-by: Liviu Dudau Reviewed-by: Sudeep Holla --- 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:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497711 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 0F2D217EA for ; Sun, 19 Apr 2020 17:11:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A26A2206E9 for ; Sun, 19 Apr 2020 17:11:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jD8k58A0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A26A2206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=Tqw8rSkgz3ba76nbNuoHCMG5B9ltZTVLKJlBiPLFOgs=; b=jD8k58A01BRef5 DeOug2yKrSCYwMmNNRdorxJGYEx/W7GcWLH6siA90Fq5B3JvypKqPxjGQ3UxpfFFjzEpS8vLi6f0Y dE3H6FR8nXPApVG0VwdtQiTODsqXVKVCHMBP+rNsV7zYnB52r8SuGi8pStm/iTVlFk7NpSDIBxcki DEumrM+5rrCEPyfgnYJZzvNryooO41718J5xNfuGfi2c6I77CP229Ukugiy8tn9nFJlhmO3QlBeQt uLmtNEPSEn7OQINw3g3vZZr2aPR5c6cbqbaYAo8McFySypuurTNTtaR9f3am62HGYIuGbKTbLmjB2 lVLacYNpQ1Kc4P2cOavQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDTB-0006FC-Lf; Sun, 19 Apr 2020 17:11:01 +0000 Received: from mail-ot1-f68.google.com ([209.85.210.68]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQe-0001nN-KU for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:26 +0000 Received: by mail-ot1-f68.google.com with SMTP id h11so518888ots.1 for ; Sun, 19 Apr 2020 10:08:24 -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=HqpSGKoXLi3sKkfdberr101LzIYIKH6zzFoEGRY23rQ=; b=CZ8A8mbvg1Pg+JW3sHfG161uAqK5rJRP3JO4yEwv91NiYrfBesT/y1V3TC7NgQAS9y vcrk3JxVIqqSkTL6iNfVy5yeyryZzG4P76sNUwpPJtIsRHn4uv/Fcw+bqWTRoiTpHMSA XNOgPoMaSoms28THDfAt0UV2yRxE2k63gFu9LWA/BkldYskXI3CHle3+Kk9PCiCxsLdu xGQbUa2nXNGrBpChfniTf1HnHgGsizBIHIhl3t7zT82n8fRpPGMtYlAJFvO+LGO5T0M+ UIG8baJbUyLn9GelkFae7hxrn/1vME46Rfh0Nt7b9Ex5Azp2E/g068fR1jAtdck4vACq W5MQ== X-Gm-Message-State: AGi0Pub1TPOOxYUmES5SLWuCD9sU8SMLsyV93UyVjQXY1DFLfLvqUFsm hlWzUWmM8GpYEfGVSEJDst4JYdU= X-Google-Smtp-Source: APiQypIFr2mQFKNOYpHIWrxwJ0w/H0567uuPX+ub6eDgSKHRgh3fJS5CSFDmpVpY8TCgeusy5wORrQ== X-Received: by 2002:a9d:4e11:: with SMTP id p17mr797808otf.35.1587316103723; Sun, 19 Apr 2020 10:08:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:23 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 08/17] clk: vexpress-osc: Support building as a module Date: Sun, 19 Apr 2020 12:08:01 -0500 Message-Id: <20200419170810.5738-9-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100824_685569_7E6B490A X-CRM114-Status: GOOD ( 12.64 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.68 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.68 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Michael Turquette , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Enable building the vexpress-osc clock driver as a module. Cc: Linus Walleij Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Signed-off-by: Rob Herring --- drivers/clk/versatile/Kconfig | 4 ++-- drivers/clk/versatile/clk-vexpress-osc.c | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig index 5bdd5c98990b..9de2396dcf9b 100644 --- a/drivers/clk/versatile/Kconfig +++ b/drivers/clk/versatile/Kconfig @@ -15,8 +15,8 @@ config CLK_SP810 of the ARM SP810 System Controller cell. config CLK_VEXPRESS_OSC - bool "Clock driver for Versatile Express OSC clock generators" - depends on VEXPRESS_CONFIG || COMPILE_TEST + tristate "Clock driver for Versatile Express OSC clock generators" + depends on VEXPRESS_CONFIG default y if ARCH_VEXPRESS ---help--- Simple regmap-based driver driving clock generators on Versatile diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c index 5bb1d5a714d0..b2b32fa2d7c3 100644 --- a/drivers/clk/versatile/clk-vexpress-osc.c +++ b/drivers/clk/versatile/clk-vexpress-osc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -108,6 +109,7 @@ static const struct of_device_id vexpress_osc_of_match[] = { { .compatible = "arm,vexpress-osc", }, {} }; +MODULE_DEVICE_TABLE(of, vexpress_osc_of_match); static struct platform_driver vexpress_osc_driver = { .driver = { @@ -116,9 +118,5 @@ static struct platform_driver vexpress_osc_driver = { }, .probe = vexpress_osc_probe, }; - -static int __init vexpress_osc_init(void) -{ - return platform_driver_register(&vexpress_osc_driver); -} -core_initcall(vexpress_osc_init); +module_platform_driver(vexpress_osc_driver); +MODULE_LICENSE("GPL v2"); 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 (Arm)" X-Patchwork-Id: 11497717 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 A87F56CA for ; Sun, 19 Apr 2020 17:11:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 481CB21473 for ; Sun, 19 Apr 2020 17:11:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LSCiCOWe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 481CB21473 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=HAfEC6MAXWZP2Ib5Zv3ThucrCqF3hWUWEonQ4vylsCc=; b=LSCiCOWe4CvR0w ViznihwqVJZ0+NtUKrjEdlx5bkl/kIiQh8dDRm+QGhofzkCQRRObm2RGpqnxR2E17BW5oJjD0sCOn zaQNHPjcEZRBHVXpOm2K8+zviM6/HsfWoWjlhXSgtO2ExmzjNXQGTq2rIaFFDIzLGqbi8bC5cUdHg S3BNn/B1GfWXEVbD52jPpcIA5fNmrWB/EwAiJuDn5dhJHN/WC3vKUIpkE/eZaED3vbh4YqyNcp4Rw +4wRuw3jwpZgoUQcXS/7Uuwicnu0aEmEXhPeM82tpZ0vPcebDdSnOZEgrz5J63MlVU+SmAXFuu9/z jap42Vox5aSiDb6JakyA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDTR-0006Sx-3P; Sun, 19 Apr 2020 17:11:17 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQf-0001on-Se for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:27 +0000 Received: by mail-ot1-f66.google.com with SMTP id j26so5980891ots.0 for ; 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=Yp39RGEtMc2p59APjBbZjYmc9DFWc5TTLm7GYkwaw8MJe7blhavIwYQsVmcO5wDyyJ 4s8wgfbaJfqM5zQzWsW/JS4oDaBfeuWiB5BewPkSqT8d5a+RTbHbCn8bjMrTUcbasG5L WuV1meQzqfiZaD6GUudC47d63Dl81gM9yQxDSGi6oOYmBw4MU1yef8Sxs7+2BCsQk0A3 bYQilvo9JfWOQe46EyEG3KXL9cwPw7JgIiFojMouOVdg1pB1XnQz7RHk7igTcz8FSTf3 q0uZLg6fC/xoy88gEHNe+K3GAmJrVOT2JxlKUG8dOBobSdJ8J0uqimlapikHJn9RnKM8 TWZw== X-Gm-Message-State: AGi0PuZf2Ch5P34heVA5g6unAbovLbUvskiFotOqD/mkfoY8+gfsdru7 fBvmWofOck6U93sXP9h02w== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100825_944213_9C099C6A X-CRM114-Status: GOOD ( 12.09 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.66 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.66 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Acked-by: Arnd Bergmann Acked-by: Liviu Dudau --- 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:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497719 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 377A5112C for ; Sun, 19 Apr 2020 17:11:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 150D2206E9 for ; Sun, 19 Apr 2020 17:11:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ary9tP9U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 150D2206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=z1lhiugBl8kLDWT4eZsz84LhNkBLxWSFWyhY20MFbi4=; b=ary9tP9U1Jr2ex QL9O+HEORPaGhLoB0y1sRnZ0lfZdSL/8JaVTNsoAJAq3D2cGQ3KExso8FV5SSzZGY11ivaTr4q7i4 902H71WfV/lliM7XKDvkuSKUAzPEwaP3TKKg4jlWFTuOdslCuWSypu93UhXcwfvyXUVHki1eoSDyG EG2iNe7LRKRPd3LD9CuDuj29hAYEGfqZTLdeeoDZuhiAPDLP0ZaH6y1kxARsLQQsXndc0FtMxo1wT qh1YhtaQuwO1wxMTy1Xgw4uGHTSISSnu6pz5G2StqEZx/9EYAZpiM80TAMS+PnQFtRNfZ4cVB1GFh 3gK8DMU37h9r0kANp1mg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDTl-0006jC-CR; Sun, 19 Apr 2020 17:11:37 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQh-0001qP-B1 for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:28 +0000 Received: by mail-ot1-f66.google.com with SMTP id j26so5980940ots.0 for ; Sun, 19 Apr 2020 10:08:27 -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=GUrQRwWEdT3OPVCv5XBDcWtCr3A5NYwLye3iL8Rp6X4=; b=SDBeTEJFDUtlAD0vj0hGzPBm6wxvlJRsSgIttB4w7QCiKiCt9VRdg3gvimtJH6+FUy PtqJYl2aGECXmM4yQorxzddICIwfN1I2w4X6G0Wlgu/J2515/5R5QMYxnwFQG/dWur1P gsNRkBDXseSgRZgKYZnbWZwTfTZEmGqywcVhTO3UwuCL6fo5V6maGwLSntiUg/P8za2U 1ML3nmo0W5GousjyZA3QzMNWvOIRRtlzibruluHCRg5TQRMhFZRnxHk6GYJGk/qxPeIV 5+DGx1XE2RnBaRUHbWMAHLR6Aj9X1yRb2rlH44/to5Gfayz+0pUQwihxwI49s/BL2aXY ktIQ== X-Gm-Message-State: AGi0PuZTrApmoRELh69CQxq2QysLlIfMXsO/mgYZZmq3yQUDxoW3Ftjp 87tOL5WT9qAtmVTyK5fSAg== X-Google-Smtp-Source: APiQypJGWLbEPjS2dTyxElGSO1SQkhT/chgz+TKrJJLrrB7yeocLCbZGPucP0I6nicooOJm2R+O0CQ== X-Received: by 2002:a9d:6ad0:: with SMTP id m16mr6268800otq.122.1587316106702; Sun, 19 Apr 2020 10:08:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:26 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 10/17] mfd: vexpress-sysreg: Drop unused syscon child devices Date: Sun, 19 Apr 2020 12:08:03 -0500 Message-Id: <20200419170810.5738-11-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100827_394871_55C288A4 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.66 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.66 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Lee Jones Signed-off-by: Rob Herring Acked-by: Liviu Dudau --- drivers/mfd/vexpress-sysreg.c | 36 ----------------------------------- 1 file changed, 36 deletions(-) diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index 0b9cc67706c7..90a4eda2ba2b 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -43,10 +43,6 @@ /* The sysreg block is just a random collection of various functions... */ -static struct syscon_platform_data vexpress_sysreg_sys_id_pdata = { - .label = "sys_id", -}; - static struct bgpio_pdata vexpress_sysreg_sys_led_pdata = { .label = "sys_led", .base = -1, @@ -65,24 +61,8 @@ static struct bgpio_pdata vexpress_sysreg_sys_flash_pdata = { .ngpio = 1, }; -static struct syscon_platform_data vexpress_sysreg_sys_misc_pdata = { - .label = "sys_misc", -}; - -static struct syscon_platform_data vexpress_sysreg_sys_procid_pdata = { - .label = "sys_procid", -}; - static struct mfd_cell vexpress_sysreg_cells[] = { { - .name = "syscon", - .num_resources = 1, - .resources = (struct resource []) { - DEFINE_RES_MEM(SYS_ID, 0x4), - }, - .platform_data = &vexpress_sysreg_sys_id_pdata, - .pdata_size = sizeof(vexpress_sysreg_sys_id_pdata), - }, { .name = "basic-mmio-gpio", .of_compatible = "arm,vexpress-sysreg,sys_led", .num_resources = 1, @@ -109,22 +89,6 @@ static struct mfd_cell vexpress_sysreg_cells[] = { }, .platform_data = &vexpress_sysreg_sys_flash_pdata, .pdata_size = sizeof(vexpress_sysreg_sys_flash_pdata), - }, { - .name = "syscon", - .num_resources = 1, - .resources = (struct resource []) { - DEFINE_RES_MEM(SYS_MISC, 0x4), - }, - .platform_data = &vexpress_sysreg_sys_misc_pdata, - .pdata_size = sizeof(vexpress_sysreg_sys_misc_pdata), - }, { - .name = "syscon", - .num_resources = 1, - .resources = (struct resource []) { - DEFINE_RES_MEM(SYS_PROCID0, 0x8), - }, - .platform_data = &vexpress_sysreg_sys_procid_pdata, - .pdata_size = sizeof(vexpress_sysreg_sys_procid_pdata), }, { .name = "vexpress-syscfg", .num_resources = 1, 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 (Arm)" X-Patchwork-Id: 11497721 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 8525C112C for ; Sun, 19 Apr 2020 17:11:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 52543206E9 for ; Sun, 19 Apr 2020 17:11:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nIfBzXbn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52543206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=yVMHKHH9SYTmsK7o3C+wllqvdEHnuHanvRNsJNAudQ8=; b=nIfBzXbn3gdiAN ZhS7sfVg1XsyhjmXjvOPcYprDfOsL+IPQEtNrMnFlIawD99e21b9xgKCIo5n9p7dNTSu9frCqieRc WrIx6JMgxTOMq91YHvJGzCB9bZdGhclCsh90p3Gx+sctP1HniwcOujePh3U3q6Hn3wIVCs+yoX4vh ORv8U3lYn+ltTVxCJZUSdB0Iqkz/WUdauKb62t7359rMI1Ed46zmnfRIQi44XhOpC0ok48pNk4Y2h SlupZj0I9G64RQ6oMu+rgx0YNuchWCyxF01h20ap3vcWrKtispnuHPamwpUPWKWyC1O0x8vQUijOk BtdRdMX6HOfPs7EghZuQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDTz-0006wM-4z; Sun, 19 Apr 2020 17:11:51 +0000 Received: from mail-ot1-f65.google.com ([209.85.210.65]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQj-0001rk-FZ for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:31 +0000 Received: by mail-ot1-f65.google.com with SMTP id i22so5945840otp.12 for ; Sun, 19 Apr 2020 10:08:29 -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=rt4sbBQdwfVkKHRvBjsnIrEnvcAkHVBIPrPXYh3bUHErIoIrtI10gDYo0YIc3y/PoD yEAU59f8atFiF3kRXh/B7lNyxKyyCTk0xZp3otgmJmz67mf+xqp2JzliGyV6pkFwWERU TJXqxEPWfqe9tnkDLTnvojSVF+gPktTrGOl6eCkQvkqLi8Zei6F3mSoUmbpzyT+K+qNE w8ANCui5xXw32WR8eNRahiHD+Zy8cqwEUBfv+D1gzcMMIab69bMWcvRUwqY9lrcMHI30 IAFtsUgg206OxuStxz07CN4i1Z202SzLbvIb2IMPvjvBcqsclrqDMbCr3EmZnNFe5dkd ZS4A== X-Gm-Message-State: AGi0PuafVRGuZmL+OCZArAi4QMxYkvLW6mEAIDuBYSNcGhBoYTcbbL1v mf/h8F3v3yk3VkOenrd4TA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100829_662897_3BA96754 X-CRM114-Status: GOOD ( 10.83 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.65 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Acked-by: Arnd Bergmann Acked-by: Liviu Dudau --- 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:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497735 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 B68F1112C for ; Sun, 19 Apr 2020 17:12:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 76B6121473 for ; Sun, 19 Apr 2020 17:12:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cYXtcj4G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76B6121473 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=IlZ+Qq6GpcBE+IFuCJwOiuh/vj4DBH3LLqZN6sX0PQE=; b=cYXtcj4G6M3xw6 zopZFXSkwW0kIQK53xLi2DB2nDRIxHiz2XaZir5lnH+aN6GSXcOPPFoC6SfqpByQKx5PPpC7Q/TR5 85l+UXMLEiSbxXlWtnKVBVFIZIu8epmyeCeEb5z2daLkH50eaRrUfNzyBdjukfyRWjd68YTUGhKjl Mhebs8IIugeY3nWMwWSjS7scTELYw0dx1HWP/8U+7w1tZE2ZK3cy6LqBUYoRV9zgZFcYYqwURgHYM 1h7LYXE9Do3dkuv46pE7sseFV7X2ohad4ZsVLRbJb4tl0F/5ip3dqvbMxpzI4fY6sFVMOtChRWATc oQAXjelA13IvKzPkqmGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDUH-0007Bm-OT; Sun, 19 Apr 2020 17:12:09 +0000 Received: from mail-ot1-f67.google.com ([209.85.210.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQk-0001sp-NQ for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:32 +0000 Received: by mail-ot1-f67.google.com with SMTP id j26so5981012ots.0 for ; Sun, 19 Apr 2020 10:08:30 -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=3HyKpPbcRN4znVuAjhoeE+CSQVXiKwEz8DNz5m29rBI=; b=aykg1HWNzXq0Gi+2dy+qmu7Qcnve8gfdxAKbeJbpGMRprTS//9ow02qM31dWZ2eNgp j6nQZYcETPJQ8sSUFVoaR9FTgszBp+iQsAuLRHjKzPv1KvlTqR6TxZ9wuxIrhqnGBQ6i mpl1OgUQzCqE/L4jcqjwzfsscQ8d5awhYkDX+IHsblPcEq3roEJI4VNXFfV2rib4VrVq +dIJF76jBGO0MQAeHtb7Sam7lZob5Kw5fpjv/yv2Nm6ftXPqxsfSfAzTm13RGeXHyNwb GVOtMHBP+icUl1lYlJQM0iowAKxA79FWATvkBG984JUmDfWPuZxeFWC/wXhagslTdXr1 6zlQ== X-Gm-Message-State: AGi0PublNPAZ0UyktYcmc6y1+vAsJAe9BMkKtNsr25axzMurVNs+VgE/ OA4JDeGwHnhrqk/Cf61TgQ== X-Google-Smtp-Source: APiQypJ3TUDwE5W0Lbu6MaWW9hEAAI/eMa1e4x7PzilWJJUeR5E6pht0rkfYrYUnpXdKfjZXW9G54Q== X-Received: by 2002:a9d:6c55:: with SMTP id g21mr6432746otq.211.1587316109509; Sun, 19 Apr 2020 10:08:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:28 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 12/17] mfd: vexpress-sysreg: Support building as a module Date: Sun, 19 Apr 2020 12:08:05 -0500 Message-Id: <20200419170810.5738-13-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100830_801343_47ACA706 X-CRM114-Status: GOOD ( 12.19 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.67 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Enable building the vexpress-sysreg driver as a module. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Lee Jones Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- drivers/mfd/Kconfig | 2 +- drivers/mfd/vexpress-sysreg.c | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index b1311dea2da1..792766558328 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -2028,7 +2028,7 @@ config MCP_UCB1200_TS endmenu config MFD_VEXPRESS_SYSREG - bool "Versatile Express System Registers" + tristate "Versatile Express System Registers" depends on VEXPRESS_CONFIG && GPIOLIB default y select GPIO_GENERIC_PLATFORM diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index 9fb37fa689e0..eeeeb1d26d5d 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -151,6 +152,7 @@ static const struct of_device_id vexpress_sysreg_match[] = { { .compatible = "arm,vexpress-sysreg", }, {}, }; +MODULE_DEVICE_TABLE(of, vexpress_sysreg_match); static struct platform_driver vexpress_sysreg_driver = { .driver = { @@ -160,14 +162,5 @@ static struct platform_driver vexpress_sysreg_driver = { .probe = vexpress_sysreg_probe, }; -static int __init vexpress_sysreg_init(void) -{ - struct device_node *node; - - /* Need the sysreg early, before any other device... */ - for_each_matching_node(node, vexpress_sysreg_match) - of_platform_device_create(node, NULL, NULL); - - return platform_driver_register(&vexpress_sysreg_driver); -} -core_initcall(vexpress_sysreg_init); +module_platform_driver(vexpress_sysreg_driver); +MODULE_LICENSE("GPL v2"); From patchwork Sun Apr 19 17:08:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497749 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 E76776CA for ; Sun, 19 Apr 2020 17:12:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B9E2C22250 for ; Sun, 19 Apr 2020 17:12:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TkKgKLO4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9E2C22250 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=ND2ocsszvumg1EnnLgbk380Z6+bckP30kfvcxe0S2sc=; b=TkKgKLO4YwSpoi VGnmHJXr4MT4E6gsTPYGJyM7YjDZdjSfO1XN4pqIl8s2W0oPRfCDXIuPJWC1OEV7exiTeU4yCCowE fG/xpbLXmJCXEFqKeDEylnoa7bC6MX/3LUGCI3KR7npPN+HqxFF0UGbDeyLZlYMxj54Bh+5ao/bCr W15EikNkDJGl0elqIYscfaNYol3N2ADbmtb29I+ibbDsQtmweuppFykZChe5kX6BwCvCMmjzxsMNC sKI+Dwjng10sdbXUM4LNuvSBydNQ9JirmUIJ6BVdVIPDjuFSrJrK4zU8Qa2SNXZNEnv0DMCLUYaKq aPvQZWlNKThmGteMG9BQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDUU-0007PG-9f; Sun, 19 Apr 2020 17:12:22 +0000 Received: from mail-ot1-f68.google.com ([209.85.210.68]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQl-0001u0-Kv for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:34 +0000 Received: by mail-ot1-f68.google.com with SMTP id g14so5955050otg.10 for ; Sun, 19 Apr 2020 10:08:31 -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=GDsOf8xrlQkbUqgAcINGDxLpBH8V3FiknyRNzRYDKwo=; b=mMHzV7JU0rDgmfV/0U1Icg1xb7kQEH+JbLD0GQiQAQt0bg4kd9WrakkxaVhFFkhq6r zF+/+m9x34syrgOyLOD8gx57LHWuohpaoRQ2bPHTorLcoxcNPgNdwBEduwBUG7+wYcyY JtSj9f9inUS5jlPCR2mroRIr+/bny0mGyqGBpRUqV4EefJ2mJY6diUA5kglm8i7BJbRW 1H5pp9YX8LMBDgqeMEeoW2fUzwDnjaxo+TTbOXABhBQZB3v6DTWpMU5hzYAXIDGYvtD/ 9IKyrZeoHC50zcJ5rH3MuDTELykitLZf1DJImmyOrFLP7DnZgm7iLdgOTZ5y0QP6mCU+ wHoQ== X-Gm-Message-State: AGi0PuY97NBGJld+m/W8mjV3ljE2SJPGrbQ5urXEM8pIQLVPRajd6SyT cCvXxNWuCmOml9wLhQmMBw== X-Google-Smtp-Source: APiQypLFbtfp79/5QJZvCudLXXjTScxXROV1png55ZPeGSDdb0tkJrrhen3wX4MDPaz1N8eU87z+3A== X-Received: by 2002:a9d:6447:: with SMTP id m7mr6587316otl.256.1587316110736; Sun, 19 Apr 2020 10:08:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:30 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 13/17] bus: vexpress-config: Merge vexpress-syscfg into vexpress-config Date: Sun, 19 Apr 2020 12:08:06 -0500 Message-Id: <20200419170810.5738-14-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100831_725673_EC6FC836 X-CRM114-Status: GOOD ( 23.80 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.68 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.68 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The only thing that vexpress-syscfg does is provide a regmap to vexpress-config bus child devices. There's little reason to have 2 components for this. The current structure with initcall ordering requirements makes turning these components into modules more difficult. So let's start to simplify things and merge vexpress-syscfg into vexpress-config. There's no functional change in this commit and it's still separate components until subsequent commits. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Rob Herring Acked-by: Greg Kroah-Hartman Acked-by: Liviu Dudau --- arch/arm/mach-vexpress/Kconfig | 1 - drivers/bus/vexpress-config.c | 283 +++++++++++++++++++++++++++++++-- drivers/misc/Kconfig | 9 -- drivers/misc/Makefile | 1 - drivers/misc/vexpress-syscfg.c | 280 -------------------------------- include/linux/vexpress.h | 17 -- 6 files changed, 274 insertions(+), 317 deletions(-) delete mode 100644 drivers/misc/vexpress-syscfg.c diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 2d1fdec4c230..065e12991663 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -20,7 +20,6 @@ menuconfig ARCH_VEXPRESS select REGULATOR if MMC_ARMMMCI select REGULATOR_FIXED_VOLTAGE if REGULATOR select VEXPRESS_CONFIG - select VEXPRESS_SYSCFG 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/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c index ff70575b2db6..43f5beac9811 100644 --- a/drivers/bus/vexpress-config.c +++ b/drivers/bus/vexpress-config.c @@ -6,10 +6,48 @@ #include #include +#include #include +#include #include +#include +#include #include +#define SYS_CFGDATA 0x0 + +#define SYS_CFGCTRL 0x4 +#define SYS_CFGCTRL_START (1 << 31) +#define SYS_CFGCTRL_WRITE (1 << 30) +#define SYS_CFGCTRL_DCC(n) (((n) & 0xf) << 26) +#define SYS_CFGCTRL_FUNC(n) (((n) & 0x3f) << 20) +#define SYS_CFGCTRL_SITE(n) (((n) & 0x3) << 16) +#define SYS_CFGCTRL_POSITION(n) (((n) & 0xf) << 12) +#define SYS_CFGCTRL_DEVICE(n) (((n) & 0xfff) << 0) + +#define SYS_CFGSTAT 0x8 +#define SYS_CFGSTAT_ERR (1 << 1) +#define SYS_CFGSTAT_COMPLETE (1 << 0) + + +struct vexpress_syscfg { + struct device *dev; + void __iomem *base; + struct list_head funcs; +}; + +struct vexpress_syscfg_func { + struct list_head list; + struct vexpress_syscfg *syscfg; + struct regmap *regmap; + int num_templates; + u32 template[]; /* Keep it last! */ +}; + +struct vexpress_config_bridge_ops { + struct regmap * (*regmap_init)(struct device *dev, void *context); + void (*regmap_exit)(struct regmap *regmap, void *context); +}; struct vexpress_config_bridge { struct vexpress_config_bridge_ops *ops; @@ -27,17 +65,12 @@ void vexpress_config_set_master(u32 site) vexpress_config_site_master = site; } -u32 vexpress_config_get_master(void) -{ - return vexpress_config_site_master; -} - -void vexpress_config_lock(void *arg) +static void vexpress_config_lock(void *arg) { mutex_lock(&vexpress_config_mutex); } -void vexpress_config_unlock(void *arg) +static void vexpress_config_unlock(void *arg) { mutex_unlock(&vexpress_config_mutex); } @@ -59,7 +92,7 @@ static void vexpress_config_find_prop(struct device_node *node, } } -int vexpress_config_get_topo(struct device_node *node, u32 *site, +static int vexpress_config_get_topo(struct device_node *node, u32 *site, u32 *position, u32 *dcc) { vexpress_config_find_prop(node, "arm,vexpress,site", site); @@ -113,7 +146,7 @@ struct regmap *devm_regmap_init_vexpress_config(struct device *dev) } EXPORT_SYMBOL_GPL(devm_regmap_init_vexpress_config); -struct device *vexpress_config_bridge_register(struct device *parent, +static struct device *vexpress_config_bridge_register(struct device *parent, struct vexpress_config_bridge_ops *ops, void *context) { struct device *dev; @@ -201,3 +234,235 @@ static int __init vexpress_config_init(void) } postcore_initcall(vexpress_config_init); +static int vexpress_syscfg_exec(struct vexpress_syscfg_func *func, + int index, bool write, u32 *data) +{ + struct vexpress_syscfg *syscfg = func->syscfg; + u32 command, status; + int tries; + long timeout; + + if (WARN_ON(index >= func->num_templates)) + return -EINVAL; + + command = readl(syscfg->base + SYS_CFGCTRL); + if (WARN_ON(command & SYS_CFGCTRL_START)) + return -EBUSY; + + command = func->template[index]; + command |= SYS_CFGCTRL_START; + command |= write ? SYS_CFGCTRL_WRITE : 0; + + /* Use a canary for reads */ + if (!write) + *data = 0xdeadbeef; + + dev_dbg(syscfg->dev, "func %p, command %x, data %x\n", + func, command, *data); + writel(*data, syscfg->base + SYS_CFGDATA); + writel(0, syscfg->base + SYS_CFGSTAT); + writel(command, syscfg->base + SYS_CFGCTRL); + mb(); + + /* The operation can take ages... Go to sleep, 100us initially */ + tries = 100; + timeout = 100; + do { + if (!irqs_disabled()) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(usecs_to_jiffies(timeout)); + if (signal_pending(current)) + return -EINTR; + } else { + udelay(timeout); + } + + status = readl(syscfg->base + SYS_CFGSTAT); + if (status & SYS_CFGSTAT_ERR) + return -EFAULT; + + if (timeout > 20) + timeout -= 20; + } while (--tries && !(status & SYS_CFGSTAT_COMPLETE)); + if (WARN_ON_ONCE(!tries)) + return -ETIMEDOUT; + + if (!write) { + *data = readl(syscfg->base + SYS_CFGDATA); + dev_dbg(syscfg->dev, "func %p, read data %x\n", func, *data); + } + + return 0; +} + +static int vexpress_syscfg_read(void *context, unsigned int index, + unsigned int *val) +{ + struct vexpress_syscfg_func *func = context; + + return vexpress_syscfg_exec(func, index, false, val); +} + +static int vexpress_syscfg_write(void *context, unsigned int index, + unsigned int val) +{ + struct vexpress_syscfg_func *func = context; + + return vexpress_syscfg_exec(func, index, true, &val); +} + +static struct regmap_config vexpress_syscfg_regmap_config = { + .lock = vexpress_config_lock, + .unlock = vexpress_config_unlock, + .reg_bits = 32, + .val_bits = 32, + .reg_read = vexpress_syscfg_read, + .reg_write = vexpress_syscfg_write, + .reg_format_endian = REGMAP_ENDIAN_LITTLE, + .val_format_endian = REGMAP_ENDIAN_LITTLE, +}; + + +static struct regmap *vexpress_syscfg_regmap_init(struct device *dev, + void *context) +{ + int err; + struct vexpress_syscfg *syscfg = context; + struct vexpress_syscfg_func *func; + struct property *prop; + const __be32 *val = NULL; + __be32 energy_quirk[4]; + int num; + u32 site, position, dcc; + int i; + + err = vexpress_config_get_topo(dev->of_node, &site, + &position, &dcc); + if (err) + return ERR_PTR(err); + + prop = of_find_property(dev->of_node, + "arm,vexpress-sysreg,func", NULL); + if (!prop) + return ERR_PTR(-EINVAL); + + num = prop->length / sizeof(u32) / 2; + val = prop->value; + + /* + * "arm,vexpress-energy" function used to be described + * by its first device only, now it requires both + */ + if (num == 1 && of_device_is_compatible(dev->of_node, + "arm,vexpress-energy")) { + num = 2; + energy_quirk[0] = *val; + energy_quirk[2] = *val++; + energy_quirk[1] = *val; + energy_quirk[3] = cpu_to_be32(be32_to_cpup(val) + 1); + val = energy_quirk; + } + + func = kzalloc(struct_size(func, template, num), GFP_KERNEL); + if (!func) + return ERR_PTR(-ENOMEM); + + func->syscfg = syscfg; + func->num_templates = num; + + for (i = 0; i < num; i++) { + u32 function, device; + + function = be32_to_cpup(val++); + device = be32_to_cpup(val++); + + dev_dbg(dev, "func %p: %u/%u/%u/%u/%u\n", + func, site, position, dcc, + function, device); + + func->template[i] = SYS_CFGCTRL_DCC(dcc); + func->template[i] |= SYS_CFGCTRL_SITE(site); + func->template[i] |= SYS_CFGCTRL_POSITION(position); + func->template[i] |= SYS_CFGCTRL_FUNC(function); + func->template[i] |= SYS_CFGCTRL_DEVICE(device); + } + + vexpress_syscfg_regmap_config.max_register = num - 1; + + func->regmap = regmap_init(dev, NULL, func, + &vexpress_syscfg_regmap_config); + + if (IS_ERR(func->regmap)) { + void *err = func->regmap; + + kfree(func); + return err; + } + + list_add(&func->list, &syscfg->funcs); + + return func->regmap; +} + +static void vexpress_syscfg_regmap_exit(struct regmap *regmap, void *context) +{ + struct vexpress_syscfg *syscfg = context; + struct vexpress_syscfg_func *func, *tmp; + + regmap_exit(regmap); + + list_for_each_entry_safe(func, tmp, &syscfg->funcs, list) { + if (func->regmap == regmap) { + list_del(&syscfg->funcs); + kfree(func); + break; + } + } +} + +static struct vexpress_config_bridge_ops vexpress_syscfg_bridge_ops = { + .regmap_init = vexpress_syscfg_regmap_init, + .regmap_exit = vexpress_syscfg_regmap_exit, +}; + + +static int vexpress_syscfg_probe(struct platform_device *pdev) +{ + struct vexpress_syscfg *syscfg; + struct resource *res; + struct device *bridge; + + syscfg = devm_kzalloc(&pdev->dev, sizeof(*syscfg), GFP_KERNEL); + if (!syscfg) + return -ENOMEM; + syscfg->dev = &pdev->dev; + INIT_LIST_HEAD(&syscfg->funcs); + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + syscfg->base = devm_ioremap_resource(&pdev->dev, res); + 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); + + return PTR_ERR_OR_ZERO(bridge); +} + +static const struct platform_device_id vexpress_syscfg_id_table[] = { + { "vexpress-syscfg", }, + {}, +}; + +static struct platform_driver vexpress_syscfg_driver = { + .driver.name = "vexpress-syscfg", + .id_table = vexpress_syscfg_id_table, + .probe = vexpress_syscfg_probe, +}; + +static int __init vexpress_syscfg_init(void) +{ + return platform_driver_register(&vexpress_syscfg_driver); +} +core_initcall(vexpress_syscfg_init); diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 99e151475d8f..edd5dd5ebfdc 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -423,15 +423,6 @@ config SRAM config SRAM_EXEC bool -config VEXPRESS_SYSCFG - bool "Versatile Express System Configuration driver" - depends on VEXPRESS_CONFIG - default y - help - ARM Ltd. Versatile Express uses specialised platform configuration - bus. System Configuration interface is one of the possible means - of generating transactions on this bus. - config PCI_ENDPOINT_TEST depends on PCI select CRC32 diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 9abf2923d831..c7bd01ac6291 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -49,7 +49,6 @@ obj-$(CONFIG_SRAM_EXEC) += sram-exec.o obj-y += mic/ obj-$(CONFIG_GENWQE) += genwqe/ obj-$(CONFIG_ECHO) += echo/ -obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o obj-$(CONFIG_CXL_BASE) += cxl/ obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o obj-$(CONFIG_OCXL) += ocxl/ diff --git a/drivers/misc/vexpress-syscfg.c b/drivers/misc/vexpress-syscfg.c deleted file mode 100644 index a431787c0898..000000000000 --- a/drivers/misc/vexpress-syscfg.c +++ /dev/null @@ -1,280 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * - * Copyright (C) 2014 ARM Limited - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define SYS_CFGDATA 0x0 - -#define SYS_CFGCTRL 0x4 -#define SYS_CFGCTRL_START (1 << 31) -#define SYS_CFGCTRL_WRITE (1 << 30) -#define SYS_CFGCTRL_DCC(n) (((n) & 0xf) << 26) -#define SYS_CFGCTRL_FUNC(n) (((n) & 0x3f) << 20) -#define SYS_CFGCTRL_SITE(n) (((n) & 0x3) << 16) -#define SYS_CFGCTRL_POSITION(n) (((n) & 0xf) << 12) -#define SYS_CFGCTRL_DEVICE(n) (((n) & 0xfff) << 0) - -#define SYS_CFGSTAT 0x8 -#define SYS_CFGSTAT_ERR (1 << 1) -#define SYS_CFGSTAT_COMPLETE (1 << 0) - - -struct vexpress_syscfg { - struct device *dev; - void __iomem *base; - struct list_head funcs; -}; - -struct vexpress_syscfg_func { - struct list_head list; - struct vexpress_syscfg *syscfg; - struct regmap *regmap; - int num_templates; - u32 template[]; /* Keep it last! */ -}; - - -static int vexpress_syscfg_exec(struct vexpress_syscfg_func *func, - int index, bool write, u32 *data) -{ - struct vexpress_syscfg *syscfg = func->syscfg; - u32 command, status; - int tries; - long timeout; - - if (WARN_ON(index >= func->num_templates)) - return -EINVAL; - - command = readl(syscfg->base + SYS_CFGCTRL); - if (WARN_ON(command & SYS_CFGCTRL_START)) - return -EBUSY; - - command = func->template[index]; - command |= SYS_CFGCTRL_START; - command |= write ? SYS_CFGCTRL_WRITE : 0; - - /* Use a canary for reads */ - if (!write) - *data = 0xdeadbeef; - - dev_dbg(syscfg->dev, "func %p, command %x, data %x\n", - func, command, *data); - writel(*data, syscfg->base + SYS_CFGDATA); - writel(0, syscfg->base + SYS_CFGSTAT); - writel(command, syscfg->base + SYS_CFGCTRL); - mb(); - - /* The operation can take ages... Go to sleep, 100us initially */ - tries = 100; - timeout = 100; - do { - if (!irqs_disabled()) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(usecs_to_jiffies(timeout)); - if (signal_pending(current)) - return -EINTR; - } else { - udelay(timeout); - } - - status = readl(syscfg->base + SYS_CFGSTAT); - if (status & SYS_CFGSTAT_ERR) - return -EFAULT; - - if (timeout > 20) - timeout -= 20; - } while (--tries && !(status & SYS_CFGSTAT_COMPLETE)); - if (WARN_ON_ONCE(!tries)) - return -ETIMEDOUT; - - if (!write) { - *data = readl(syscfg->base + SYS_CFGDATA); - dev_dbg(syscfg->dev, "func %p, read data %x\n", func, *data); - } - - return 0; -} - -static int vexpress_syscfg_read(void *context, unsigned int index, - unsigned int *val) -{ - struct vexpress_syscfg_func *func = context; - - return vexpress_syscfg_exec(func, index, false, val); -} - -static int vexpress_syscfg_write(void *context, unsigned int index, - unsigned int val) -{ - struct vexpress_syscfg_func *func = context; - - return vexpress_syscfg_exec(func, index, true, &val); -} - -static struct regmap_config vexpress_syscfg_regmap_config = { - .lock = vexpress_config_lock, - .unlock = vexpress_config_unlock, - .reg_bits = 32, - .val_bits = 32, - .reg_read = vexpress_syscfg_read, - .reg_write = vexpress_syscfg_write, - .reg_format_endian = REGMAP_ENDIAN_LITTLE, - .val_format_endian = REGMAP_ENDIAN_LITTLE, -}; - - -static struct regmap *vexpress_syscfg_regmap_init(struct device *dev, - void *context) -{ - int err; - struct vexpress_syscfg *syscfg = context; - struct vexpress_syscfg_func *func; - struct property *prop; - const __be32 *val = NULL; - __be32 energy_quirk[4]; - int num; - u32 site, position, dcc; - int i; - - err = vexpress_config_get_topo(dev->of_node, &site, - &position, &dcc); - if (err) - return ERR_PTR(err); - - prop = of_find_property(dev->of_node, - "arm,vexpress-sysreg,func", NULL); - if (!prop) - return ERR_PTR(-EINVAL); - - num = prop->length / sizeof(u32) / 2; - val = prop->value; - - /* - * "arm,vexpress-energy" function used to be described - * by its first device only, now it requires both - */ - if (num == 1 && of_device_is_compatible(dev->of_node, - "arm,vexpress-energy")) { - num = 2; - energy_quirk[0] = *val; - energy_quirk[2] = *val++; - energy_quirk[1] = *val; - energy_quirk[3] = cpu_to_be32(be32_to_cpup(val) + 1); - val = energy_quirk; - } - - func = kzalloc(struct_size(func, template, num), GFP_KERNEL); - if (!func) - return ERR_PTR(-ENOMEM); - - func->syscfg = syscfg; - func->num_templates = num; - - for (i = 0; i < num; i++) { - u32 function, device; - - function = be32_to_cpup(val++); - device = be32_to_cpup(val++); - - dev_dbg(dev, "func %p: %u/%u/%u/%u/%u\n", - func, site, position, dcc, - function, device); - - func->template[i] = SYS_CFGCTRL_DCC(dcc); - func->template[i] |= SYS_CFGCTRL_SITE(site); - func->template[i] |= SYS_CFGCTRL_POSITION(position); - func->template[i] |= SYS_CFGCTRL_FUNC(function); - func->template[i] |= SYS_CFGCTRL_DEVICE(device); - } - - vexpress_syscfg_regmap_config.max_register = num - 1; - - func->regmap = regmap_init(dev, NULL, func, - &vexpress_syscfg_regmap_config); - - if (IS_ERR(func->regmap)) { - void *err = func->regmap; - - kfree(func); - return err; - } - - list_add(&func->list, &syscfg->funcs); - - return func->regmap; -} - -static void vexpress_syscfg_regmap_exit(struct regmap *regmap, void *context) -{ - struct vexpress_syscfg *syscfg = context; - struct vexpress_syscfg_func *func, *tmp; - - regmap_exit(regmap); - - list_for_each_entry_safe(func, tmp, &syscfg->funcs, list) { - if (func->regmap == regmap) { - list_del(&syscfg->funcs); - kfree(func); - break; - } - } -} - -static struct vexpress_config_bridge_ops vexpress_syscfg_bridge_ops = { - .regmap_init = vexpress_syscfg_regmap_init, - .regmap_exit = vexpress_syscfg_regmap_exit, -}; - - -static int vexpress_syscfg_probe(struct platform_device *pdev) -{ - struct vexpress_syscfg *syscfg; - struct resource *res; - struct device *bridge; - - syscfg = devm_kzalloc(&pdev->dev, sizeof(*syscfg), GFP_KERNEL); - if (!syscfg) - return -ENOMEM; - syscfg->dev = &pdev->dev; - INIT_LIST_HEAD(&syscfg->funcs); - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - syscfg->base = devm_ioremap_resource(&pdev->dev, res); - 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); - - return PTR_ERR_OR_ZERO(bridge); -} - -static const struct platform_device_id vexpress_syscfg_id_table[] = { - { "vexpress-syscfg", }, - {}, -}; - -static struct platform_driver vexpress_syscfg_driver = { - .driver.name = "vexpress-syscfg", - .id_table = vexpress_syscfg_id_table, - .probe = vexpress_syscfg_probe, -}; - -static int __init vexpress_syscfg_init(void) -{ - return platform_driver_register(&vexpress_syscfg_driver); -} -core_initcall(vexpress_syscfg_init); diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index 2ec7992b054c..65096c792d57 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h @@ -18,23 +18,6 @@ /* Config infrastructure */ void vexpress_config_set_master(u32 site); -u32 vexpress_config_get_master(void); - -void vexpress_config_lock(void *arg); -void vexpress_config_unlock(void *arg); - -int vexpress_config_get_topo(struct device_node *node, u32 *site, - u32 *position, u32 *dcc); - -/* Config bridge API */ - -struct vexpress_config_bridge_ops { - struct regmap * (*regmap_init)(struct device *dev, void *context); - void (*regmap_exit)(struct regmap *regmap, void *context); -}; - -struct device *vexpress_config_bridge_register(struct device *parent, - struct vexpress_config_bridge_ops *ops, void *context); /* Config regmap API */ 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 (Arm)" X-Patchwork-Id: 11497759 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 24C456CA for ; Sun, 19 Apr 2020 17:12:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D0816206E9 for ; Sun, 19 Apr 2020 17:12: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="I/S2Mwyz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0816206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=rK206v6whcos5i8jOkN5hDFYJvCpb1CcKto2Nx5nFJw=; b=I/S2MwyzI+p2yn iaKbM/zwL1K8wnEAsfBjGhhUDFTTUlWvQb9BAcBTCfk21tnSD1+dFVukOLBnPynkAPCDUYphUltoH SBRgvseuwFrPl04MQW5p+RyRxjTioqOIKzJbBHG36UTos2fa3wPMjoGbsJgVglvPi1dA1ssg78Y3t oyhr1M8bNN4/v4OSs6X/FgBV0rj776GdPoxxH2rYh06A6Pgu6ul1nPx68rpe1U6w8G2KE33M2if4V agEOlSx6uReOV9JMRyb7Zs3dquE/QjnL6UlSo7QELsZV7EDAk79OnTFOgztUIkGBqCnQ9MR3Clr0+ B0s+aHR14DrjyhA/a4pQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDUr-0007he-EM; Sun, 19 Apr 2020 17:12:45 +0000 Received: from mail-oo1-f67.google.com ([209.85.161.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQn-0001vR-OF for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:35 +0000 Received: by mail-oo1-f67.google.com with SMTP id p67so1578802ooa.11 for ; 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=/wB2U6U0ewgKGp4KSPn+vSVDTtuFAzErpi8wcYMw6Fo=; b=ohqXxJO2x//sPzSTakzKx/uE9E0XYcGOKOKbKpdNH2WenWae9nAK8T7u/nncA4+OuN c02PSHLNKQ7FtlZ7498Haim112FF0qBj9buueX0Az4yh99hi5rncKc7zzT6fGK225LSR NFD1WT8SvZnuhUVgsxOjDjr25uvejiqWtEpgj7n+P/Mjxt/hxxhJoulAlwXILI2SVkgV j6t34a96tXE58m80Q5nj98+grMmq9uKwPZIYn14DRjpl4+JxhkF8vECc5loBsxyFw2Ro WKHcn+7s4zv+PTtUtqrFWwGYJtLkfZTSH6UMBWSFmmsGxFeCpL1JL4UN5E9uoinMBUis yafA== X-Gm-Message-State: AGi0PuZ1yrV3fHXlBGWSW96ptPtUsrbPdbNAXg7t9587nKPXr0uoklaB t+rIsjbdkcDTMTnOg1/IlQ== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100833_800708_2F9A5914 X-CRM114-Status: GOOD ( 16.26 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.161.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.161.67 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Acked-by: Liviu Dudau --- 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 (Arm)" X-Patchwork-Id: 11497763 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 9BA10112C for ; Sun, 19 Apr 2020 17:13:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4377B21473 for ; Sun, 19 Apr 2020 17:13:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="j51O0p3Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4377B21473 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=MlXVMFDw3EfC/AhIpkle0N7NLGGnDLxmeN1GZntnoYY=; b=j51O0p3Qn/ctbw FZe0INV/kniePKpWd1XXNtR73kSM7U5pZGTxcD6vhKyxJ3QJzbFE1FAnQB7zztorAYKyL2pPn3cah uswe89FS+6SUwIh2EH6ZNlDJnb088ELqy3qFisRDWQi3YcqwBg4l8kJpe3k9zN/cmoi1eSLTqTAPJ QXuUzgPuqGrUjCpeuwle0G2MSC3fdH6VuRXmt3rwM8v4mWEV94r5xxj1NyLhEX8x1X1+4/Oss5agp +Y7cWyza3mVFXUk188AaYwyaRC7s+Ka93qAkv0EiEVPD62lQDFvBLplwCmidjoRDb2Pj/8Aj48qAi HBvg5dEvbZkIHAzSISrA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDVP-0008EL-AX; Sun, 19 Apr 2020 17:13:19 +0000 Received: from mail-ot1-f68.google.com ([209.85.210.68]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQo-0001wD-7y for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:36 +0000 Received: by mail-ot1-f68.google.com with SMTP id m13so5960908otf.6 for ; Sun, 19 Apr 2020 10:08:34 -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=NgDYbqgbrrgVd2LxidYre+++ArtguZRK9/7LdYoy0XeN9oF+4bExAF4vmMv/sLgZLi 30A+S0sEhPsyhOSBLgdD9Fm3FnPgcb2+Bbu7uiL3XUhJY2vgmWH1VDQI+vJs5dEkU5/S 4KmD/hlCsxY9P4HBHR0y+a4i4AJ4bRfb+1ZcalkL/EtiQdIEN0A1VrdASZjtW19v8WKd qtPeNCv5V5gcH0WdZXXfwcqYW/nYFA0dWfsCKxAnihMfkLYSBBZ7HaKVkBSObeE5ksON Q0n7nAeIn3ofF8ty+vhlPpfhXDEFBfhvjox0ncdfLYFlMq2HzRB9Sk4/uEa5i1sYTIlB KVjg== X-Gm-Message-State: AGi0PuaUy4i+VWiEPAStSlGYYawyZHHjWL3vcMFK26ZymHc0vXaxSO2d 4l4/vgT0uYc1az66MZE4CA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100834_483322_AD75E2CE X-CRM114-Status: GOOD ( 14.69 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.68 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.68 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Acked-by: Liviu Dudau --- 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:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11497761 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 1CEF76CA for ; Sun, 19 Apr 2020 17:13:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EE17B21927 for ; Sun, 19 Apr 2020 17:13:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IFeVobrQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE17B21927 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=udhetA+yoCn1cT1fg/xTfoxfICRDEtDZeMP7ItsVYxM=; b=IFeVobrQYR/DyZ y+QPi3i6okKDJVjh2SohJWWJ72DObY9d1tJLGbF2x8VlgcUithytzwdaTTwAwd1HmAI3gd1v6dbEz DzM0K7CpdcUrF29Q9j+IktuuML5fi08DKLgYsELv/LvMsnz6XbOmAJaaIhe/V01RFsxh4o9keMn5R 4si+zK7lck4tJs/Sb5/cgLRDjKQWXS+/+IlxvZC3tLq7uHqCAeA8m3GXELqmcAXjBd9B+59uzdCcT Zc7XxAQLC7EZlm6PjvFuCuZr4wotcDmp2j9utEqVdgtjB9GskqI8pQlazH4/sew7OybadBiV8ih7R fZRAuXKztGiqoE0Sg3gw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDV8-0007xV-47; Sun, 19 Apr 2020 17:13:02 +0000 Received: from mail-ot1-f67.google.com ([209.85.210.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQp-0001x8-II for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:37 +0000 Received: by mail-ot1-f67.google.com with SMTP id c3so5953809otp.8 for ; Sun, 19 Apr 2020 10:08:35 -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=EBjrivoY+dBlZy5hXEimly9aG7ilu27sG29Xt5twimM=; b=MVRAM8CVEIj3KCWQhq/xJw/+JX7qflO/zv4K1LVii9gaKWgGlOAI/yXTVixsaEGcb4 O5a/nhmjLk2mFgowCphiAZbTwH1N638K4oe2rdkQO0X0Xk6RNYLmaJUAbBcT6gVrCQQF sQHNbYnmlleha6uqrxybBYiGDa3dMkNwlVs6gZqKzfFpnCJTByDAWFgCepocdA5VfmOk qIwYs9i7fUAAOiB8xt/OHf33uZ8PwkDtl081hMQ8e7Z3qGE2ITYE/oT7OGDBzfwrR8FQ 3nw3p31ZwWLvuzLmZGQvWqqGQ1JDAJpvscnLBXa/9L4CNM1KvIOF0nIGLLl4D+OXeWiS pJpw== X-Gm-Message-State: AGi0PubJ8S7muwgy8/MAyb3GnmCZ6WHTWLnH5gbGfPTSYYcXu6bJd77y 95jdxoG/G9nli7f3ohywBA== X-Google-Smtp-Source: APiQypL94dbwiZMtLp3Y9iPspqjTiyd4nMHmIxz5FPIZ7BgIvaacRyIdkubSgHJoGyF7liSeKobz+Q== X-Received: by 2002:a05:6830:160c:: with SMTP id g12mr6519994otr.335.1587316114376; Sun, 19 Apr 2020 10:08:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 10:08:33 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH 16/17] bus: vexpress-config: Support building as module Date: Sun, 19 Apr 2020 12:08:09 -0500 Message-Id: <20200419170810.5738-17-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100835_687079_FBEE5D09 X-CRM114-Status: GOOD ( 12.10 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.67 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.67 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Enable building vexpress-config driver as a module. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Greg Kroah-Hartman Signed-off-by: Rob Herring Acked-by: Liviu Dudau --- drivers/bus/Kconfig | 2 +- drivers/bus/vexpress-config.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index 6d4e4497b59b..c16268c53831 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -183,7 +183,7 @@ config UNIPHIER_SYSTEM_BUS needed to use on-board devices connected to UniPhier SoCs. config VEXPRESS_CONFIG - bool "Versatile Express configuration bus" + tristate "Versatile Express configuration bus" default y if ARCH_VEXPRESS depends on ARM || ARM64 depends on OF diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c index caa35a4cb34d..a58ac0c8e282 100644 --- a/drivers/bus/vexpress-config.c +++ b/drivers/bus/vexpress-config.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -407,15 +408,12 @@ static const struct platform_device_id vexpress_syscfg_id_table[] = { { "vexpress-syscfg", }, {}, }; +MODULE_DEVICE_TABLE(platform, vexpress_syscfg_id_table); static struct platform_driver vexpress_syscfg_driver = { .driver.name = "vexpress-syscfg", .id_table = vexpress_syscfg_id_table, .probe = vexpress_syscfg_probe, }; - -static int __init vexpress_syscfg_init(void) -{ - return platform_driver_register(&vexpress_syscfg_driver); -} -core_initcall(vexpress_syscfg_init); +module_platform_driver(vexpress_syscfg_driver); +MODULE_LICENSE("GPL v2"); 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 (Arm)" X-Patchwork-Id: 11497765 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 39CB2112C for ; Sun, 19 Apr 2020 17:13:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1840A206E9 for ; Sun, 19 Apr 2020 17:13:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ebST+TZo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1840A206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=bombadil.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=rQSsx79CbwpaT01PF/xQchk5mS02UUx9wc+YUA+Hcgk=; b=ebST+TZobUxKhD hxv7PRLLZB5ub1J9Pa7rPA4ciQZtGJMK+7lDFpbPXOBaV99orVS3pnAL4L9gl+zM4jGA59KHB+a91 5Day3IsYnIm4bjOZH9sMkLqQrkYHlbcDSrUeXv9lHaeuBW7LzD1/p6DY4I6bXvWidarw/Fx0kD8dd GjbXZsiNCdGDcB045LE2sw5NdFvR8C0BlntA1dE62QC1EfBe3Yonv1T4VKy/TSrjVSsgPSNpEm1iL Alxm1rDn4E7oQ5F52CECQgsP/bZfeC1y8PzCUJo5oXfNxN0K1jSaZ2LbBY5rQ51T9CCvOGSe4HFCE 5EMcQ//pUGuqVk2Y/2Eg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDVh-0008S3-EH; Sun, 19 Apr 2020 17:13:37 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDQr-0001z1-A6 for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 17:08:38 +0000 Received: by mail-ot1-f66.google.com with SMTP id h11so519298ots.1 for ; Sun, 19 Apr 2020 10:08:37 -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=GrEXYlXlBzj6N6ArocMcxr/Pw+Vpa2JqI/dApNYnj3FtozE2JAUYAGxVsBa2/qgNdd 9WR/NtPA7KUv3p5BcN2Pyh8vG1IA/gpEgrCrAZwKMydyYZuyU5GCT5CLSKRfOFqJKQ/5 ma7KWJpnmOj0xAoe4pX7/cHUN+zwPeLarkB4d+q/eLI78MsnW4RTOcndcP6a+2R5FBnk qjNLmfF5nBjvGOQp2qHu2n99q1nR7uVVudNDyC92qbyATFp+6gigshIcsCPnrbfY30qf UlH2+vE11Sio4btvmdJu/tKtgbYSTeSwqSyOxXCubHKNUpAD7YHY4QqW+op9IsdoDuoX ER+w== X-Gm-Message-State: AGi0PuazUt3+1Csn0fgMKvHu9X4upYyN/0CQX+twOiFRql68BHTlloAd 5SSuXUNr72UL/eOSUXtX8g== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_100837_417353_0BE48208 X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.66 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.66 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 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Arnd Bergmann , linux-pm@vger.kernel.org, Stephen Boyd , Catalin Marinas , Kevin Brodsky , Sebastian Reichel , Will Deacon , Greg Kroah-Hartman , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Acked-by: Liviu Dudau --- 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,