mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms
@ 2018-01-11 14:39 Sudeep Holla
  2018-01-12  0:11 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Sudeep Holla @ 2018-01-11 14:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Sudeep Holla, Arnd Bergmann, Olof Johansson, Brian Norris,
	Gregory Fong, Florian Fainelli, bcm-kernel-feedback-list

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
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 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

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) {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-12  0:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11 14:39 [PATCH -next] soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms Sudeep Holla
2018-01-12  0:11 ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®