From owner-svn-src-all@FreeBSD.ORG Wed Sep 29 23:06:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDE75106564A; Wed, 29 Sep 2010 23:06:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 931E28FC12; Wed, 29 Sep 2010 23:06:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8TN6fPN029222; Wed, 29 Sep 2010 23:06:41 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8TN6fSt029219; Wed, 29 Sep 2010 23:06:41 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201009292306.o8TN6fSt029219@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 29 Sep 2010 23:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213286 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 23:06:41 -0000 Author: gonzo Date: Wed Sep 29 23:06:41 2010 New Revision: 213286 URL: http://svn.freebsd.org/changeset/base/213286 Log: - Fix values of CS1_EN and CS2_EN flags - Unbreak kernel build by fixing naming convention of GPIO_FUNC flags Spotted by: Luiz Otavio O Souza, Andrew Thompson Modified: head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/atheros/ar71xxreg.h Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Wed Sep 29 22:59:49 2010 (r213285) +++ head/sys/mips/atheros/ar71xx_gpio.c Wed Sep 29 23:06:41 2010 (r213286) @@ -375,8 +375,8 @@ ar71xx_gpio_attach(device_t dev) } sc->dev = dev; - ar71xx_gpio_function_enable(sc, GPIO_SPI_CS1_EN); - ar71xx_gpio_function_enable(sc, GPIO_SPI_CS2_EN); + ar71xx_gpio_function_enable(sc, GPIO_FUNC_SPI_CS1_EN); + ar71xx_gpio_function_enable(sc, GPIO_FUNC_SPI_CS2_EN); /* Configure all pins as input */ /* disable interrupts for all pins */ GPIO_WRITE(sc, AR71XX_GPIO_INT_MASK, 0); @@ -406,8 +406,8 @@ ar71xx_gpio_detach(device_t dev) KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized")); - ar71xx_gpio_function_disable(sc, GPIO_SPI_CS1_EN); - ar71xx_gpio_function_disable(sc, GPIO_SPI_CS2_EN); + ar71xx_gpio_function_disable(sc, GPIO_FUNC_SPI_CS1_EN); + ar71xx_gpio_function_disable(sc, GPIO_FUNC_SPI_CS2_EN); bus_generic_detach(dev); if (sc->gpio_mem_res) Modified: head/sys/mips/atheros/ar71xxreg.h ============================================================================== --- head/sys/mips/atheros/ar71xxreg.h Wed Sep 29 22:59:49 2010 (r213285) +++ head/sys/mips/atheros/ar71xxreg.h Wed Sep 29 23:06:41 2010 (r213286) @@ -151,11 +151,10 @@ #define AR71XX_GPIO_FUNCTION 0x28 #define GPIO_FUNC_STEREO_EN (1 << 17) #define GPIO_FUNC_SLIC_EN (1 << 16) -#define GPIO_FUNC_SPI_CS2_EN (1 << 15) +#define GPIO_FUNC_SPI_CS2_EN (1 << 13) /* CS2 is shared with GPIO_1 */ -#define GPIO_FUNC_SPI_CS1_EN (1 << 14) +#define GPIO_FUNC_SPI_CS1_EN (1 << 12) /* CS1 is shared with GPIO_0 */ -#define GPIO_FUNC_SPI_EN (1 << 13) #define GPIO_FUNC_UART_EN (1 << 8) #define GPIO_FUNC_USB_OC_EN (1 << 4) #define GPIO_FUNC_USB_CLK_EN (0)