Deleted Added
full compact
puc.c (142502) puc.c (142531)
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>
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.c 142502 2005-02-25 19:47:18Z sam $");
61__FBSDID("$FreeBSD: head/sys/dev/puc/puc.c 142531 2005-02-26 00:22:52Z marius $");
62
63/*
64 * PCI "universal" communication card device driver, glues com, lpt,
65 * and similar ports to PCI via bridge chip often much larger than
66 * the devices being glued.
67 *
68 * Author: Christopher G. Demetriou, May 14, 1998 (derived from NetBSD
69 * sys/dev/pci/pciide.c, revision 1.6).

--- 22 unchanged lines hidden (view full) ---

92
93#include <machine/bus.h>
94#include <machine/resource.h>
95#include <sys/rman.h>
96
97#include <dev/pci/pcireg.h>
98#include <dev/pci/pcivar.h>
99
62
63/*
64 * PCI "universal" communication card device driver, glues com, lpt,
65 * and similar ports to PCI via bridge chip often much larger than
66 * the devices being glued.
67 *
68 * Author: Christopher G. Demetriou, May 14, 1998 (derived from NetBSD
69 * sys/dev/pci/pciide.c, revision 1.6).

--- 22 unchanged lines hidden (view full) ---

92
93#include <machine/bus.h>
94#include <machine/resource.h>
95#include <sys/rman.h>
96
97#include <dev/pci/pcireg.h>
98#include <dev/pci/pcivar.h>
99
100#ifdef __sparc64__
101#include <sparc64/fhc/fhcreg.h>
102#endif
103
100#define PUC_ENTRAILS 1
101#include <dev/puc/pucvar.h>
102
103struct puc_device {
104 struct resource_list resources;
105 int port;
106 int regshft;
107 u_int serialfreq;

--- 76 unchanged lines hidden (view full) ---

184 bzero(sc, sizeof(*sc));
185 sc->sc_desc = *desc;
186
187#ifdef PUC_DEBUG
188 bootverbose = 1;
189
190 printf("puc: name: %s\n", sc->sc_desc.name);
191#endif
104#define PUC_ENTRAILS 1
105#include <dev/puc/pucvar.h>
106
107struct puc_device {
108 struct resource_list resources;
109 int port;
110 int regshft;
111 u_int serialfreq;

--- 76 unchanged lines hidden (view full) ---

188 bzero(sc, sizeof(*sc));
189 sc->sc_desc = *desc;
190
191#ifdef PUC_DEBUG
192 bootverbose = 1;
193
194 printf("puc: name: %s\n", sc->sc_desc.name);
195#endif
196
192 rid = 0;
197 rid = 0;
198#ifdef __sparc64__
199 if (strcmp(device_get_name(device_get_parent(dev)), "fhc") == 0)
200 rid = FHC_UART;
201#endif
193 res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
194 RF_ACTIVE | RF_SHAREABLE);
195 if (!res)
196 return (ENXIO);
197
198 sc->irqres = res;
199 sc->irqrid = rid;
200#ifdef PUC_FASTINTR

--- 420 unchanged lines hidden ---
202 res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
203 RF_ACTIVE | RF_SHAREABLE);
204 if (!res)
205 return (ENXIO);
206
207 sc->irqres = res;
208 sc->irqrid = rid;
209#ifdef PUC_FASTINTR

--- 420 unchanged lines hidden ---