aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2018-01-12 16:08:14 -0500
committerArnd Bergmann <arnd@arndb.de>2018-01-15 09:46:17 -0500
commita78182980a2a0045d5971a656248a62d62237234 (patch)
tree8d9a7fe6631af8b88fc8846af3bdadf2996a0aaf
parentc90801664e0a7e80dfd502a4cef8452dc203ce1f (diff)
soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms
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> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/soc/bcm/brcmstb/biuctrl.c20
1 files 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)
162 cbc_writel(reg, CPU_WRITEBACK_CTRL_REG); 162 cbc_writel(reg, CPU_WRITEBACK_CTRL_REG);
163} 163}
164 164
165static int __init setup_hifcpubiuctrl_regs(void) 165static int __init setup_hifcpubiuctrl_regs(struct device_node *np)
166{ 166{
167 struct device_node *np, *cpu_dn; 167 struct device_node *cpu_dn;
168 int ret = 0; 168 int ret = 0;
169 169
170 np = of_find_compatible_node(NULL, NULL, "brcm,brcmstb-cpu-biu-ctrl");
171 if (!np) {
172 pr_err("missing BIU control node\n");
173 return -ENODEV;
174 }
175
176 cpubiuctrl_base = of_iomap(np, 0); 170 cpubiuctrl_base = of_iomap(np, 0);
177 if (!cpubiuctrl_base) { 171 if (!cpubiuctrl_base) {
178 pr_err("failed to remap BIU control base\n"); 172 pr_err("failed to remap BIU control base\n");
@@ -242,9 +236,17 @@ static struct syscore_ops brcmstb_cpu_credit_syscore_ops = {
242 236
243static int __init brcmstb_biuctrl_init(void) 237static int __init brcmstb_biuctrl_init(void)
244{ 238{
239 struct device_node *np;
245 int ret; 240 int ret;
246 241
247 setup_hifcpubiuctrl_regs(); 242 /* We might be running on a multi-platform kernel, don't make this a
243 * fatal error, just bail out early
244 */
245 np = of_find_compatible_node(NULL, NULL, "brcm,brcmstb-cpu-biu-ctrl");
246 if (!np)
247 return 0;
248
249 setup_hifcpubiuctrl_regs(np);
248 250
249 ret = mcp_write_pairing_set(); 251 ret = mcp_write_pairing_set();
250 if (ret) { 252 if (ret) {