Deleted Added
full compact
octeon_gpio.c (256281) octeon_gpio.c (278782)
1/*-
2 * Copyright (c) 2011, Oleksandr Tymoshenko <gonzo@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

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

25 * SUCH DAMAGE.
26 */
27
28/*
29 * GPIO driver for Cavium Octeon
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2011, Oleksandr Tymoshenko <gonzo@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

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

25 * SUCH DAMAGE.
26 */
27
28/*
29 * GPIO driver for Cavium Octeon
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: stable/10/sys/mips/cavium/octeon_gpio.c 249449 2013-04-13 21:21:13Z dim $");
33__FBSDID("$FreeBSD: stable/10/sys/mips/cavium/octeon_gpio.c 278782 2015-02-14 20:37:33Z loos $");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/bus.h>
38
39#include <sys/kernel.h>
40#include <sys/module.h>
41#include <sys/rman.h>

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

436 for (i = 0; i < 16; i++) {
437 gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(i));
438 device_printf(dev, "[pin%d] output=%d, invinput=%d, intr=%d, intr_type=%s\n",
439 i, gpio_cfgx.s.tx_oe, gpio_cfgx.s.rx_xor,
440 gpio_cfgx.s.int_en, gpio_cfgx.s.int_type ? "rising edge" : "level");
441 }
442 }
443
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/bus.h>
38
39#include <sys/kernel.h>
40#include <sys/module.h>
41#include <sys/rman.h>

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

436 for (i = 0; i < 16; i++) {
437 gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(i));
438 device_printf(dev, "[pin%d] output=%d, invinput=%d, intr=%d, intr_type=%s\n",
439 i, gpio_cfgx.s.tx_oe, gpio_cfgx.s.rx_xor,
440 gpio_cfgx.s.int_en, gpio_cfgx.s.int_type ? "rising edge" : "level");
441 }
442 }
443
444 device_add_child(dev, "gpioc", device_get_unit(dev));
445 device_add_child(dev, "gpiobus", device_get_unit(dev));
444 device_add_child(dev, "gpioc", -1);
445 device_add_child(dev, "gpiobus", -1);
446
446 return (bus_generic_attach(dev));
447}
448
449static int
450octeon_gpio_detach(device_t dev)
451{
452 struct octeon_gpio_softc *sc = device_get_softc(dev);
453 int i;

--- 40 unchanged lines hidden ---
447 return (bus_generic_attach(dev));
448}
449
450static int
451octeon_gpio_detach(device_t dev)
452{
453 struct octeon_gpio_softc *sc = device_get_softc(dev);
454 int i;

--- 40 unchanged lines hidden ---