Module Name: src Committed By: reinoud Date: Sat May 10 19:31:00 UTC 2014
Modified Files: src/sys/arch/arm/samsung: exynos_gpio.c src/sys/arch/evbarm/odroid: odroid_machdep.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/samsung/exynos_gpio.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/odroid/odroid_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/samsung/exynos_gpio.c diff -u src/sys/arch/arm/samsung/exynos_gpio.c:1.1 src/sys/arch/arm/samsung/exynos_gpio.c:1.2 --- src/sys/arch/arm/samsung/exynos_gpio.c:1.1 Fri May 9 21:49:43 2014 +++ src/sys/arch/arm/samsung/exynos_gpio.c Sat May 10 19:31:00 2014 @@ -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 @@ static struct exynos_gpio_pin_group exyn 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 @@ static struct exynos_gpio_pin_group exyn 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 */ }; Index: src/sys/arch/evbarm/odroid/odroid_machdep.c diff -u src/sys/arch/evbarm/odroid/odroid_machdep.c:1.12 src/sys/arch/evbarm/odroid/odroid_machdep.c:1.13 --- src/sys/arch/evbarm/odroid/odroid_machdep.c:1.12 Sat May 10 11:03:45 2014 +++ src/sys/arch/evbarm/odroid/odroid_machdep.c Sat May 10 19:31:00 2014 @@ -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 @@ odroid_exynos4_gpio_ncs(device_t self, p 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 @@ odroid_exynos4_gpio_ncs(device_t self, p 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