From 8ed388a6e352fac8bde7aaae3d49ff51e5db3fca Mon Sep 17 00:00:00 2001 From: rapha Date: Mon, 14 Jul 2014 08:55:07 +0000 Subject: [PATCH] Write to the correct control module registers when configuring gpio pins. Tested and ok joshe@ --- sys/arch/armv7/omap/omgpio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/armv7/omap/omgpio.c b/sys/arch/armv7/omap/omgpio.c index 66c9f39fa36..3acf4deef6e 100644 --- a/sys/arch/armv7/omap/omgpio.c +++ b/sys/arch/armv7/omap/omgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omgpio.c,v 1.4 2014/07/12 18:44:41 tedu Exp $ */ +/* $OpenBSD: omgpio.c,v 1.5 2014/07/14 08:55:07 rapha Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * @@ -470,7 +470,8 @@ omgpio_pin_ctl(void *arg, int pin, int flags) omgpio_pin_dir_write(sc, pin, OMGPIO_DIR_OUT); if (board_id == BOARD_ID_AM335X_BEAGLEBONE) - sitara_cm_padconf_set_gpioflags(pin, flags); + sitara_cm_padconf_set_gpioflags( + sc->sc_dev.dv_unit * GPIO_NUM_PINS + pin, flags); } void -- 2.20.1