diff options
author | gonzo <gonzo@FreeBSD.org> | 2010-09-29 23:06:41 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2010-09-29 23:06:41 +0000 |
commit | 0dbb1afbee08cf51289c5d8fb11bb23d7ca14fa0 (patch) | |
tree | 798a64ad5ee5a99e4608952e9832dffb7e28c6ec | |
parent | 2e07ccd67eea0b496c9aa55d2a6afd19ba2c3205 (diff) | |
download | FreeBSD-src-0dbb1afbee08cf51289c5d8fb11bb23d7ca14fa0.zip FreeBSD-src-0dbb1afbee08cf51289c5d8fb11bb23d7ca14fa0.tar.gz |
- 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
-rw-r--r-- | sys/mips/atheros/ar71xx_gpio.c | 8 | ||||
-rw-r--r-- | sys/mips/atheros/ar71xxreg.h | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/mips/atheros/ar71xx_gpio.c b/sys/mips/atheros/ar71xx_gpio.c index c66266e..866c72b 100644 --- a/sys/mips/atheros/ar71xx_gpio.c +++ b/sys/mips/atheros/ar71xx_gpio.c @@ -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) diff --git a/sys/mips/atheros/ar71xxreg.h b/sys/mips/atheros/ar71xxreg.h index 2ee8baa..da5fc5d 100644 --- a/sys/mips/atheros/ar71xxreg.h +++ b/sys/mips/atheros/ar71xxreg.h @@ -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) |