From patchwork Tue May 15 02:53:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 135819 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp414805lji; Mon, 14 May 2018 19:55:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrJuoyKDjxAy3mTq7XEttx0iqiqJXbX3SB6zV0PIrSOp4D4v0BFXoNNFq/XHK9TD0lyAKln X-Received: by 2002:a17:902:d808:: with SMTP id a8-v6mr12559030plz.177.1526352927963; Mon, 14 May 2018 19:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526352927; cv=none; d=google.com; s=arc-20160816; b=I1Aoll224u03bQzi8hnYVaAlZeWBbD0jgo5ClA+nRi5dEazT8mhLAd5VSDM1ja0vST 9F06vbpjk0RkGdrDEWoYS1Bvent/UdEkIVdjXVkhaSCWgZrBw3wDaw805ZdpxUsqLt+c X3fxTkyljt8S4WLASeMKbI8PhOKvK1cP/+0IbRN6iOFio/UGOVjxndzBixCGvWjik75u ieoo3glIYrxRjNKo0cGraM5A9sAN2dNTv3qmwmuo7Kgts+jKvEnPzU8Xz9jIs5TEYhwY VzJ2kEfU2khCTxvkYtkfxqDNDa+4K8T9H6IF3cD4+Aj6hR1SnIkChCXLVdss4BgHlKWD u45Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=p/hO9t/wiA8XkuXxrgjns5RonY9B9GkUyfwOSm5K9kM=; b=GYCIhvBBS7Rq3HUE+EZt1+baR6RS5bstJcI//zSV7urpLFQSQuwRxpToWu62vvP86+ ZarghrfYyR/bFsqJlSaMYyUCgxOJ0f0nOm3n8rQLOXVUBaNWW+SUDFPLdsMXjuXa8Bre 4Wef8+NumCqCPxMO2OZvMkRU2ZJFD3gkPh0IHBHJQv2fpq8ZAz+UEupm7PCdpV2pAZ1n yFthH6O2ZWYcTfSXdPP9Y93kBoLNcZzm0wzNbhFaW4CBMiu+c7lPzE+XouTNFo8N1NhZ NCU/o3wbv/rAWkn1zg/un7x29Cf/XsWzfFxN4UizAfUMqK+jTHdJ0hhKe70CDKO0hFML o3hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QyStd+Ca; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si9993067plk.112.2018.05.14.19.55.27; Mon, 14 May 2018 19:55:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QyStd+Ca; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752313AbeEOCz0 (ORCPT + 5 others); Mon, 14 May 2018 22:55:26 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34066 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752155AbeEOCzY (ORCPT ); Mon, 14 May 2018 22:55:24 -0400 Received: by mail-pf0-f195.google.com with SMTP id a14-v6so6959719pfi.1 for ; Mon, 14 May 2018 19:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IEIsuNaJhXQfArUlMB/E93Xi0PJrMMJmkXMa6x59zP4=; b=QyStd+CaqAYWEZxn7krgdI7SxUXE2ImkDrwkPX24pwV/Iz/i9i7jVhHVREVZ/1UlQM NzeuIifoUzbuhq16W+GVej1KjYx3zC7mEAiP20RW6iOYDh7/szsWw//Vd9JPLCDSwFoO tS7pr+kQExeG+z3qHZ+zdbyWL3peQ0gaoepkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IEIsuNaJhXQfArUlMB/E93Xi0PJrMMJmkXMa6x59zP4=; b=Y/Fz+/P2vP0W9OTgPYHmKyap4KQmdrC/ERTcEP3MrV7e9myI68IdksKftC42/DICsP N+8Y45oeFuRkPQu6B3Ru2g44ahoLUITPSK7VD0MLff1elSIvjOoy2QiQ2XVxTUMdyniR jrHJ9Hn4PFv9kIYhZ8vdddCGkq8NBn6SKYUKUHK7W8kETNeNvmXGfj2ZJq+jtztBMWJ8 8wRylUFJ5nCXRL1Ttsky3OfijgyZei+thBgnB14rE6x7WVeT93/SB7fz7WS7NGFfuU8K VAl8LcR+M82hqTl8tCXRZ7k6G9V8kFF0P90I3Xp0fOMyamO4hER9SKGMhEbkCrubhE2E L6nw== X-Gm-Message-State: ALKqPwcBaOGXFBvd8MB6O9vo3lskPYuHJ7yXZM7PPb3mqSZztLxlJSV4 IVjrDqjBPUCKDGwdAoYovLF7KA== X-Received: by 2002:a63:7904:: with SMTP id u4-v6mr3064395pgc.143.1526352924316; Mon, 14 May 2018 19:55:24 -0700 (PDT) Received: from localhost.localdomain (li1168-94.members.linode.com. [45.79.69.94]) by smtp.gmail.com with ESMTPSA id z129-v6sm17482561pfb.108.2018.05.14.19.55.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 May 2018 19:55:23 -0700 (PDT) From: Leo Yan To: Wei Xu , Rob Herring , Mark Rutland , Michael Turquette , Stephen Boyd , Jassi Brar , Arnd Bergmann , Olof Johansson , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 5/5] hisi: Consolidate the Kconfigs for the CLOCK_STUB and the MAILBOX Date: Tue, 15 May 2018 10:53:15 +0800 Message-Id: <1526352795-6991-6-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526352795-6991-1-git-send-email-leo.yan@linaro.org> References: <1526352795-6991-1-git-send-email-leo.yan@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Daniel Lezcano The current defconfig is inconsistent as it selects the mailbox and the clock for the hi6220 and the hi3660 without having their Kconfigs making sure the dependencies are correct. It ends up when selecting different versions for the kernel (for example when git bisecting) those options disappear and they don't get back, leading to unexpected behaviors. In our case, the cpufreq driver does no longer work because the clock fails to initialize due to the clock stub and the mailbox missing. In order to have the dependencies correctly set when defaulting, let's do the same as commit 3a49afb84ca074e ("clk: enable hi655x common clk automatically") where we select automatically the driver when the parent driver is selected. With sensible defaults in place, we can leave other choices for EXPERT. Acked-by: Stephen Boyd Acked-by: Jassi Brar Signed-off-by: Daniel Lezcano Signed-off-by: Leo Yan --- arch/arm64/configs/defconfig | 1 - drivers/clk/hisilicon/Kconfig | 13 ++++++++----- drivers/mailbox/Kconfig | 12 ++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index ecf6137..1d9d8b9 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -549,7 +549,6 @@ CONFIG_HWSPINLOCK_QCOM=y CONFIG_ARM_MHU=y CONFIG_PLATFORM_MHU=y CONFIG_BCM2835_MBOX=y -CONFIG_HI6220_MBOX=y CONFIG_QCOM_APCS_IPC=y CONFIG_ROCKCHIP_IOMMU=y CONFIG_TEGRA_IOMMU_SMMU=y diff --git a/drivers/clk/hisilicon/Kconfig b/drivers/clk/hisilicon/Kconfig index 1bd4355..becdb1d 100644 --- a/drivers/clk/hisilicon/Kconfig +++ b/drivers/clk/hisilicon/Kconfig @@ -44,14 +44,17 @@ config RESET_HISI Build reset controller driver for HiSilicon device chipsets. config STUB_CLK_HI6220 - bool "Hi6220 Stub Clock Driver" - depends on COMMON_CLK_HI6220 && MAILBOX - default ARCH_HISI + bool "Hi6220 Stub Clock Driver" if EXPERT + depends on (COMMON_CLK_HI6220 || COMPILE_TEST) + depends on MAILBOX + default COMMON_CLK_HI6220 help Build the Hisilicon Hi6220 stub clock driver. config STUB_CLK_HI3660 - bool "Hi3660 Stub Clock Driver" - depends on COMMON_CLK_HI3660 && MAILBOX + bool "Hi3660 Stub Clock Driver" if EXPERT + depends on (COMMON_CLK_HI3660 || COMPILE_TEST) + depends on MAILBOX + default COMMON_CLK_HI3660 help Build the Hisilicon Hi3660 stub clock driver. diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index a2bb274..567cd02 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -109,16 +109,20 @@ config TI_MESSAGE_MANAGER platform has support for the hardware block. config HI3660_MBOX - tristate "Hi3660 Mailbox" - depends on ARCH_HISI && OF + tristate "Hi3660 Mailbox" if EXPERT + depends on (ARCH_HISI || COMPILE_TEST) + depends on OF + default ARCH_HISI help An implementation of the hi3660 mailbox. It is used to send message between application processors and other processors/MCU/DSP. Select Y here if you want to use Hi3660 mailbox controller. config HI6220_MBOX - tristate "Hi6220 Mailbox" - depends on ARCH_HISI + tristate "Hi6220 Mailbox" if EXPERT + depends on (ARCH_HISI || COMPILE_TEST) + depends on OF + default ARCH_HISI help An implementation of the hi6220 mailbox. It is used to send message between application processors and MCU. Say Y here if you want to