Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/sunxi Apply RTL8211E 'no-rx-delay' workaround o...



details:   https://anonhg.NetBSD.org/src/rev/231eff68367e
branches:  trunk
changeset: 828650:231eff68367e
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Dec 23 12:50:55 2017 +0000

description:
Apply RTL8211E 'no-rx-delay' workaround on Pine64+ boards

diffstat:

 sys/arch/arm/sunxi/sunxi_platform.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 7debe8b8747e -r 231eff68367e sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c       Sat Dec 23 12:49:54 2017 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c       Sat Dec 23 12:50:55 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.17 2017/12/19 09:04:19 skrll Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.18 2017/12/23 12:50:55 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #include "opt_fdt_arm.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.17 2017/12/19 09:04:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.18 2017/12/23 12:50:55 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -137,6 +137,15 @@
 static void
 sunxi_platform_device_register(device_t self, void *aux)
 {
+       prop_dictionary_t prop = device_properties(self);
+
+       if (device_is_a(self, "rgephy")) {
+               /* Pine64+ gigabit ethernet workaround */
+               const char * compat[] = { "pine64,pine64-plus", NULL };
+               if (of_match_compatible(OF_finddevice("/"), compat)) {
+                       prop_dictionary_set_bool(prop, "no-rx-delay", true);
+               }
+       }
 }
 
 static u_int



Home | Main Index | Thread Index | Old Index