Module Name:    src
Committed By:   jmcneill
Date:           Fri Nov  7 11:42:28 UTC 2014

Modified Files:
        src/sys/arch/arm/allwinner: awin_gige.c
        src/sys/arch/evbarm/awin: awin_machdep.c

Log Message:
bpi uses a different mux feature for gmac


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/allwinner/awin_gige.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbarm/awin/awin_machdep.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/allwinner/awin_gige.c
diff -u src/sys/arch/arm/allwinner/awin_gige.c:1.17 src/sys/arch/arm/allwinner/awin_gige.c:1.18
--- src/sys/arch/arm/allwinner/awin_gige.c:1.17	Thu Nov  6 23:19:38 2014
+++ src/sys/arch/arm/allwinner/awin_gige.c	Fri Nov  7 11:42:28 2014
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_gige.c,v 1.17 2014/11/06 23:19:38 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_gige.c,v 1.18 2014/11/07 11:42:28 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -102,16 +102,17 @@ awin_gige_attach(device_t parent, device
 	struct awin_gige_softc * const sc = device_private(self);
 	struct awinio_attach_args * const aio = aux;
 	const struct awin_locators * const loc = &aio->aio_loc;
-	const struct awin_gpio_pinset *pinset =
+	struct awin_gpio_pinset pinset =
 	    awin_chip_id() == AWIN_CHIP_ID_A31 ?
-	    &awin_gige_gpio_pinset_a31 : &awin_gige_gpio_pinset;
+	    awin_gige_gpio_pinset_a31 : awin_gige_gpio_pinset;
 	prop_dictionary_t cfg = device_properties(self);
 	uint32_t clkreg;
 	const char *phy_type, *pin_name;
 
 	sc->sc_core.sc_dev = self;
 
-	awin_gpio_pinset_acquire(pinset);
+	prop_dictionary_get_uint8(cfg, "pinset-func", &pinset.pinset_func);
+	awin_gpio_pinset_acquire(&pinset);
 
 	sc->sc_core.sc_bst = aio->aio_core_bst;
 	sc->sc_core.sc_dmat = aio->aio_dmat;

Index: src/sys/arch/evbarm/awin/awin_machdep.c
diff -u src/sys/arch/evbarm/awin/awin_machdep.c:1.24 src/sys/arch/evbarm/awin/awin_machdep.c:1.25
--- src/sys/arch/evbarm/awin/awin_machdep.c:1.24	Thu Nov  6 23:19:38 2014
+++ src/sys/arch/evbarm/awin/awin_machdep.c	Fri Nov  7 11:42:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: awin_machdep.c,v 1.24 2014/11/06 23:19:38 jmcneill Exp $ */
+/*	$NetBSD: awin_machdep.c,v 1.25 2014/11/07 11:42:28 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.24 2014/11/06 23:19:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.25 2014/11/07 11:42:28 jmcneill Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -743,6 +743,7 @@ awin_device_register(device_t self, void
 #if AWIN_BOARD == AWIN_bpi
 		prop_dictionary_set_cstring(dict, "phy-power", "gmacpwren");
 		prop_dictionary_set_cstring(dict, "phy-type", "rgmii-bpi");
+		prop_dictionary_set_uint8(dict, "pinset-func", 2);
 #endif
 		return;
 	}

Reply via email to