a10_gpio.c (266337) | a10_gpio.c (278782) |
---|---|
1/*- 2 * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> 3 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 4 * Copyright (c) 2012 Luiz Otavio O Souza. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 */ 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> 3 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 4 * Copyright (c) 2012 Luiz Otavio O Souza. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 */ 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: stable/10/sys/arm/allwinner/a10_gpio.c 266337 2014-05-17 18:53:36Z ian $"); | 30__FBSDID("$FreeBSD: stable/10/sys/arm/allwinner/a10_gpio.c 278782 2015-02-14 20:37:33Z loos $"); |
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35 36#include <sys/kernel.h> 37#include <sys/module.h> 38#include <sys/rman.h> --- 430 unchanged lines hidden (view full) --- 469 "pin %d", i); 470 func = a10_gpio_get_function(sc, i); 471 sc->sc_gpio_pins[i].gp_pin = i; 472 sc->sc_gpio_pins[i].gp_caps = A10_GPIO_DEFAULT_CAPS; 473 sc->sc_gpio_pins[i].gp_flags = a10_gpio_func_flag(func); 474 } 475 sc->sc_gpio_npins = i; 476 | 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35 36#include <sys/kernel.h> 37#include <sys/module.h> 38#include <sys/rman.h> --- 430 unchanged lines hidden (view full) --- 469 "pin %d", i); 470 func = a10_gpio_get_function(sc, i); 471 sc->sc_gpio_pins[i].gp_pin = i; 472 sc->sc_gpio_pins[i].gp_caps = A10_GPIO_DEFAULT_CAPS; 473 sc->sc_gpio_pins[i].gp_flags = a10_gpio_func_flag(func); 474 } 475 sc->sc_gpio_npins = i; 476 |
477 device_add_child(dev, "gpioc", device_get_unit(dev)); 478 device_add_child(dev, "gpiobus", device_get_unit(dev)); | 477 device_add_child(dev, "gpioc", -1); 478 device_add_child(dev, "gpiobus", -1); |
479 480 a10_gpio_sc = sc; 481 482 return (bus_generic_attach(dev)); 483 484fail: 485 if (sc->sc_irq_res) 486 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); --- 56 unchanged lines hidden --- | 479 480 a10_gpio_sc = sc; 481 482 return (bus_generic_attach(dev)); 483 484fail: 485 if (sc->sc_irq_res) 486 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); --- 56 unchanged lines hidden --- |