Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch extra (undocumented) clk init bits for bananapi gmac
details: https://anonhg.NetBSD.org/src/rev/29904c174e00
branches: trunk
changeset: 333517:29904c174e00
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Nov 06 23:19:38 2014 +0000
description:
extra (undocumented) clk init bits for bananapi gmac
diffstat:
sys/arch/arm/allwinner/awin_gige.c | 9 ++++++++-
sys/arch/evbarm/awin/awin_machdep.c | 5 +++--
2 files changed, 11 insertions(+), 3 deletions(-)
diffs (52 lines):
diff -r ffdbfa9f7191 -r 29904c174e00 sys/arch/arm/allwinner/awin_gige.c
--- a/sys/arch/arm/allwinner/awin_gige.c Thu Nov 06 21:30:09 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_gige.c Thu Nov 06 23:19:38 2014 +0000
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: awin_gige.c,v 1.16 2014/10/20 20:02:16 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_gige.c,v 1.17 2014/11/06 23:19:38 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -169,6 +169,13 @@
phy_type = "rgmii";
if (strcmp(phy_type, "rgmii") == 0) {
clkreg = AWIN_GMAC_CLK_PIT | AWIN_GMAC_CLK_TCS_INT_RGMII;
+ } else if (strcmp(phy_type, "rgmii-bpi") == 0) {
+ clkreg = AWIN_GMAC_CLK_PIT | AWIN_GMAC_CLK_TCS_INT_RGMII;
+ /*
+ * These magic bits seem to be necessary for RGMII at gigabit
+ * speeds on Banana Pi.
+ */
+ clkreg |= __BITS(11,10);
} else if (strcmp(phy_type, "gmii") == 0) {
clkreg = AWIN_GMAC_CLK_TCS_INT_RGMII;
} else if (strcmp(phy_type, "mii") == 0) {
diff -r ffdbfa9f7191 -r 29904c174e00 sys/arch/evbarm/awin/awin_machdep.c
--- a/sys/arch/evbarm/awin/awin_machdep.c Thu Nov 06 21:30:09 2014 +0000
+++ b/sys/arch/evbarm/awin/awin_machdep.c Thu Nov 06 23:19:38 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_machdep.c,v 1.23 2014/10/30 00:32:55 jmcneill Exp $ */
+/* $NetBSD: awin_machdep.c,v 1.24 2014/11/06 23:19:38 jmcneill Exp $ */
/*
* Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.23 2014/10/30 00:32:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.24 2014/11/06 23:19:38 jmcneill Exp $");
#include "opt_machdep.h"
#include "opt_ddb.h"
@@ -742,6 +742,7 @@
#endif
#if AWIN_BOARD == AWIN_bpi
prop_dictionary_set_cstring(dict, "phy-power", "gmacpwren");
+ prop_dictionary_set_cstring(dict, "phy-type", "rgmii-bpi");
#endif
return;
}
Home |
Main Index |
Thread Index |
Old Index