socfpga_gpio.c (276533) | socfpga_gpio.c (277968) |
---|---|
1/*- 2 * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * This software was developed by SRI International and the University of 6 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7 * ("CTSRD"), as part of the DARPA CRASH research programme. 8 * --- 25 unchanged lines hidden (view full) --- 34 */ 35 36/* 37 * The GPIO modules are instances of the Synopsys�� DesignWare�� APB General 38 * Purpose Programming I/O (DW_apb_gpio) peripheral. 39 */ 40 41#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * This software was developed by SRI International and the University of 6 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7 * ("CTSRD"), as part of the DARPA CRASH research programme. 8 * --- 25 unchanged lines hidden (view full) --- 34 */ 35 36/* 37 * The GPIO modules are instances of the Synopsys�� DesignWare�� APB General 38 * Purpose Programming I/O (DW_apb_gpio) peripheral. 39 */ 40 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/sys/arm/altera/socfpga/socfpga_gpio.c 276533 2015-01-02 13:15:36Z br $"); | 42__FBSDID("$FreeBSD: head/sys/arm/altera/socfpga/socfpga_gpio.c 277968 2015-01-31 12:17:07Z loos $"); |
43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/bus.h> 47#include <sys/kernel.h> 48#include <sys/module.h> 49#include <sys/malloc.h> 50#include <sys/rman.h> --- 107 unchanged lines hidden (view full) --- 158 int i; 159 160 sc = device_get_softc(dev); 161 sc->dev = dev; 162 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); 163 164 if (bus_alloc_resources(dev, socfpga_gpio_spec, sc->res)) { 165 device_printf(dev, "could not allocate resources\n"); | 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/bus.h> 47#include <sys/kernel.h> 48#include <sys/module.h> 49#include <sys/malloc.h> 50#include <sys/rman.h> --- 107 unchanged lines hidden (view full) --- 158 int i; 159 160 sc = device_get_softc(dev); 161 sc->dev = dev; 162 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); 163 164 if (bus_alloc_resources(dev, socfpga_gpio_spec, sc->res)) { 165 device_printf(dev, "could not allocate resources\n"); |
166 mtx_destroy(&sc->sc_mtx); |
|
166 return (ENXIO); 167 } 168 169 /* Memory interface */ 170 sc->bst = rman_get_bustag(sc->res[0]); 171 sc->bsh = rman_get_bushandle(sc->res[0]); 172 173 gpio_sc = sc; --- 264 unchanged lines hidden --- | 167 return (ENXIO); 168 } 169 170 /* Memory interface */ 171 sc->bst = rman_get_bustag(sc->res[0]); 172 sc->bsh = rman_get_bushandle(sc->res[0]); 173 174 gpio_sc = sc; --- 264 unchanged lines hidden --- |