Deleted Added
full compact
ar71xx_gpio.c (234515) ar71xx_gpio.c (239351)
1/*-
2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
3 * Copyright (c) 2009, Luiz Otavio O Souza.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * SUCH DAMAGE.
27 */
28
29/*
30 * GPIO driver for AR71xx
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
3 * Copyright (c) 2009, Luiz Otavio O Souza.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * SUCH DAMAGE.
27 */
28
29/*
30 * GPIO driver for AR71xx
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/mips/atheros/ar71xx_gpio.c 234515 2012-04-20 22:44:00Z adrian $");
34__FBSDID("$FreeBSD: head/sys/mips/atheros/ar71xx_gpio.c 239351 2012-08-17 04:44:57Z rpaulo $");
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/bus.h>
39
40#include <sys/kernel.h>
41#include <sys/module.h>
42#include <sys/rman.h>

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

330 int error = 0;
331 int i, j, maxpin;
332 int mask, pinon;
333 int old = 0;
334
335 KASSERT((device_get_unit(dev) == 0),
336 ("ar71xx_gpio: Only one gpio module supported"));
337
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/bus.h>
39
40#include <sys/kernel.h>
41#include <sys/module.h>
42#include <sys/rman.h>

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

330 int error = 0;
331 int i, j, maxpin;
332 int mask, pinon;
333 int old = 0;
334
335 KASSERT((device_get_unit(dev) == 0),
336 ("ar71xx_gpio: Only one gpio module supported"));
337
338 mtx_init(&sc->gpio_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
339 MTX_DEF);
338 mtx_init(&sc->gpio_mtx, device_get_nameunit(dev), NULL, MTX_DEF);
340
341 /* Map control/status registers. */
342 sc->gpio_mem_rid = 0;
343 sc->gpio_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
344 &sc->gpio_mem_rid, RF_ACTIVE);
345
346 if (sc->gpio_mem_res == NULL) {
347 device_printf(dev, "couldn't map memory\n");

--- 120 unchanged lines hidden ---
339
340 /* Map control/status registers. */
341 sc->gpio_mem_rid = 0;
342 sc->gpio_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
343 &sc->gpio_mem_rid, RF_ACTIVE);
344
345 if (sc->gpio_mem_res == NULL) {
346 device_printf(dev, "couldn't map memory\n");

--- 120 unchanged lines hidden ---