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: 10399813 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 6FF87601C8 for ; Tue, 15 May 2018 02:55:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D3EA200DF for ; Tue, 15 May 2018 02:55:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01A262841D; Tue, 15 May 2018 02:55:28 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52936200DF for ; Tue, 15 May 2018 02:55:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752291AbeEOCz1 (ORCPT ); Mon, 14 May 2018 22:55:27 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33780 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbeEOCzY (ORCPT ); Mon, 14 May 2018 22:55:24 -0400 Received: by mail-pf0-f196.google.com with SMTP id a20-v6so3013206pfo.0 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=YB2gSCX5AZbt9slZGh8LfBJgFB62vsmokwBMcEfNeknqUPQVOGtkmjHVWp1Of9Gv3H fGDS5PGfQl+1OrJbpXXEAJcImwhf6f12mmXPMT3Y3L7qUceNPIZhpDwlqwd12oTsysdv xF5xYFdbM31OZ7us6TXs/c5eRdB1EhljRG0IKlJzt+uCSG5H67VQvRKUC9P+PbFOJemA W8aFYfq9b1Tm5dqUEIpaGInJMrFj3HNulZz7rHa0o3xTOC79MzSNUjL85EJMX6I2YzZz fr8LQ5i6SpYq00ZL4a/V0hS7EnEABnDAaqvj8vee3CeKCInsEIT+dOe2F0okDCIITbij 809Q== X-Gm-Message-State: ALKqPwdVPbsvY6bcbI1rudXQOGhINvV+brf9C5O4B7YjJeIH70VYojt9 NFO1QL1vZ2SwkFzEXAkCEbjLrg== 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 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: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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