2 * Copyright (c) 2003-2012 Broadcom Corporation
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in
13 * the documentation and/or other materials provided with the
16 * THIS SOFTWARE IS PROVIDED BY BROADCOM ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #include <sys/cdefs.h>
30 __FBSDID("$FreeBSD$");
32 #include <sys/param.h>
33 #include <sys/systm.h>
36 #include <sys/kernel.h>
37 #include <sys/module.h>
38 #include <machine/bus.h>
40 #include <machine/resource.h>
42 #include <dev/pci/pcivar.h>
44 #include <dev/cfi/cfi_var.h>
46 #include <mips/nlm/hal/haldefs.h>
47 #include <mips/nlm/hal/iomap.h>
49 static int cfi_xlp_probe(device_t dev);
51 static device_method_t cfi_xlp_methods[] = {
52 /* Device interface */
53 DEVMETHOD(device_probe, cfi_xlp_probe),
54 DEVMETHOD(device_attach, cfi_attach),
55 DEVMETHOD(device_detach, cfi_detach),
59 static driver_t cfi_xlp_driver = {
62 sizeof(struct cfi_softc),
66 cfi_xlp_probe(device_t dev)
69 if (pci_get_vendor(dev) != PCI_VENDOR_NETLOGIC ||
70 pci_get_device(dev) != PCI_DEVICE_ID_NLM_NOR)
73 device_set_desc(dev, "Netlogic XLP NOR Bus");
74 return (cfi_probe(dev));
77 DRIVER_MODULE(cfi_xlp, pci, cfi_xlp_driver, cfi_devclass, 0, 0);