From: Alexey Brodkin Date: Tue, 13 Jan 2015 14:10:24 +0000 (+0300) Subject: net/designware: add error message on DMA reset timeout X-Git-Tag: v2015.04-rc1~5^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=875143f32428b8317a2b890b34a1eeb31cbf8a53;p=oweals%2Fu-boot.git net/designware: add error message on DMA reset timeout If for some reason DMA module fails to reset user oserves only this: --->--- # dhcp Trying dwmac.e0018000 FAIL --->--- This message makes not much sense. With proposed change error message will be more helpful: --->--- # dhcp Trying dwmac.e0018000 DMA reset timeout FAIL --->--- For example user may do power toggle to recover board functionality. Signed-off-by: Alexey Brodkin Cc: Chin Liang See Cc: Dinh Nguyen Cc: Albert Aribaud Cc: Tom Rini Cc: Wolfgang Denk Cc: Pavel Machek Cc: Joe Hershberger Cc: Ian Campbell Cc: Marek Vasut Reviewed-by: Tom Rini Acked-by: Pavel Machek Acked-by: Joe Hershberger Signed-off-by: Joe Hershberger --- diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 9ded8950b8..c03e935e2f 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -236,8 +236,10 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis) start = get_timer(0); while (readl(&dma_p->busmode) & DMAMAC_SRST) { - if (get_timer(start) >= CONFIG_MACRESET_TIMEOUT) + if (get_timer(start) >= CONFIG_MACRESET_TIMEOUT) { + printf("DMA reset timeout\n"); return -1; + } mdelay(100); };