/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2012 SRI International4* Copyright (c) 2009 Roelof Jonkman, Carlson Wireless Inc.5* Copyright (c) 2009 Sam Leffler, Errno Consulting6* All rights reserved.7*8* Portions of this software were developed by SRI International and the9* University of Cambridge Computer Laboratory under DARPA/AFRL contract10* (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research11* programme.12*13* Redistribution and use in source and binary forms, with or without14* modification, are permitted provided that the following conditions15* are met:16* 1. Redistributions of source code must retain the above copyright17* notice, this list of conditions and the following disclaimer.18* 2. Redistributions in binary form must reproduce the above copyright19* notice, this list of conditions and the following disclaimer in the20* documentation and/or other materials provided with the distribution.21*22* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR23* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES24* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.25* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,26* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT27* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,28* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY29* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT30* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF31* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.32*/3334#include <sys/param.h>35#include <sys/systm.h>36#include <sys/bus.h>37#include <sys/conf.h>38#include <sys/kernel.h>39#include <sys/malloc.h>40#include <sys/module.h>41#include <sys/rman.h>42#include <sys/sysctl.h>4344#include <machine/bus.h>4546#include <dev/cfi/cfi_var.h>4748static int49cfi_nexus_probe(device_t dev)50{51return (BUS_PROBE_NOWILDCARD);52}5354static int55cfi_nexus_attach(device_t dev)56{57int error;5859error = cfi_probe(dev);60if (error != 0)61return (error);6263return cfi_attach(dev);64}6566static device_method_t cfi_nexus_methods[] = {67/* device interface */68DEVMETHOD(device_probe, cfi_nexus_probe),69DEVMETHOD(device_attach, cfi_nexus_attach),70DEVMETHOD(device_detach, cfi_detach),71{0, 0}72};7374static driver_t cfi_nexus_driver = {75cfi_driver_name,76cfi_nexus_methods,77sizeof(struct cfi_softc),78};7980DRIVER_MODULE(cfi, nexus, cfi_nexus_driver, 0, 0);818283