Merge branch 'master' of /home/wd/git/u-boot/custodians
[oweals/u-boot.git] / board / mp2usb / mp2usb.c
index b22f2e19a5b9349533d07da22d0a3db5a3841f51..dcda699dc876877d26b24220be9e289624c77c85 100644 (file)
 
 #include <common.h>
 #include <asm/arch/AT91RM9200.h>
+#include <at91rm9200_net.h>
+#include <dm9161.h>
 #include <asm/mach-types.h>
 
-/* ------------------------------------------------------------------------- */
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * Miscelaneous platform dependent initialisations
  */
 
 int board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        /* Enable Ctrlc */
        console_init_f ();
 
@@ -54,9 +55,31 @@ int board_init (void)
 
 int dram_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        gd->bd->bi_dram[0].start = PHYS_SDRAM;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
        return 0;
 }
+
+#ifdef CONFIG_DRIVER_ETHER
+#if defined(CONFIG_CMD_NET)
+
+/*
+ * Name:
+ *     at91rm9200_GetPhyInterface
+ * Description:
+ *     Initialise the interface functions to the PHY
+ * Arguments:
+ *     None
+ * Return value:
+ *     None
+ */
+void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
+{
+       p_phyops->Init = dm9161_InitPhy;
+       p_phyops->IsPhyConnected = dm9161_IsPhyConnected;
+       p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed;
+       p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
+}
+
+#endif
+#endif /* CONFIG_DRIVER_ETHER */