cfi_bus_nexus.c revision 249072
1188087Ssam/*-
2249072Sbrooks * Copyright (c) 2012 SRI International
3188089Ssam * Copyright (c) 2009 Roelof Jonkman, Carlson Wireless Inc.
4188087Ssam * Copyright (c) 2009 Sam Leffler, Errno Consulting
5188087Ssam * All rights reserved.
6188087Ssam *
7188087Ssam * Redistribution and use in source and binary forms, with or without
8188087Ssam * modification, are permitted provided that the following conditions
9188087Ssam * are met:
10188087Ssam * 1. Redistributions of source code must retain the above copyright
11188087Ssam *    notice, this list of conditions and the following disclaimer.
12188087Ssam * 2. Redistributions in binary form must reproduce the above copyright
13188087Ssam *    notice, this list of conditions and the following disclaimer in the
14188087Ssam *    documentation and/or other materials provided with the distribution.
15188087Ssam *
16188087Ssam * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17188087Ssam * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18188087Ssam * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19188087Ssam * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20188087Ssam * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21188087Ssam * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22188087Ssam * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23188087Ssam * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24188087Ssam * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25188087Ssam * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26188087Ssam */
27188087Ssam
28188087Ssam#include <sys/cdefs.h>
29188087Ssam__FBSDID("$FreeBSD: head/sys/dev/cfi/cfi_bus_nexus.c 249072 2013-04-03 22:37:40Z brooks $");
30188087Ssam
31188087Ssam#include <sys/param.h>
32188087Ssam#include <sys/systm.h>
33188087Ssam#include <sys/bus.h>
34188087Ssam#include <sys/conf.h>
35188087Ssam#include <sys/kernel.h>
36188087Ssam#include <sys/malloc.h>
37188087Ssam#include <sys/module.h>
38188087Ssam#include <sys/rman.h>
39188087Ssam#include <sys/sysctl.h>
40188087Ssam
41188087Ssam#include <machine/bus.h>
42188087Ssam
43188087Ssam#include <dev/cfi/cfi_var.h>
44188087Ssam
45188087Ssamstatic int
46249072Sbrookscfi_nexus_probe(device_t dev)
47188087Ssam{
48249072Sbrooks
49188087Ssam	return cfi_probe(dev);
50188087Ssam}
51188087Ssam
52249072Sbrooksstatic device_method_t cfi_nexus_methods[] = {
53188087Ssam	/* device interface */
54249072Sbrooks	DEVMETHOD(device_probe,		cfi_nexus_probe),
55188087Ssam	DEVMETHOD(device_attach,	cfi_attach),
56188087Ssam	DEVMETHOD(device_detach,	cfi_detach),
57188087Ssam
58249072Sbrooks	{0, 0}
59188087Ssam};
60188087Ssam
61249072Sbrooksstatic driver_t cfi_nexus_driver = {
62188087Ssam	cfi_driver_name,
63249072Sbrooks	cfi_nexus_methods,
64188087Ssam	sizeof(struct cfi_softc),
65188087Ssam};
66249072SbrooksDRIVER_MODULE(cfi, nexus, cfi_nexus_driver, cfi_devclass, 0, 0);
67