[brcm63xx] register SSB sprom after ethernet devices
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 22 Jun 2011 12:32:03 +0000 (12:32 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 22 Jun 2011 12:32:03 +0000 (12:32 +0000)
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

target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-2.6.39/452-board_V2500V.patch
target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch
target/linux/brcm63xx/patches-3.0/260-ssb_sprom_mac_pool.patch [new file with mode: 0644]
target/linux/brcm63xx/patches-3.0/452-board_V2500V.patch

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 (file)
index 0000000..70711ec
--- /dev/null
@@ -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();
index 91cb629..3028865 100644 (file)
@@ -95,7 +95,7 @@
  
        /* dump cfe version */
        cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
  
        /* dump cfe version */
        cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
-@@ -2263,6 +2337,14 @@ int __init board_register_devices(void)
+@@ -2264,6 +2338,14 @@ int __init board_register_devices(void)
                val = bcm_mpi_readl(MPI_CSBASE_REG(0));
                val &= MPI_CSBASE_BASE_MASK;
        }
                val = bcm_mpi_readl(MPI_CSBASE_REG(0));
                val &= MPI_CSBASE_BASE_MASK;
        }
index 349e5f5..c4dc287 100644 (file)
@@ -18,7 +18,7 @@
  #endif
  
  /*
  #endif
  
  /*
-@@ -2328,8 +2339,9 @@ void __init board_prom_init(void)
+@@ -2407,8 +2418,9 @@ int __init board_register_devices(void)
        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 (!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);
@@ -29,7 +29,7 @@
 +                      printk(KERN_ERR PFX "failed to register fallback SPROM\n");
        }
  #endif
 +                      printk(KERN_ERR PFX "failed to register fallback SPROM\n");
        }
  #endif
- }
 --- a/drivers/ssb/pci.c
 +++ b/drivers/ssb/pci.c
 @@ -662,7 +662,6 @@ static int sprom_extract(struct ssb_bus
 --- a/drivers/ssb/pci.c
 +++ b/drivers/ssb/pci.c
 @@ -662,7 +662,6 @@ static int sprom_extract(struct ssb_bus
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 (file)
index 0000000..2b4e3e0
--- /dev/null
@@ -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();
index 594467e..210008a 100644 (file)
@@ -95,7 +95,7 @@
  
        /* dump cfe version */
        cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
  
        /* 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;
        }
                val = bcm_mpi_readl(MPI_CSBASE_REG(0));
                val &= MPI_CSBASE_BASE_MASK;
        }
This page took 0.026466 seconds and 4 git commands to generate.