Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/rockchip Only install interrupt handler if dwc_...
details: https://anonhg.NetBSD.org/src/rev/0a183446a989
branches: trunk
changeset: 323776:0a183446a989
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jun 30 16:28:14 2018 +0000
description:
Only install interrupt handler if dwc_gmac_attach succeeds.
diffstat:
sys/arch/arm/rockchip/rk_gmac.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r f242be8c923d -r 0a183446a989 sys/arch/arm/rockchip/rk_gmac.c
--- a/sys/arch/arm/rockchip/rk_gmac.c Sat Jun 30 16:27:48 2018 +0000
+++ b/sys/arch/arm/rockchip/rk_gmac.c Sat Jun 30 16:28:14 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_gmac.c,v 1.3 2018/06/19 23:43:11 jmcneill Exp $ */
+/* $NetBSD: rk_gmac.c,v 1.4 2018/06/30 16:28:14 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_gmac.c,v 1.3 2018/06/19 23:43:11 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_gmac.c,v 1.4 2018/06/30 16:28:14 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -311,13 +311,14 @@
aprint_naive("\n");
aprint_normal(": GMAC\n");
+ if (dwc_gmac_attach(sc, GMAC_MII_CLK_150_250M_DIV102) != 0)
+ return;
+
if (fdtbus_intr_establish(phandle, 0, IPL_NET, 0, rk_gmac_intr, sc) == NULL) {
aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr);
return;
}
aprint_normal_dev(self, "interrupting on %s\n", intrstr);
-
- dwc_gmac_attach(sc, GMAC_MII_CLK_150_250M_DIV102);
}
CFATTACH_DECL_NEW(rk_gmac, sizeof(struct rk_gmac_softc),
Home |
Main Index |
Thread Index |
Old Index