1/* $NetBSD: puc.c,v 1.7 2000/07/29 17:43:38 jlam Exp $ */
2
3/*-
4 * Copyright (c) 2002 JF Hay. All rights reserved.
5 * Copyright (c) 2000 M. Warner Losh. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 44 unchanged lines hidden (view full) ---
53 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
54 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
57 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58 */
59
60#include <sys/cdefs.h>
61__FBSDID("$FreeBSD: head/sys/dev/puc/puc_pci.c 102734 2002-08-31 20:29:46Z phk $");
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/kernel.h>
66#include <sys/bus.h>
67#include <sys/conf.h>
68#include <sys/malloc.h>
69
70#include <machine/bus.h>
71#include <machine/resource.h>
72#include <sys/rman.h>
73
74#include <dev/pci/pcireg.h>
75#include <dev/pci/pcivar.h>
76
77#define PUC_ENTRAILS 1
78#include <dev/puc/pucvar.h>
79
80#include <opt_puc.h>
81
82static int
83puc_pci_probe(device_t dev)
84{
85 uint32_t v1, v2, d1, d2;
86 const struct puc_device_description *desc;
87
88 if ((pci_read_config(dev, PCIR_HEADERTYPE, 1) & 0x7f) != 0)
89 return (ENXIO);
--- 175 unchanged lines hidden ---
2
3/*-
4 * Copyright (c) 2002 JF Hay. All rights reserved.
5 * Copyright (c) 2000 M. Warner Losh. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 44 unchanged lines hidden (view full) ---
53 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
54 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
57 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58 */
59
60#include <sys/cdefs.h>
61__FBSDID("$FreeBSD: head/sys/dev/puc/puc_pci.c 102734 2002-08-31 20:29:46Z phk $");
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/kernel.h>
66#include <sys/bus.h>
67#include <sys/conf.h>
68#include <sys/malloc.h>
69
70#include <machine/bus.h>
71#include <machine/resource.h>
72#include <sys/rman.h>
73
74#include <dev/pci/pcireg.h>
75#include <dev/pci/pcivar.h>
76
77#define PUC_ENTRAILS 1
78#include <dev/puc/pucvar.h>
79
80#include <opt_puc.h>
81
82static int
83puc_pci_probe(device_t dev)
84{
85 uint32_t v1, v2, d1, d2;
86 const struct puc_device_description *desc;
87
88 if ((pci_read_config(dev, PCIR_HEADERTYPE, 1) & 0x7f) != 0)
89 return (ENXIO);
--- 175 unchanged lines hidden ---