From patchwork Fri Jan 12 21:08:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 124379 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2507054qgn; Fri, 12 Jan 2018 13:08:33 -0800 (PST) X-Google-Smtp-Source: ACJfBoscsMRYbXmIuLBcMhHVC9pWXIrARLEiDZNvaTZUJlCIeQIoLjEVOcLRI5+cV3DncF3jXpzA X-Received: by 10.101.102.7 with SMTP id w7mr21374441pgv.366.1515791312977; Fri, 12 Jan 2018 13:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515791312; cv=none; d=google.com; s=arc-20160816; b=XC9kGstv2WJUoHJeuxWyB7az0vwrDlxceHrGkuD2RMWXOHw5RAbf0kg2Xpaf5eNKvu Bdk80aelgaqIhxKDs6FZi0x4EPFZO6rxvdKrRXbgyD552cCEQktRLyNvE7OfuKorZssV qZvxq3E8dFNExt5UXXmS94YGbnD6hTSJ5VgoL9e1IRRjebU90nsgPk93B9u3LGrRkNM9 0MNV2Q5oQiXByw6n9Jd7Ysp1dJKnvieXM3yufMNKntl9hmiYtzwINCVFtFrk+L/6BMIU WUHx3k4VDnkxxc1BWbvufDDa0eRB5etHZZSBQ438R3gQKEkddX7FfaadJohpInYHaUtZ BydA== 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=1RnIsGakVfAytnRWnAOxgPFzjk2t8sqHu2ZyF3pExL8=; b=LEMfgEba6GzZT7Hrb/e8cZbwA82YJRZPoy5Swih2hKOInzSnhQGWf1ejVX/FunU1v2 8i2EySgXbUsNUOD/2RSa6bPq8edaDU7mw09648MMFyGn+F0ykYOQYOYK85MqEu7jCRje SdL2vqaLylNJn4zECExYzXqguZ8s78CYA4prd2pcoLGfFvcnkeJbNvA6jKt5j6jkuKR4 p7TzuAOC63EoOepUEuLp5EpImbWA/fCnJnZ/kmFXKXHvHpU+gxYW1ldscA4oxHuJR+Az DCYJaKMRHqeUTQDHjydPX9c2VjzMICyZvKaOKIcQ8bv5CDyl8u3sM0tCov3ob29OWKax V7KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TAWTuPAB; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf3si3596226plb.700.2018.01.12.13.08.32; Fri, 12 Jan 2018 13:08:32 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TAWTuPAB; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965268AbeALVIa (ORCPT + 28 others); Fri, 12 Jan 2018 16:08:30 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:39926 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964976AbeALVI0 (ORCPT ); Fri, 12 Jan 2018 16:08:26 -0500 Received: by mail-wr0-f195.google.com with SMTP id z48so6397660wrz.6 for ; Fri, 12 Jan 2018 13:08:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1RnIsGakVfAytnRWnAOxgPFzjk2t8sqHu2ZyF3pExL8=; b=TAWTuPABBwm6ptz8cIyGwy1bFYN92cl3MAheyUQkiCDvh8Jv0t11rZsxJEAiED0dNb 7j7sVgO1Rg2Jv15hm+UNOXN59eUii8qixnwuliQMupZcBA5cQE5CNqFIjt5WWU1ovg2J Bl73F5f7QZE2f7+MlbzUG8fxjtdSvYuOUg+p0irbZd/sfKAGXNhXp2DfPN3d3D9KqEJ6 UVkYqAumSt/aOmxg2VuOmX85wO2pUoNyJhrQbrcmAa26fX2BkePqc+EN0Hig1JBTobEI ucy0VS79GnfjKznRJd3n78UitkIcXBnKUxmXLsluJSMT0aZQeWrNVvLP3HZK3kNXsn30 CUiA== 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=1RnIsGakVfAytnRWnAOxgPFzjk2t8sqHu2ZyF3pExL8=; b=rliysqjEQJQwpFL3NQnXmTWptFQ7gCm4+LggcrYJMXTdoVVJa9Wq3RUHOVHD8UPK7+ z5pC3hJPVLRbKjlUVI1Te4WK52ZGYMy52Qj2pcZUV89dgJQ0H9MJwAdXlgo9GO/hjZPm pVSK++a2cp6wqjE/0OFwA2y1CcLExndW7QzlQUdXK4M0va5+no6NsQXbU3WkSJdkPLP3 ZiAAg55EzhfWj5GAeaMfEVqIWaYl+P/PdhDYtV7AL+T/7YOYE3EbNieRgHhJxDfSfTrA t04mc4q13Tiqp8TmZBPVLTNI/HoO5HLDl+w6s2f4zCuq2nylSK4+yqNqBKViq/B8Uhfw Iw5Q== X-Gm-Message-State: AKGB3mKdjOASmjQNSSNH6xnFDZWgmJYCWUMv9aZHd1oRH6p61m5JLmHU BgYt8QeDRpV1ivNpDHo454o= X-Received: by 10.223.198.1 with SMTP id n1mr21766883wrg.153.1515791304925; Fri, 12 Jan 2018 13:08:24 -0800 (PST) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id n4sm12103561wrg.25.2018.01.12.13.08.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jan 2018 13:08:24 -0800 (PST) From: Florian Fainelli To: arm@kernel.org Cc: thierry.reding@gmail.com, sudeep.holla@arm.com, Brian Norris , Gregory Fong , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms Date: Fri, 12 Jan 2018 13:08:14 -0800 Message-Id: <20180112210815.9684-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180112210815.9684-1-f.fainelli@gmail.com> References: <20180112210815.9684-1-f.fainelli@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sudeep Holla 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 Fixes: f780429adfbc ("soc: brcmstb: biuctrl: Move to early_initcall") Signed-off-by: Sudeep Holla [florian: Add fixes tag, make initcall non fatal] Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) -- 2.14.1 diff --git a/drivers/soc/bcm/brcmstb/biuctrl.c b/drivers/soc/bcm/brcmstb/biuctrl.c index 2b23ae7b5e9b..6d89ebf13b8a 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"); @@ -242,9 +236,17 @@ static struct syscore_ops brcmstb_cpu_credit_syscore_ops = { static int __init brcmstb_biuctrl_init(void) { + struct device_node *np; int ret; - setup_hifcpubiuctrl_regs(); + /* We might be running on a multi-platform kernel, don't make this a + * fatal error, just bail out early + */ + np = of_find_compatible_node(NULL, NULL, "brcm,brcmstb-cpu-biu-ctrl"); + if (!np) + return 0; + + setup_hifcpubiuctrl_regs(np); ret = mcp_write_pairing_set(); if (ret) {