Module Name: src Committed By: jmcneill Date: Sat Jun 30 18:27:10 UTC 2018
Modified Files: src/sys/arch/arm/rockchip: rk_gmac.c Log Message: Rock64 needs more time for the PHY to reset. Add a delay. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/rockchip/rk_gmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/rockchip/rk_gmac.c diff -u src/sys/arch/arm/rockchip/rk_gmac.c:1.5 src/sys/arch/arm/rockchip/rk_gmac.c:1.6 --- src/sys/arch/arm/rockchip/rk_gmac.c:1.5 Sat Jun 30 18:20:35 2018 +++ src/sys/arch/arm/rockchip/rk_gmac.c Sat Jun 30 18:27:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rk_gmac.c,v 1.5 2018/06/30 18:20:35 jmcneill Exp $ */ +/* $NetBSD: rk_gmac.c,v 1.6 2018/06/30 18:27:10 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill <jmcne...@invisible.ca> @@ -28,7 +28,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rk_gmac.c,v 1.5 2018/06/30 18:20:35 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rk_gmac.c,v 1.6 2018/06/30 18:27:10 jmcneill Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -284,6 +284,9 @@ rk_gmac_attach(device_t parent, device_t if (rk_gmac_reset(phandle) != 0) aprint_error_dev(self, "PHY reset failed\n"); + /* Rock64 seems to need more time for the reset to complete */ + delay(100000); + #if notyet if (of_hasprop(phandle, "snps,force_thresh_dma_mode")) sc->sc_flags |= DWC_GMAC_FORCE_THRESH_DMA_MODE;