1/*- 2 * Copyright (c) 2009, Nathan Whitehorn <nwhitehorn@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 --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: stable/11/sys/dev/iicbus/ofw_iicbus.c 331501 2018-03-24 22:39:38Z ian $"); |
29 30#include <sys/param.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/libkern.h> 34#include <sys/lock.h> 35#include <sys/module.h> 36#include <sys/mutex.h> --- 34 unchanged lines hidden (view full) --- 71 DEVMETHOD_END 72}; 73 74struct ofw_iicbus_devinfo { 75 struct iicbus_ivar opd_dinfo; /* Must be the first. */ 76 struct ofw_bus_devinfo opd_obdinfo; 77}; 78 |
79devclass_t ofw_iicbus_devclass; |
80 81DEFINE_CLASS_1(iicbus, ofw_iicbus_driver, ofw_iicbus_methods, 82 sizeof(struct iicbus_softc), iicbus_driver); |
83EARLY_DRIVER_MODULE(ofw_iicbus, iicbb, ofw_iicbus_driver, ofw_iicbus_devclass, |
84 0, 0, BUS_PASS_BUS); |
85EARLY_DRIVER_MODULE(ofw_iicbus, iichb, ofw_iicbus_driver, ofw_iicbus_devclass, |
86 0, 0, BUS_PASS_BUS); |
87EARLY_DRIVER_MODULE(ofw_iicbus, twsi, ofw_iicbus_driver, ofw_iicbus_devclass, 88 0, 0, BUS_PASS_BUS); |
89MODULE_VERSION(ofw_iicbus, 1); 90MODULE_DEPEND(ofw_iicbus, iicbus, 1, 1, 1); 91 92static int 93ofw_iicbus_probe(device_t dev) 94{ 95 96 if (ofw_bus_get_node(dev) == -1) --- 144 unchanged lines hidden --- |