From patchwork Thu Jan 11 14:39:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 124235 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp769070qgn; Thu, 11 Jan 2018 06:39:39 -0800 (PST) X-Google-Smtp-Source: ACJfBouEMS5oyRyvxnVTiX1HG95kq2uEcFbkiLPGv3fl+NxGFo7YivLIxPT5YnWsaXEYqI0PFPSu X-Received: by 10.98.141.141 with SMTP id p13mr20236801pfk.185.1515681578892; Thu, 11 Jan 2018 06:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515681578; cv=none; d=google.com; s=arc-20160816; b=Kk85GthnsThLpS4+eFsTubHMPtQAScEIk38UzRP0V4e0FFKBUvyb39ITaWAg0mzhJh AM6MY/n4+/ZeVZuedlYdZdZZN1jDWArzBu+4FrOSzi44M2TPdmTwYh9iUlOhW5qEjdcC FTSGBsPKltxeBHMEXARbos3FK+ANUJbaMSe/hsdoRwRvWEdIQ3EG/1W42UVM6HR0PtWi ThiC1I45aBECZWhEjHXABwEQfMZfy7bmqHpT3sPv1ZRPIud34NO46yzM1DVGtCyng/KA tHG5nWvui4rBi9qTwdiryUDNXxZdb0UK+m9CSWqY019dofpvzTBHM9PSP3qpkxwr5wPQ /djg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=oJVkSwOGmeSPofbZ3mTVmrqgRg+x8ZH+IYVl7GcDytQ=; b=Iv+NWtKl5pt+ecks92c/dGKVT9g6wVp1AgHxEEaqsjMh1+vPK0T9Q1JCcktHt6/sf9 33gPjx/xsUpSA+t3VEpcGEUTJyNPvew3vBT+FOcI4iMFfgPOfYHK18rlnN/vUjTH6bOD 5mkI8RLqZDQu9iNWvx6BL3BQoMofTogV3pXQ3I7A+PzCAp5N4C/VZkr7wp2Dq20Q7d0a CoO52uMnA9dZQukaEvQzfIDv5FDsiJ9wcaYIDAsTdZGkV+t0rAQQYvhOd0R9jbY+BKnq F57vPSIhlh+tH7ANA66zJo6xd2xfDNGzX2HPhrc3v1AV4flwqnRTqq4alH0+v3S6/9uq tBPA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64si13532463pfp.251.2018.01.11.06.39.38; Thu, 11 Jan 2018 06:39:38 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934327AbeAKOjh (ORCPT + 28 others); Thu, 11 Jan 2018 09:39:37 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60784 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932986AbeAKOjf (ORCPT ); Thu, 11 Jan 2018 09:39:35 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 524631529; Thu, 11 Jan 2018 06:39:35 -0800 (PST) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CCC3A3F41F; Thu, 11 Jan 2018 06:39:33 -0800 (PST) From: Sudeep Holla To: linux-kernel@vger.kernel.org Cc: Sudeep Holla , Arnd Bergmann , Olof Johansson , Brian Norris , Gregory Fong , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com Subject: [PATCH -next] soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms Date: Thu, 11 Jan 2018 14:39:24 +0000 Message-Id: <1515681564-24007-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently if this driver is included, we get the following warning on any platforms irrespective of whether it's brcmstb platform or not. " brcmstb: biuctrl: missing BIU control node brcmstb: biuctrl: MCP: Unable to disable write pairing! " This patch allows to exit early without any warning messages on non brcmstb platforms as it's meaningless for them. Cc: Brian Norris Cc: Gregory Fong Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Sudeep Holla --- drivers/soc/bcm/brcmstb/biuctrl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) Hi, I am seeing these messages on my Juno platform when running -next Regards, Sudeep -- 2.7.4 diff --git a/drivers/soc/bcm/brcmstb/biuctrl.c b/drivers/soc/bcm/brcmstb/biuctrl.c index 2b23ae7b5e9b..0d0c6131ac0e 100644 --- a/drivers/soc/bcm/brcmstb/biuctrl.c +++ b/drivers/soc/bcm/brcmstb/biuctrl.c @@ -162,17 +162,11 @@ static void __init mcp_b53_set(void) cbc_writel(reg, CPU_WRITEBACK_CTRL_REG); } -static int __init setup_hifcpubiuctrl_regs(void) +static int __init setup_hifcpubiuctrl_regs(struct device_node *np) { - struct device_node *np, *cpu_dn; + struct device_node *cpu_dn; int ret = 0; - np = of_find_compatible_node(NULL, NULL, "brcm,brcmstb-cpu-biu-ctrl"); - if (!np) { - pr_err("missing BIU control node\n"); - return -ENODEV; - } - cpubiuctrl_base = of_iomap(np, 0); if (!cpubiuctrl_base) { pr_err("failed to remap BIU control base\n"); @@ -243,8 +237,13 @@ static struct syscore_ops brcmstb_cpu_credit_syscore_ops = { static int __init brcmstb_biuctrl_init(void) { int ret; + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "brcm,brcmstb-cpu-biu-ctrl"); + if (!np) + return -ENODEV; - setup_hifcpubiuctrl_regs(); + setup_hifcpubiuctrl_regs(np); ret = mcp_write_pairing_set(); if (ret) {