From owner-svn-src-head@FreeBSD.ORG Sun Apr 6 17:09:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3368BEBA; Sun, 6 Apr 2014 17:09:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06EA118A; Sun, 6 Apr 2014 17:09:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s36H9pZI089148; Sun, 6 Apr 2014 17:09:51 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s36H9pk9089147; Sun, 6 Apr 2014 17:09:51 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201404061709.s36H9pk9089147@svn.freebsd.org> From: Luiz Otavio O Souza Date: Sun, 6 Apr 2014 17:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264197 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 17:09:52 -0000 Author: loos Date: Sun Apr 6 17:09:51 2014 New Revision: 264197 URL: http://svnweb.freebsd.org/changeset/base/264197 Log: Partially revert r264083. While it is the recommended initialization procedure, it hangs on the reset of the second GPIO module on pandaboard. Removes the module reset for now as more investigation would be needed. Reported by: jceel Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Sun Apr 6 17:06:27 2014 (r264196) +++ head/sys/arm/ti/ti_gpio.c Sun Apr 6 17:09:51 2014 (r264197) @@ -69,9 +69,6 @@ __FBSDID("$FreeBSD$"); /* Register definitions */ #define TI_GPIO_REVISION 0x0000 #define TI_GPIO_SYSCONFIG 0x0010 -#define TI_GPIO_SYSCONFIG_SOFTRESET (1 << 1) -#define TI_GPIO_SYSCONFIG_AUTOIDLE (1 << 0) -#define TI_GPIO_SYSSTATUS_RESETDONE (1 << 0) #if defined(SOC_OMAP3) #define TI_GPIO_SYSSTATUS 0x0014 #define TI_GPIO_IRQSTATUS1 0x0018 @@ -715,7 +712,7 @@ ti_gpio_detach_intr(device_t dev) static int ti_gpio_bank_init(device_t dev, int bank) { - int pin, timeout; + int pin; struct ti_gpio_softc *sc; uint32_t flags, reg_oe; @@ -724,16 +721,6 @@ ti_gpio_bank_init(device_t dev, int bank /* Enable the interface and functional clocks for the module. */ ti_prcm_clk_enable(GPIO0_CLK + FIRST_GPIO_BANK + bank); - /* Reset the GPIO module. */ - timeout = 0; - ti_gpio_write_4(sc, bank, TI_GPIO_SYSCONFIG, TI_GPIO_SYSCONFIG_SOFTRESET); - while ((ti_gpio_read_4(sc, bank, TI_GPIO_SYSSTATUS) & - TI_GPIO_SYSSTATUS_RESETDONE) == 0) { - if (timeout++ > 100) - return (EBUSY); - DELAY(100); - } - /* * Read the revision number of the module. TI don't publish the * actual revision numbers, so instead the values have been @@ -821,7 +808,7 @@ ti_gpio_attach(device_t dev) */ for (i = 0; i < MAX_GPIO_BANKS; i++) { if (sc->sc_mem_res[i] != NULL) { - /* Reset and initialize the GPIO module. */ + /* Initialize the GPIO module. */ err = ti_gpio_bank_init(dev, i); if (err != 0) { ti_gpio_detach_intr(dev);