[U-Boot] [PATCH] net: gem: Enable CTRL+C in wait_for_bit

Michal Simek michal.simek at xilinx.com
Thu Nov 26 10:46:49 CET 2015


Enable to break waiting loop at any time.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 drivers/net/zynq_gem.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 858093f0d7e2..ee4169107e5b 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -447,6 +447,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 -1;
+		}
+
 		udelay(1);
 	}
 
-- 
1.9.1



More information about the U-Boot mailing list