Deleted Added
full compact
rt305x_gpio.c (220297) rt305x_gpio.c (239351)
1/*-
2 * Copyright (c) 2010-2011, Aleksandr Rybalko <ray@ddteam.net>
3 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
4 * Copyright (c) 2009, 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

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

27 * SUCH DAMAGE.
28 */
29
30/*
31 * GPIO driver for RT305X SoC.
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2010-2011, Aleksandr Rybalko <ray@ddteam.net>
3 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
4 * Copyright (c) 2009, 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

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

27 * SUCH DAMAGE.
28 */
29
30/*
31 * GPIO driver for RT305X SoC.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/mips/rt305x/rt305x_gpio.c 220297 2011-04-03 14:39:55Z adrian $");
35__FBSDID("$FreeBSD: head/sys/mips/rt305x/rt305x_gpio.c 239351 2012-08-17 04:44:57Z rpaulo $");
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40
41#include <sys/kernel.h>
42#include <sys/module.h>
43#include <sys/rman.h>

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

442 struct rt305x_gpio_softc *sc = device_get_softc(dev);
443 int error = 0, i;
444 uint64_t avlpins = 0;
445 sc->reset_gpio = DAP1350_RESET_GPIO;
446
447 KASSERT((device_get_unit(dev) == 0),
448 ("rt305x_gpio_gpio: Only one gpio module supported"));
449
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40
41#include <sys/kernel.h>
42#include <sys/module.h>
43#include <sys/rman.h>

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

442 struct rt305x_gpio_softc *sc = device_get_softc(dev);
443 int error = 0, i;
444 uint64_t avlpins = 0;
445 sc->reset_gpio = DAP1350_RESET_GPIO;
446
447 KASSERT((device_get_unit(dev) == 0),
448 ("rt305x_gpio_gpio: Only one gpio module supported"));
449
450 mtx_init(&sc->gpio_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
451 MTX_DEF);
450 mtx_init(&sc->gpio_mtx, device_get_nameunit(dev), NULL, MTX_DEF);
452
453 /* Map control/status registers. */
454 sc->gpio_mem_rid = 0;
455 sc->gpio_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
456 &sc->gpio_mem_rid, RF_ACTIVE);
457
458 if (sc->gpio_mem_res == NULL) {
459 device_printf(dev, "couldn't map memory\n");

--- 160 unchanged lines hidden ---
451
452 /* Map control/status registers. */
453 sc->gpio_mem_rid = 0;
454 sc->gpio_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
455 &sc->gpio_mem_rid, RF_ACTIVE);
456
457 if (sc->gpio_mem_res == NULL) {
458 device_printf(dev, "couldn't map memory\n");

--- 160 unchanged lines hidden ---