]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/ppc/boot/simple/embed_config.c
Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux...
[mirror_ubuntu-artful-kernel.git] / arch / ppc / boot / simple / embed_config.c
index 491a691d10ccabb007b73f8b34de4dbc4f246f2e..3b46792d7b8b45c66b6e302a8b4611e12b4ce23f 100644 (file)
@@ -8,7 +8,6 @@
  */
 
 #include <linux/types.h>
-#include <linux/config.h>
 #include <linux/string.h>
 #include <asm/reg.h>
 #ifdef CONFIG_8xx
@@ -21,6 +20,9 @@
 #ifdef CONFIG_40x
 #include <asm/io.h>
 #endif
+#ifdef CONFIG_XILINX_VIRTEX
+#include <platforms/4xx/xparameters/xparameters.h>
+#endif
 extern unsigned long timebase_period_ns;
 
 /* For those boards that don't provide one.
@@ -742,7 +744,7 @@ embed_config(bd_t **bdp)
 }
 #endif /* WILLOW */
 
-#ifdef CONFIG_XILINX_ML300
+#if defined(CONFIG_XILINX_ML300) || defined(CONFIG_XILINX_ML403)
 void
 embed_config(bd_t ** bdp)
 {
@@ -750,7 +752,9 @@ embed_config(bd_t ** bdp)
        static const unsigned long congruence_classes = 256;
        unsigned long addr;
        unsigned long dccr;
+       uint8_t* cp;
        bd_t *bd;
+       int i;
 
        /*
         * Invalidate the data cache if the data cache is turned off.
@@ -776,10 +780,16 @@ embed_config(bd_t ** bdp)
        bd->bi_intfreq = XPAR_CORE_CLOCK_FREQ_HZ;
        bd->bi_busfreq = XPAR_PLB_CLOCK_FREQ_HZ;
        bd->bi_pci_busfreq = XPAR_PCI_0_CLOCK_FREQ_HZ;
+
+       /* Copy the default ethernet address */
+       cp = (u_char *)def_enet_addr;
+       for (i=0; i<6; i++)
+               bd->bi_enetaddr[i] = *cp++;
+
        timebase_period_ns = 1000000000 / bd->bi_tbfreq;
        /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */
 }
-#endif /* CONFIG_XILINX_ML300 */
+#endif /* CONFIG_XILINX_ML300 || CONFIG_XILINX_ML403 */
 
 #ifdef CONFIG_IBM_OPENBIOS
 /* This could possibly work for all treeboot roms.