Commit e23a90eb authored by Florian Fainelli's avatar Florian Fainelli Committed by Ralf Baechle

MIPS: BCM63xx: Register SSB SPROM fallback in board's first stage callback

Signed-off-by: default avatarFlorian Fainelli <ffainelli@freebox.fr>
To: Maxime Bizon <mbizon@freebox.fr>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1017/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 4fe67e44
...@@ -716,6 +716,17 @@ void __init board_prom_init(void) ...@@ -716,6 +716,17 @@ void __init board_prom_init(void)
} }
bcm_gpio_writel(val, GPIO_MODE_REG); bcm_gpio_writel(val, GPIO_MODE_REG);
/* Generate MAC address for WLAN and
* register our SPROM */
#ifdef CONFIG_SSB_PCIHOST
if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
if (ssb_arch_set_fallback_sprom(&bcm63xx_sprom) < 0)
printk(KERN_ERR "failed to register fallback SPROM\n");
}
#endif
} }
/* /*
...@@ -869,17 +880,6 @@ int __init board_register_devices(void) ...@@ -869,17 +880,6 @@ int __init board_register_devices(void)
if (board.has_dsp) if (board.has_dsp)
bcm63xx_dsp_register(&board.dsp); bcm63xx_dsp_register(&board.dsp);
/* Generate MAC address for WLAN and
* register our SPROM */
#ifdef CONFIG_SSB_PCIHOST
if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
if (ssb_arch_set_fallback_sprom(&bcm63xx_sprom) < 0)
printk(KERN_ERR "failed to register fallback SPROM\n");
}
#endif
/* read base address of boot chip select (0) */ /* read base address of boot chip select (0) */
if (BCMCPU_IS_6345()) if (BCMCPU_IS_6345())
val = 0x1fc00000; val = 0x1fc00000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment