openpic_iobus.c (176918) | openpic_iobus.c (177884) |
---|---|
1/*- 2 * Copyright 2003 by Peter Grehan. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 17 unchanged lines hidden (view full) --- 26 * 27 */ 28 29/* 30 * The psim iobus attachment for the OpenPIC interrupt controller. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright 2003 by Peter Grehan. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 17 unchanged lines hidden (view full) --- 26 * 27 */ 28 29/* 30 * The psim iobus attachment for the OpenPIC interrupt controller. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/powerpc/psim/openpic_iobus.c 176918 2008-03-07 22:08:43Z marcel $"); | 34__FBSDID("$FreeBSD: head/sys/powerpc/psim/openpic_iobus.c 177884 2008-04-03 17:38:27Z marcel $"); |
35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/module.h> 39#include <sys/bus.h> 40#include <sys/conf.h> 41#include <sys/kernel.h> 42 --- 45 unchanged lines hidden (view full) --- 88 sizeof(struct openpic_softc) 89}; 90 91DRIVER_MODULE(openpic, iobus, openpic_iobus_driver, openpic_devclass, 0, 0); 92 93static int 94openpic_iobus_probe(device_t dev) 95{ | 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/module.h> 39#include <sys/bus.h> 40#include <sys/conf.h> 41#include <sys/kernel.h> 42 --- 45 unchanged lines hidden (view full) --- 88 sizeof(struct openpic_softc) 89}; 90 91DRIVER_MODULE(openpic, iobus, openpic_iobus_driver, openpic_devclass, 0, 0); 92 93static int 94openpic_iobus_probe(device_t dev) 95{ |
96 struct openpic_softc *sc; |
|
96 char *name; 97 98 name = iobus_get_name(dev); 99 if (strcmp(name, "interrupt-controller") != 0) 100 return (ENXIO); 101 102 /* 103 * The description was already printed out in the nexus 104 * probe, so don't do it again here 105 */ 106 device_set_desc(dev, OPENPIC_DEVSTR); | 97 char *name; 98 99 name = iobus_get_name(dev); 100 if (strcmp(name, "interrupt-controller") != 0) 101 return (ENXIO); 102 103 /* 104 * The description was already printed out in the nexus 105 * probe, so don't do it again here 106 */ 107 device_set_desc(dev, OPENPIC_DEVSTR); |
108 109 sc = device_get_softc(dev); 110 sc->sc_psim = 1; 111 |
|
107 return (0); 108} | 112 return (0); 113} |