From patchwork Wed Apr 4 03:14:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 132794 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4549658ljb; Tue, 3 Apr 2018 20:15:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx48lCCG/4PGVv+rzIXEwRrShLgiJKstqueuiKTnXwUqACXWDu0Co6F592Tg2NOW+OnfoHW3Y X-Received: by 10.101.67.68 with SMTP id k4mr10596854pgq.197.1522811731514; Tue, 03 Apr 2018 20:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522811731; cv=none; d=google.com; s=arc-20160816; b=JNb6pYk06nyzVDKxpWNpBxDDDRDob9FsOn98lKVIvcklTl3SffIcYPM0hRwgixmgmg 86kA1LhbtgMQxLHilbK4BNBzSymE1sfSlt561GHSVEp5i4ooWJJjDg+LRJnoeUThWfqC py6tUkjeRqI/I3sN3kIag45Dg9lUXceUREfkkzwt4RBcGh2xZFzoht+UIU3TpfeDAGhd 97NCdYUZNP355hZwGsFBqzpdDwZyAv8pern+GD3JKhcfSznYrWtP5kLq5zHYMmGsi7Ps HaGM+Dsg84OKCkVj4+SAf0MzMwEchKWagbeeDrZq9sFgrpWudtUA+mD6+bWDMw0TGLLQ ccjg== 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:to:from:dkim-signature:arc-authentication-results; bh=Oo/2+vCo3f6le6YnW4xvM8FFSiImvPVfdnRn4GhVkzU=; b=U4N0YwxqGp06dxc27ybZMsCoTGOZY7njEO9sdvbrKo39U8PiuF009R3rpOtVBchwTc frA/hnTsGe5bMXKskoO+vbY3KhfeQxRtTxSxHO+4jo4+4GvRjYQJ4V2RZ6RSc7il3JbL 0KO6ifLUf6DWREJ6GkT2i6oe6u0xuYotkSxIk1OkYDMBBrUFbPXLDKmLxoclj0b+sVPj 2DsZhX4q5a4Feccs7aDNITHhfGCRzzcRf+BjburC0o9R8XVzITgeX8eYCS7j8LeUItc8 clxUA1MmOHWr1F+mpstUQRwmTFU3MXrvHfTtreyM79gNbkHkUgbMd9xvD0AMYnR5aL66 k2bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UTnLu1rM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 w22-v6si1979352plq.115.2018.04.03.20.15.31; Tue, 03 Apr 2018 20:15:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UTnLu1rM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753965AbeDDDP1 (ORCPT + 29 others); Tue, 3 Apr 2018 23:15:27 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34827 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753928AbeDDDPY (ORCPT ); Tue, 3 Apr 2018 23:15:24 -0400 Received: by mail-wm0-f67.google.com with SMTP id r82so39206080wme.0 for ; Tue, 03 Apr 2018 20:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=Oo/2+vCo3f6le6YnW4xvM8FFSiImvPVfdnRn4GhVkzU=; b=UTnLu1rM6MJ9W5icCKjBCmCvxw0U121syl+wfqYWHUxHiTbVZg+uimtOAXYT+hPmUt dsUEIJcb4VpR+VMTQ4f+lv6PKi7CaPRA+w8bIGB8np9MgVfUHiRTIVqda50xcQQTuVeY arJwbFSviShkj8DH3/N8IhvJwOJ0Mgq95+9AI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Oo/2+vCo3f6le6YnW4xvM8FFSiImvPVfdnRn4GhVkzU=; b=pEV5Y0RVLZIcj1KH4CST4ykydYf540ZBuJsaU6OWgnAp2qfWhE6DMLAeEpzJh2h+Wz HhkH6XnFpJ03LIAWtEDHw4DwqiqNXxAtPVm9UygfPIXx3UxYV88OgBjX68koEnM5MflR 1cqPEfr3ZQ3v8RkC2DSnZ2sOHbQZVRxrtCyGZ8VresLnweT5xTtYLxWKwWScTc10tkEK qg5aApBUPfD9LErl3PoUCg9I6wVH+fJBZIwsEnOVsGgyIbID4YtkeVoFj2zclTXSMAvO 4IR0SZyrpj5Nb9+M+vIdOSwjT4e/77W/ZLxsbwnSEdRO8SFi9o5mR6nnnQe2gP7elrrZ fOUw== X-Gm-Message-State: ALQs6tBYf19QqjuH0v3GxN5YB/jjqgLYEH/eBn355mcwmUI8pIv4/xG9 ynM6EED+pnKG5Zu4go4AsZt/FA== X-Received: by 10.28.16.18 with SMTP id 18mr5533523wmq.81.1522811722986; Tue, 03 Apr 2018 20:15:22 -0700 (PDT) Received: from localhost.localdomain (li622-172.members.linode.com. [212.71.249.172]) by smtp.gmail.com with ESMTPSA id r8sm2868611wmg.44.2018.04.03.20.15.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Apr 2018 20:15:22 -0700 (PDT) From: Leo Yan To: Wei Xu , Arnd Bergmann , Stephen Boyd , Jassi Brar , Leo Yan , Kaihua Zhong , Tao Wang , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Guodong Xu , Haojian Zhuang Subject: [PATCH 5/5] hisi: Consolidate the Kconfigs for the CLOCK_STUB and the MAILBOX Date: Wed, 4 Apr 2018 11:14:35 +0800 Message-Id: <1522811675-12741-6-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522811675-12741-1-git-send-email-leo.yan@linaro.org> References: <1522811675-12741-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Signed-off-by: Daniel Lezcano --- arch/arm64/configs/defconfig | 1 - drivers/clk/hisilicon/Kconfig | 13 ++++++++----- drivers/mailbox/Kconfig | 12 ++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) -- 1.9.1 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