]> git.sur5r.net Git - u-boot/blobdiff - board/cmc_pu2/cmc_pu2.c
Adjust filenames for USB update images on TRAB board.
[u-boot] / board / cmc_pu2 / cmc_pu2.c
index b5e5e288922003f2cb8a2eeaed93cb57bbe4f9b2..9ae3c42be50685ef92ff5e78f348348b08a68991 100644 (file)
 #include <common.h>
 #include <asm/mach-types.h>
 #include <asm/arch/AT91RM9200.h>
+#include <at91rm9200_net.h>
+#include <dm9161.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 /* ------------------------------------------------------------------------- */
 /*
@@ -43,7 +47,6 @@ int hw_detect (void);
 
 int board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        AT91PS_PIO piob = AT91C_BASE_PIOB;
        AT91PS_PIO pioc = AT91C_BASE_PIOC;
 
@@ -107,8 +110,6 @@ 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;
@@ -152,3 +153,27 @@ int hw_detect (void)
                return ((pio->PIO_PDSR & AT91C_PIO_PB13)
                        ? CMC_HP_BASIC : CMC_BASIC);
 }
+
+#ifdef CONFIG_DRIVER_ETHER
+#if (CONFIG_COMMANDS & CFG_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 /* CONFIG_COMMANDS & CFG_CMD_NET */
+#endif /* CONFIG_DRIVER_ETHER */