Deleted Added
full compact
bcm2835_bsc.c (307575) bcm2835_bsc.c (323931)
1/*-
2 * Copyright (c) 2001 Tsubai Masanari.
3 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
4 * Copyright (c) 2013 Luiz Otavio O Souza <loos@freebsd.org>
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

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

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Tsubai Masanari.
3 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
4 * Copyright (c) 2013 Luiz Otavio O Souza <loos@freebsd.org>
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

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

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c 307575 2016-10-18 19:15:43Z gonzo $");
30__FBSDID("$FreeBSD: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c 323931 2017-09-22 15:53:22Z ian $");
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/lock.h>
36#include <sys/module.h>
37#include <sys/mutex.h>
38#include <sys/bus.h>

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

303 BCM_BSC_UNLOCK(sc);
304
305 sc->sc_iicbus = device_add_child(dev, "iicbus", -1);
306 if (sc->sc_iicbus == NULL) {
307 bcm_bsc_detach(dev);
308 return (ENXIO);
309 }
310
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/lock.h>
36#include <sys/module.h>
37#include <sys/mutex.h>
38#include <sys/bus.h>

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

303 BCM_BSC_UNLOCK(sc);
304
305 sc->sc_iicbus = device_add_child(dev, "iicbus", -1);
306 if (sc->sc_iicbus == NULL) {
307 bcm_bsc_detach(dev);
308 return (ENXIO);
309 }
310
311 return (bus_generic_attach(dev));
311 /* Probe and attach the iicbus when interrupts are available. */
312 config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev);
313
314 return (0);
312}
313
314static int
315bcm_bsc_detach(device_t dev)
316{
317 struct bcm_bsc_softc *sc;
318
319 bus_generic_detach(dev);

--- 194 unchanged lines hidden ---
315}
316
317static int
318bcm_bsc_detach(device_t dev)
319{
320 struct bcm_bsc_softc *sc;
321
322 bus_generic_detach(dev);

--- 194 unchanged lines hidden ---