]> git.sur5r.net Git - u-boot/blobdiff - board/kb9202/kb9202.c
Merge with /home/tur/git/u-boot#cm5200-si
[u-boot] / board / kb9202 / kb9202.c
index bab642657bf6f3f2a38bf3f62da871679a553ecc..59ed8ff6042b93ba3bb2db3c2d6ebb0a0e0b4534 100644 (file)
  */
 
 /*
- * Adatped for KwikByte KB920x board from at91rm9200dk.c: 22APR2005
+ * Adapted for KwikByte KB920x board from at91rm9200dk.c: 22APR2005
  */
 
 #include <common.h>
 #include <asm/arch/AT91RM9200.h>
+#include <at91rm9200_net.h>
+#include <lxt971a.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
-/* ------------------------------------------------------------------------- */
 /*
  * Miscelaneous platform dependent initialisations
  */
@@ -40,8 +43,6 @@ void lowlevel_init(void) {
 
 int board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        /* Enable Ctrlc */
        console_init_f ();
 
@@ -58,9 +59,36 @@ 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)
+
+unsigned int lxt972_IsPhyConnected (AT91PS_EMAC p_mac);
+UCHAR lxt972_GetLinkSpeed (AT91PS_EMAC p_mac);
+UCHAR lxt972_InitPhy (AT91PS_EMAC p_mac);
+UCHAR lxt972_AutoNegotiate (AT91PS_EMAC p_mac, int *status);
+
+/*
+ * 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 = lxt972_InitPhy;
+       p_phyops->IsPhyConnected = lxt972_IsPhyConnected;
+       p_phyops->GetLinkSpeed = lxt972_GetLinkSpeed;
+       p_phyops->AutoNegotiate = lxt972_AutoNegotiate;
+}
+
+#endif
+#endif /* CONFIG_DRIVER_ETHER */