Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: brcmstb: biuctrl: Move to early_initcall

Being called during early_initcall() is early enough that it occurs
before SMP initialization, which is all we care about for the Bus
Interface Unit configuration.

This solves lack of BIU initialization on ARM64 platforms where we do
not have an anchor where to put the BIU initialization (since there are
no machine descriptors).

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

+4 -10
-2
arch/arm/mach-bcm/brcmstb.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/irqchip.h> 16 16 #include <linux/of_platform.h> 17 - #include <linux/soc/brcmstb/brcmstb.h> 18 17 19 18 #include <asm/mach-types.h> 20 19 #include <asm/mach/arch.h> ··· 37 38 static void __init brcmstb_init_irq(void) 38 39 { 39 40 irqchip_init(); 40 - brcmstb_biuctrl_init(); 41 41 } 42 42 43 43 static const char *const brcmstb_match[] __initconst = {
+4 -2
drivers/soc/bcm/brcmstb/biuctrl.c
··· 240 240 #endif 241 241 242 242 243 - void __init brcmstb_biuctrl_init(void) 243 + static int __init brcmstb_biuctrl_init(void) 244 244 { 245 245 int ret; 246 246 ··· 249 249 ret = mcp_write_pairing_set(); 250 250 if (ret) { 251 251 pr_err("MCP: Unable to disable write pairing!\n"); 252 - return; 252 + return ret; 253 253 } 254 254 255 255 mcp_b53_set(); 256 256 #ifdef CONFIG_PM_SLEEP 257 257 register_syscore_ops(&brcmstb_cpu_credit_syscore_ops); 258 258 #endif 259 + return 0; 259 260 } 261 + early_initcall(brcmstb_biuctrl_init);
-6
include/linux/soc/brcmstb/brcmstb.h
··· 13 13 } 14 14 15 15 /* 16 - * Bus Interface Unit control register setup, must happen early during boot, 17 - * before SMP is brought up, called by machine entry point. 18 - */ 19 - void brcmstb_biuctrl_init(void); 20 - 21 - /* 22 16 * Helper functions for getting family or product id from the 23 17 * SoC driver. 24 18 */