]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
net: gem: Enable CTRL+C in wait_for_bit
authorMichal Simek <michal.simek@xilinx.com>
Thu, 24 Sep 2015 18:13:45 +0000 (20:13 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 7 Dec 2015 09:14:29 +0000 (10:14 +0100)
Enable to break waiting loop at any time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/zynq_gem.c

index 0ee909c97fdfa91499eb60648e4d59a775c5faa0..0a41281e901d303b552ee5a20a453fd5578d9cca 100644 (file)
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <config.h>
+#include <console.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <phy.h>
@@ -469,6 +470,11 @@ static int wait_for_bit(const char *func, u32 *reg, const u32 mask,
                if (get_timer(start) > timeout)
                        break;
 
+               if (ctrlc()) {
+                       puts("Abort\n");
+                       return -EINTR;
+               }
+
                udelay(1);
        }