diff options
Diffstat (limited to 'sys/mips/rt305x')
-rw-r--r-- | sys/mips/rt305x/rt305x_dotg.c | 1 | ||||
-rw-r--r-- | sys/mips/rt305x/rt305x_gpio.c | 15 | ||||
-rw-r--r-- | sys/mips/rt305x/rt305x_machdep.c | 6 |
3 files changed, 6 insertions, 16 deletions
diff --git a/sys/mips/rt305x/rt305x_dotg.c b/sys/mips/rt305x/rt305x_dotg.c index 89b4933..1159158 100644 --- a/sys/mips/rt305x/rt305x_dotg.c +++ b/sys/mips/rt305x/rt305x_dotg.c @@ -92,6 +92,7 @@ dotg_obio_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = DOTG_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, diff --git a/sys/mips/rt305x/rt305x_gpio.c b/sys/mips/rt305x/rt305x_gpio.c index 1d68518..a5d7254 100644 --- a/sys/mips/rt305x/rt305x_gpio.c +++ b/sys/mips/rt305x/rt305x_gpio.c @@ -242,18 +242,8 @@ rt305x_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - rt305x_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); - return (0); } @@ -511,9 +501,8 @@ rt305x_gpio_attach(device_t dev) } #endif - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); - + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } diff --git a/sys/mips/rt305x/rt305x_machdep.c b/sys/mips/rt305x/rt305x_machdep.c index 07342bd..dab2ce6 100644 --- a/sys/mips/rt305x/rt305x_machdep.c +++ b/sys/mips/rt305x/rt305x_machdep.c @@ -167,7 +167,7 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused, arg = (char *)(intptr_t)MIPS_PHYS_TO_KSEG0(argv[i]); printf("\targv[%d] = %s\n", i, arg); sprintf(n, "argv%d", i); - setenv(n, arg); + kern_setenv(n, arg); } } @@ -180,9 +180,9 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused, printf("\t%s\n", arg); n = strsep(&arg, "="); if (arg == NULL) - setenv(n, "1"); + kern_setenv(n, "1"); else - setenv(n, arg); + kern_setenv(n, arg); } |