1139826Simp/*-
253541Sshin * Copyright (c) 2012 SRI International
353541Sshin * Copyright (c) 2009 Roelof Jonkman, Carlson Wireless Inc.
453541Sshin * Copyright (c) 2009 Sam Leffler, Errno Consulting
553541Sshin * All rights reserved.
653541Sshin *
753541Sshin * Portions of this software were developed by SRI International and the
853541Sshin * University of Cambridge Computer Laboratory under DARPA/AFRL contract
953541Sshin * (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research
1053541Sshin * programme.
1153541Sshin *
1253541Sshin * Redistribution and use in source and binary forms, with or without
1353541Sshin * modification, are permitted provided that the following conditions
1453541Sshin * are met:
1553541Sshin * 1. Redistributions of source code must retain the above copyright
1653541Sshin *    notice, this list of conditions and the following disclaimer.
1753541Sshin * 2. Redistributions in binary form must reproduce the above copyright
1853541Sshin *    notice, this list of conditions and the following disclaimer in the
1953541Sshin *    documentation and/or other materials provided with the distribution.
2053541Sshin *
2153541Sshin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2253541Sshin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2353541Sshin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2453541Sshin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2553541Sshin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2653541Sshin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2753541Sshin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28174510Sobrien * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29174510Sobrien * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3053541Sshin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3153541Sshin */
32174510Sobrien
33174510Sobrien#include <sys/cdefs.h>
34174510Sobrien__FBSDID("$FreeBSD$");
3553541Sshin
3653541Sshin#include <sys/param.h>
3753541Sshin#include <sys/systm.h>
3853541Sshin#include <sys/bus.h>
3953541Sshin#include <sys/conf.h>
40193066Sjamie#include <sys/kernel.h>
4153541Sshin#include <sys/malloc.h>
42196019Srwatson#include <sys/module.h>
4378064Sume#include <sys/rman.h>
4453541Sshin#include <sys/sysctl.h>
4553541Sshin
4653541Sshin#include <machine/bus.h>
4753541Sshin
4853541Sshin#include <dev/cfi/cfi_var.h>
4953541Sshin
50185571Sbzstatic int
5153541Sshincfi_nexus_probe(device_t dev)
5253541Sshin{
5353541Sshin
5453541Sshin	return cfi_probe(dev);
5581127Sume}
56195699Srwatson
57195699Srwatsonstatic device_method_t cfi_nexus_methods[] = {
58195699Srwatson	/* device interface */
5953541Sshin	DEVMETHOD(device_probe,		cfi_nexus_probe),
6062587Sitojun	DEVMETHOD(device_attach,	cfi_attach),
6153541Sshin	DEVMETHOD(device_detach,	cfi_detach),
6278064Sume
6381127Sume	{0, 0}
6453541Sshin};
6553541Sshin
6653541Sshinstatic driver_t cfi_nexus_driver = {
67191672Sbms	cfi_driver_name,
6862587Sitojun	cfi_nexus_methods,
6953541Sshin	sizeof(struct cfi_softc),
70195699Srwatson};
71195699SrwatsonDRIVER_MODULE(cfi, nexus, cfi_nexus_driver, cfi_devclass, 0, 0);
72195699Srwatson