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: 10399827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B04C3601F9 for ; Tue, 15 May 2018 02:58:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FAF6284BD for ; Tue, 15 May 2018 02:58:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44081284F5; Tue, 15 May 2018 02:58:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CE574284BD for ; Tue, 15 May 2018 02:58:45 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=jNCQ30IVWbOwd6/24UsDb6kWa3vqYiT9kbdT4y2tCAs=; b=QMFGgfE3PCXx4Zp/zOk3u0VtQG 4DMpV5DDVqq8h2PNLpJV1uNWk/EVhIZNPcAp88P0ZlWiqyFlq97+e8kGkEoWcE0/tDPuNArgUFGvt QCBhWzCoR61kleLw+ngzq8efYv3W568vjXyFbnZm85d6NjXGqxkmjQ/4YsqpmPzBib2kti9AT3687 hHODNbMQWBljeDlIXx7KlWk5PDqhzkHYi8O/X4MdUOHuS7dvPEhnnuXZ9rPvkQG4w1V5OpKp/xp3h uAeOa4HET7c5Nw3kWQI0f/xe5u/TY2WYqLIuemYRUEFNRxWxHBXmCaMVUguBTF6llggFK+2nFLITV vh5H2BoQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIQAa-0002So-St; Tue, 15 May 2018 02:58:32 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIQ7j-0000Xs-OZ for linux-arm-kernel@lists.infradead.org; Tue, 15 May 2018 02:55:57 +0000 Received: by mail-pf0-x241.google.com with SMTP id p14-v6so6949520pfh.9 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=URL0x6TSCcTNcXR7Prbom20U6gFpbA2Qy+BQp1Xb1Uj+zBqKyW1FbU8wItaIoiawVF Kl98ByOgrI/CEcBhXu8c73Lz8CVDmiAekOMfhR1V+tJ2N0/tgMgKknmHtu+aXIVvj9s+ u35hUyi6OvOCWVqoOzSpLTesztwG/sXN4DdXEGZuRMsi/pwU+SvWi7JYPPi8tioHcHL3 6HjSaOYXiZuyKzuOVd1kVNgZ7u0NlMAOTz3AYugBBIyhv7zrmIQNsTQ62/rSBfoxVWoF VmaSQQd9FzotytuMFzFMW0EOPaqE+ucrz9rm/LNVo9pxuzaz7ka2EwJSnGpbG/Socvz1 gvYg== X-Gm-Message-State: ALKqPwfFPl8pHCl8tCD3nwCUjSrpHVtoJKkzMeQDyudu3WRkUJNJJlrr v1wNiMXQG/bH5H+qhGOhB7kY4gtiQM8= X-Google-Smtp-Source: AB8JxZq6838t9IfWxG5pqiZAWzEUTgdlyUZ9cjffuC9YJnMYq48ssz1W9vU7yNA4P0XA3JiIiai9pQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180514_195535_827134_920A8A84 X-CRM114-Status: GOOD ( 17.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Yan MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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