Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Add the missing ETC0, ETC6, ETC7, ETC8 `gpio' regis...



details:   https://anonhg.NetBSD.org/src/rev/88dc83e3c1b7
branches:  trunk
changeset: 795898:88dc83e3c1b7
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sat May 10 19:31:00 2014 +0000

description:
Add the missing ETC0, ETC6, ETC7, ETC8 `gpio' registers. They are special in
that they can't be set/unset nor configured. The only changeable parameters
are the pullups PUD and the DRV driving strength. They however fit the same
structure as the rest of the GPIOs and are used as such.

diffstat:

 sys/arch/arm/samsung/exynos_gpio.c      |  9 +++++----
 sys/arch/evbarm/odroid/odroid_machdep.c |  8 ++++++--
 2 files changed, 11 insertions(+), 6 deletions(-)

diffs (73 lines):

diff -r 433c777c4b5d -r 88dc83e3c1b7 sys/arch/arm/samsung/exynos_gpio.c
--- a/sys/arch/arm/samsung/exynos_gpio.c        Sat May 10 14:15:25 2014 +0000
+++ b/sys/arch/arm/samsung/exynos_gpio.c        Sat May 10 19:31:00 2014 +0000
@@ -32,7 +32,7 @@
 #include "gpio.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.1 2014/05/09 21:49:43 reinoud Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.2 2014/05/10 19:31:00 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -167,7 +167,8 @@
        GPIO_GRP(4, RIGHT, 0x01A0, GPY4, 8),
        GPIO_GRP(4, RIGHT, 0x01C0, GPY5, 8),
        GPIO_GRP(4, RIGHT, 0x01E0, GPY6, 8),
-       /* ETC0, ETC6 skipped */
+       GPIO_GRP(4, RIGHT, 0x0200, ETC0, 6),
+       GPIO_GRP(4, RIGHT, 0x0220, ETC6, 7),
        GPIO_GRP(4, RIGHT, 0x0260, GPM0, 8),
        GPIO_GRP(4, RIGHT, 0x0280, GPM1, 7),
        GPIO_GRP(4, RIGHT, 0x02A0, GPM2, 5),
@@ -185,10 +186,10 @@
 
        GPIO_GRP(4, C2C,   0x0000, GPV0, 8),
        GPIO_GRP(4, C2C,   0x0020, GPV1, 8),
-       /* ETC7 skipped */
+       GPIO_GRP(4, C2C,   0x0040, ETC7, 2),
        GPIO_GRP(4, C2C,   0x0060, GPV2, 8),
        GPIO_GRP(4, C2C,   0x0080, GPV3, 8),
-       /* ETC8 skipped */
+       GPIO_GRP(4, C2C,   0x00A0, ETC8, 2),
        GPIO_GRP(4, C2C,   0x00C0, GPV4, 2),
        /* EXTINT skipped */
 };
diff -r 433c777c4b5d -r 88dc83e3c1b7 sys/arch/evbarm/odroid/odroid_machdep.c
--- a/sys/arch/evbarm/odroid/odroid_machdep.c   Sat May 10 14:15:25 2014 +0000
+++ b/sys/arch/evbarm/odroid/odroid_machdep.c   Sat May 10 19:31:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: odroid_machdep.c,v 1.12 2014/05/10 11:03:45 reinoud Exp $ */
+/*     $NetBSD: odroid_machdep.c,v 1.13 2014/05/10 19:31:00 reinoud Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.12 2014/05/10 11:03:45 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.13 2014/05/10 19:31:00 reinoud Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_exynos.h"
@@ -506,6 +506,8 @@
        prop_dictionary_set_uint32(dict, "nc-GPY4", 0xff - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPY5", 0xff - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPY6", 0xff - 0x00);
+       prop_dictionary_set_uint32(dict, "nc-ETC0", 0x3f - 0x00);
+       prop_dictionary_set_uint32(dict, "nc-ETC6", 0x7f - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPM0", 0xff - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPM1", 0x7f - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPM2", 0x1f - 0x00);
@@ -518,8 +520,10 @@
        prop_dictionary_set_uint32(dict, "nc-GPZ",  0xff - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPV0", 0xff - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPV1", 0xff - 0x00);
+       prop_dictionary_set_uint32(dict, "nc-ETC7", 0x03 - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPV2", 0xff - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPV3", 0xff - 0x00);
+       prop_dictionary_set_uint32(dict, "nc-ETC8", 0x03 - 0x00);
        prop_dictionary_set_uint32(dict, "nc-GPV4", 0x03 - 0x00);
 }
 #endif



Home | Main Index | Thread Index | Old Index