summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/patches-3.0
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2011-06-22 12:32:03 +0000
committerFlorian Fainelli <florian@openwrt.org>2011-06-22 12:32:03 +0000
commitf6e4eb15bc7b5991a484370ae3765eb79becea4b (patch)
tree8839ac68a6af6f6e8ea4e59190b0bfb2f1795cbc /target/linux/brcm63xx/patches-3.0
parentcda35d2ef2ba813d93e38c61539a70d3e0727048 (diff)
downloadmtk-20170518-f6e4eb15bc7b5991a484370ae3765eb79becea4b.zip
mtk-20170518-f6e4eb15bc7b5991a484370ae3765eb79becea4b.tar.gz
mtk-20170518-f6e4eb15bc7b5991a484370ae3765eb79becea4b.tar.bz2
register SSB sprom after ethernet devices
In case the MAC address pool is not big enough to also register a SSB SPROM prefer registering the Ethernet devices. SVN-Revision: 27258
Diffstat (limited to 'target/linux/brcm63xx/patches-3.0')
-rw-r--r--target/linux/brcm63xx/patches-3.0/260-ssb_sprom_mac_pool.patch41
-rw-r--r--target/linux/brcm63xx/patches-3.0/452-board_V2500V.patch2
2 files changed, 42 insertions, 1 deletions
diff --git a/target/linux/brcm63xx/patches-3.0/260-ssb_sprom_mac_pool.patch b/target/linux/brcm63xx/patches-3.0/260-ssb_sprom_mac_pool.patch
new file mode 100644
index 0000000..2b4e3e0
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.0/260-ssb_sprom_mac_pool.patch
@@ -0,0 +1,41 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -867,18 +867,6 @@ void __init board_prom_init(void)
+ }
+
+ 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_register_fallback_sprom(
+- &bcm63xx_get_fallback_sprom) < 0)
+- printk(KERN_ERR PFX "failed to register fallback SPROM\n");
+- }
+-#endif
+ }
+
+ /*
+@@ -958,6 +946,19 @@ int __init board_register_devices(void)
+ !board_get_mac_address(board.enet1.mac_addr))
+ bcm63xx_enet_register(1, &board.enet1);
+
++ /* Generate MAC address for WLAN and
++ * register our SPROM, do this after registering enet devices
++ */
++#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_register_fallback_sprom(
++ &bcm63xx_get_fallback_sprom) < 0)
++ printk(KERN_ERR PFX "failed to register fallback SPROM\n");
++ }
++#endif
++
+ if (board.has_ehci0)
+ bcm63xx_ehci_register();
+
diff --git a/target/linux/brcm63xx/patches-3.0/452-board_V2500V.patch b/target/linux/brcm63xx/patches-3.0/452-board_V2500V.patch
index 594467e..210008a 100644
--- a/target/linux/brcm63xx/patches-3.0/452-board_V2500V.patch
+++ b/target/linux/brcm63xx/patches-3.0/452-board_V2500V.patch
@@ -95,7 +95,7 @@
/* dump cfe version */
cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
-@@ -2275,6 +2349,14 @@ int __init board_register_devices(void)
+@@ -2276,6 +2350,14 @@ int __init board_register_devices(void)
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
val &= MPI_CSBASE_BASE_MASK;
}