From: rapha Date: Mon, 14 Jul 2014 08:55:07 +0000 (+0000) Subject: Write to the correct control module registers when configuring gpio pins. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8ed388a6e352fac8bde7aaae3d49ff51e5db3fca;p=openbsd Write to the correct control module registers when configuring gpio pins. Tested and ok joshe@ --- 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