diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-06-22 12:32:03 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-06-22 12:32:03 +0000 |
commit | cf43489095c884def873116491fcd311c12c18ee (patch) | |
tree | 532fbdfd4ec80d6ea49c41b9a9f777dfb9ebb0a6 /target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch | |
parent | 0fba51d3bb4a85b38608b84cbb8e1cc86dd571fd (diff) |
[brcm63xx] 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.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27258 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch b/target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch new file mode 100644 index 0000000000..70711ec3ab --- /dev/null +++ b/target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch @@ -0,0 +1,39 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -856,17 +856,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_set_fallback_sprom(&bcm63xx_sprom) < 0) +- printk(KERN_ERR "failed to register fallback SPROM\n"); +- } +-#endif + } + + /* +@@ -946,6 +935,18 @@ 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_set_fallback_sprom(&bcm63xx_sprom) < 0) ++ printk(KERN_ERR "failed to register fallback SPROM\n"); ++ } ++#endif ++ + if (board.has_ehci0) + bcm63xx_ehci_register(); + |