Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp13573imm; Mon, 14 May 2018 19:57:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoWkFdcS9wwM6NuQ9Jb3cBybcvQ+/GDUndxldkiDsXPGR5JXh/sJErq2ZyVScf85Yu7Lrye X-Received: by 2002:a17:902:7283:: with SMTP id d3-v6mr12660552pll.192.1526353047876; Mon, 14 May 2018 19:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526353047; cv=none; d=google.com; s=arc-20160816; b=aKqJK8jwlFjpLA2pMCuAPN9NPF3E4zZs0hbTdYSG9Q9Sci8/6Sf6G9iNhiuwsNSMXe Nx1Ttde4ZinV5LcyC0jq+sGnkUCqSgonrdF7v/TnrcJp35GhJaps7O2TmDmYlQ6VVoIm HPxy+TcAgsBgmkIgq5Bp56TTCtSiEUoRT6HV9uFYAKbGmsxAUAk9ELvXdM+DcldrtPlZ rIFCvgp3ShSOIpLJOjWGUu1b/bB8Yr8Bk1hNKqZbm771yTNxnEjNOlpW/NSX0whp14XK niwX5NHFpa8Skk3h9gw3IjHAw25QALuMBcFycrPydcfVcR/R6ymM9KX+JZNcgvWKb6oF tj9A== 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=IEIsuNaJhXQfArUlMB/E93Xi0PJrMMJmkXMa6x59zP4=; b=Gnii65jshWUWy9/Lk0c2oFMBs9LkD8VejLGqvRifz67dU9I/ROwgKfVqhD2gR6izFt bClCrWSpqPmWXNCoDx0PyOGDEVX/3k8N5uFdZyAOThQtEcuqsycxmQAJN3SCXyGTDnfG N36vZ/LJyW3ktuNtUS5fVoGnToIv6XakVRokznk7solwqsrK3cK+od+8r9YVeAPWyojJ IqfLNAFgBFYLWLk7Ed7djsENGJO2hQEhdoSh0dfSdGeqKQHmAsr35UP8q7/IatR3AbxG ++jmz9ZeQ8NJHk95Nmc+6ruk+vRJgk/cstfKz3JE5crkMj/5mN0Yu8DEGMK9G+tShuqD D2jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QyStd+Ca; 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 h91-v6si5626184pld.132.2018.05.14.19.57.13; Mon, 14 May 2018 19:57:27 -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=QyStd+Ca; 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 S1752498AbeEOCz1 (ORCPT + 99 others); Mon, 14 May 2018 22:55:27 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:38784 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752232AbeEOCzY (ORCPT ); Mon, 14 May 2018 22:55:24 -0400 Received: by mail-pf0-f193.google.com with SMTP id o76-v6so6949274pfi.5 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=c2JI6j64dFBH6kPElrYb2MmN3IvzzDkQ+WJzAg+4Vbl8KjA5J0CcTefyymB03YxKzr 1vU4QQGs6ruRI56P1qGOuhdetV9dvpxjRoKrhILJDP3tpGM7JhAH15C9Luw5YPrnFqSA WJHVqucSO3hx9FqW7wo37wcJA/7CmXzuIUZl+kiX6e1SqJxFwjBmDSafE96chXYAL13p N10q1YvPpw409RO9vfMpov3hYzZJv/Fgb/QxoFzIbrGKWaafl4EJxQo9DUtevnxA5Ogd h2+Yy6Duql9vyTDNDdAssiQJDGChZulZz7Yil9Ld5RfzxeoH2OehqaBSV1tD+tQiIUel Xgag== X-Gm-Message-State: ALKqPwdsPB6cVH37EutYM5ot0bjtmOw1wyinZ6AZV11e66kYT7Y/Sw0o W2hoQ/fBBu71byGcLmzqJlsIAw== 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-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. 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 -- 1.9.1