summaryrefslogtreecommitdiffstats
path: root/sys/mips/atheros
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-05-10 12:58:18 +0000
committerloos <loos@FreeBSD.org>2014-05-10 12:58:18 +0000
commit20e87023bd110a3f94d9c921558d78c50432e36e (patch)
tree2bd19a95456e3d1ff4baf346c11dcc18fbbed3eb /sys/mips/atheros
parent1e481e96a449c37aa010f03c6f83a74e6959d477 (diff)
downloadFreeBSD-src-20e87023bd110a3f94d9c921558d78c50432e36e.zip
FreeBSD-src-20e87023bd110a3f94d9c921558d78c50432e36e.tar.gz
Remove an old mistake of mine. This has sneak in the code i sent to gonzo
at that time, but AFAIK it is only used on routerboards. Enabling GPIO_FUNC_SPI_CS[1|2]_EN will claim the use of gpio pins 0 and 1 respectivelly for use as SPI CS pins. When really needed, this can still be enabled on kernel hints using the function_set and function_clear knobs.
Diffstat (limited to 'sys/mips/atheros')
-rw-r--r--sys/mips/atheros/ar71xx_gpio.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/sys/mips/atheros/ar71xx_gpio.c b/sys/mips/atheros/ar71xx_gpio.c
index 1a2d1e9..9078d96 100644
--- a/sys/mips/atheros/ar71xx_gpio.c
+++ b/sys/mips/atheros/ar71xx_gpio.c
@@ -352,7 +352,6 @@ ar71xx_gpio_attach(device_t dev)
int error = 0;
int i, j, maxpin;
int mask, pinon;
- int old = 0;
KASSERT((device_get_unit(dev) == 0),
("ar71xx_gpio: Only one gpio module supported"));
@@ -391,19 +390,12 @@ ar71xx_gpio_attach(device_t dev)
"function_set", &mask) == 0) {
device_printf(dev, "function_set: 0x%x\n", mask);
ar71xx_gpio_function_enable(sc, mask);
- old = 1;
}
/* Disable function bits that are required */
if (resource_int_value(device_get_name(dev), device_get_unit(dev),
"function_clear", &mask) == 0) {
device_printf(dev, "function_clear: 0x%x\n", mask);
ar71xx_gpio_function_disable(sc, mask);
- old = 1;
- }
- /* Handle previous behaviour */
- if (old == 0) {
- 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 */
@@ -457,8 +449,6 @@ ar71xx_gpio_detach(device_t dev)
KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized"));
- 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)
OpenPOWER on IntegriCloud