Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xx
[oweals/u-boot.git] / drivers / net / mcffec.c
index 2e0ddeb7772a71f9688e8b057ac0332f7ea06d6f..71d19608edeb8c93af200240126ee8197a546343 100644 (file)
 #include <common.h>
 #include <malloc.h>
 
+#ifdef CONFIG_MCFFEC
+
 #include <asm/fec.h>
 #include <asm/immap.h>
 
 #include <command.h>
-#include <config.h>
 #include <net.h>
 #include <miiphy.h>
 
-#ifdef CONFIG_MCFFEC
 #undef ET_DEBUG
 #undef MII_DEBUG
 
@@ -166,6 +166,13 @@ int fec_send(struct eth_device *dev, volatile void *packet, int length)
        /* Activate transmit Buffer Descriptor polling */
        fecp->tdar = 0x01000000;        /* Descriptor polling active    */
 
+       /* FEC fix for MCF5275, FEC unable to initial transmit data packet.
+        * A nop will ensure the descriptor polling active completed.
+        */
+#ifdef CONFIG_M5275
+       __asm__ ("nop");
+#endif
+
 #ifdef CFG_UNIFY_CACHE
        icache_invalid();
 #endif