From: Florian Fainelli <f.fainelli@gmail.com> To: arm@kernel.org Cc: thierry.reding@gmail.com, sudeep.holla@arm.com, Brian Norris <computersforpeace@gmail.com>, Gregory Fong <gregory.0xf0@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, 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 [thread overview] Message-ID: <20180112210815.9684-2-f.fainelli@gmail.com> (raw) In-Reply-To: <20180112210815.9684-1-f.fainelli@gmail.com> From: Sudeep Holla <sudeep.holla@arm.com> 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 <computersforpeace@gmail.com> Cc: Gregory Fong <gregory.0xf0@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: bcm-kernel-feedback-list@broadcom.com Fixes: f780429adfbc ("soc: brcmstb: biuctrl: Move to early_initcall") Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> [florian: Add fixes tag, make initcall non fatal] Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> --- drivers/soc/bcm/brcmstb/biuctrl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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) { -- 2.14.1
WARNING: multiple messages have this Message-ID (diff)
From: f.fainelli@gmail.com (Florian Fainelli) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms Date: Fri, 12 Jan 2018 13:08:14 -0800 [thread overview] Message-ID: <20180112210815.9684-2-f.fainelli@gmail.com> (raw) In-Reply-To: <20180112210815.9684-1-f.fainelli@gmail.com> From: Sudeep Holla <sudeep.holla@arm.com> 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 <computersforpeace@gmail.com> Cc: Gregory Fong <gregory.0xf0@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: bcm-kernel-feedback-list at broadcom.com Fixes: f780429adfbc ("soc: brcmstb: biuctrl: Move to early_initcall") Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> [florian: Add fixes tag, make initcall non fatal] Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> --- drivers/soc/bcm/brcmstb/biuctrl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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) { -- 2.14.1
next prev parent reply other threads:[~2018-01-12 21:08 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-01-12 21:08 [PATCH 0/2] soc: brcmstb: Fix multi-platform issues Florian Fainelli 2018-01-12 21:08 ` Florian Fainelli 2018-01-12 21:08 ` Florian Fainelli [this message] 2018-01-12 21:08 ` [PATCH 1/2] soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms Florian Fainelli 2018-01-12 21:08 ` [PATCH 2/2] soc: bcm: brcmstb: Be multi-platform compatible Florian Fainelli 2018-01-12 21:08 ` Florian Fainelli 2018-01-15 14:47 ` Arnd Bergmann 2018-01-15 14:47 ` Arnd Bergmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180112210815.9684-2-f.fainelli@gmail.com \ --to=f.fainelli@gmail.com \ --cc=arm@kernel.org \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=computersforpeace@gmail.com \ --cc=gregory.0xf0@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=sudeep.holla@arm.com \ --cc=thierry.reding@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.