Deleted Added
full compact
vf_gpio.c (274670) vf_gpio.c (277968)
1/*-
2 * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 */
26
27/*
28 * Vybrid Family General-Purpose Input/Output (GPIO)
29 * Chapter 7, Vybrid Reference Manual, Rev. 5, 07/2013
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 */
26
27/*
28 * Vybrid Family General-Purpose Input/Output (GPIO)
29 * Chapter 7, Vybrid Reference Manual, Rev. 5, 07/2013
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/arm/freescale/vybrid/vf_gpio.c 274670 2014-11-18 17:22:08Z loos $");
33__FBSDID("$FreeBSD: head/sys/arm/freescale/vybrid/vf_gpio.c 277968 2015-01-31 12:17:07Z loos $");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/bus.h>
38#include <sys/kernel.h>
39#include <sys/module.h>
40#include <sys/malloc.h>
41#include <sys/rman.h>

--- 78 unchanged lines hidden (view full) ---

120 struct vf_gpio_softc *sc;
121 int i;
122
123 sc = device_get_softc(dev);
124 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF);
125
126 if (bus_alloc_resources(dev, vf_gpio_spec, sc->res)) {
127 device_printf(dev, "could not allocate resources\n");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/bus.h>
38#include <sys/kernel.h>
39#include <sys/module.h>
40#include <sys/malloc.h>
41#include <sys/rman.h>

--- 78 unchanged lines hidden (view full) ---

120 struct vf_gpio_softc *sc;
121 int i;
122
123 sc = device_get_softc(dev);
124 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF);
125
126 if (bus_alloc_resources(dev, vf_gpio_spec, sc->res)) {
127 device_printf(dev, "could not allocate resources\n");
128 mtx_destroy(&sc->sc_mtx);
128 return (ENXIO);
129 }
130
131 /* Memory interface */
132 sc->bst = rman_get_bustag(sc->res[0]);
133 sc->bsh = rman_get_bushandle(sc->res[0]);
134
135 gpio_sc = sc;

--- 234 unchanged lines hidden ---
129 return (ENXIO);
130 }
131
132 /* Memory interface */
133 sc->bst = rman_get_bustag(sc->res[0]);
134 sc->bsh = rman_get_bushandle(sc->res[0]);
135
136 gpio_sc = sc;

--- 234 unchanged lines hidden ---