Deleted Added
full compact
ti_pruss.c (258210) ti_pruss.c (261211)
1/*-
2 * Copyright (c) 2013 Rui Paulo <rpaulo@FreeBSD.org>
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

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

19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
23 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 * POSSIBILITY OF SUCH DAMAGE.
25 */
26#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2013 Rui Paulo <rpaulo@FreeBSD.org>
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

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

19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
23 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 * POSSIBILITY OF SUCH DAMAGE.
25 */
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/arm/ti/ti_pruss.c 258210 2013-11-16 08:23:15Z rpaulo $");
27__FBSDID("$FreeBSD: head/sys/arm/ti/ti_pruss.c 261211 2014-01-27 17:31:21Z jmg $");
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/bus.h>
32#include <sys/conf.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/malloc.h>

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

161 int rid, i;
162
163 if (ti_prcm_clk_enable(PRUSS_CLK) != 0) {
164 device_printf(dev, "could not enable PRUSS clock\n");
165 return (ENXIO);
166 }
167 sc = device_get_softc(dev);
168 rid = 0;
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/bus.h>
32#include <sys/conf.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/malloc.h>

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

161 int rid, i;
162
163 if (ti_prcm_clk_enable(PRUSS_CLK) != 0) {
164 device_printf(dev, "could not enable PRUSS clock\n");
165 return (ENXIO);
166 }
167 sc = device_get_softc(dev);
168 rid = 0;
169 mtx_init(&sc->sc_mtx, "TI PRUSS", MTX_DEF, 0);
169 mtx_init(&sc->sc_mtx, "TI PRUSS", NULL, MTX_DEF);
170 sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
171 RF_ACTIVE);
172 if (sc->sc_mem_res == NULL) {
173 device_printf(dev, "could not allocate memory resource\n");
174 return (ENXIO);
175 }
176 sc->sc_bt = rman_get_bustag(sc->sc_mem_res);
177 sc->sc_bh = rman_get_bushandle(sc->sc_mem_res);

--- 143 unchanged lines hidden ---
170 sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
171 RF_ACTIVE);
172 if (sc->sc_mem_res == NULL) {
173 device_printf(dev, "could not allocate memory resource\n");
174 return (ENXIO);
175 }
176 sc->sc_bt = rman_get_bustag(sc->sc_mem_res);
177 sc->sc_bh = rman_get_bushandle(sc->sc_mem_res);

--- 143 unchanged lines hidden ---