Sat May 3 12:51:32 2014 UTC ()
Also attach to devices named "parallel"


(martin)
diff -r1.23 -r1.24 src/sys/arch/sparc64/dev/lpt_ebus.c

cvs diff -r1.23 -r1.24 src/sys/arch/sparc64/dev/lpt_ebus.c (expand / switch to unified diff)

--- src/sys/arch/sparc64/dev/lpt_ebus.c 2011/07/01 18:48:36 1.23
+++ src/sys/arch/sparc64/dev/lpt_ebus.c 2014/05/03 12:51:31 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lpt_ebus.c,v 1.23 2011/07/01 18:48:36 dyoung Exp $ */ 1/* $NetBSD: lpt_ebus.c,v 1.24 2014/05/03 12:51:31 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999, 2000 Matthew R. Green 4 * Copyright (c) 1999, 2000 Matthew R. Green
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -21,55 +21,57 @@ @@ -21,55 +21,57 @@
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29/* 29/*
30 * NS Super I/O PC87332VLJ "lpt" to ebus attachment 30 * NS Super I/O PC87332VLJ "lpt" to ebus attachment
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: lpt_ebus.c,v 1.23 2011/07/01 18:48:36 dyoung Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: lpt_ebus.c,v 1.24 2014/05/03 12:51:31 martin Exp $");
35 35
36#include <sys/types.h> 36#include <sys/types.h>
37#include <sys/param.h> 37#include <sys/param.h>
38#include <sys/systm.h> 38#include <sys/systm.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/tty.h> 40#include <sys/tty.h>
41 41
42#include <sys/bus.h> 42#include <sys/bus.h>
43 43
44#include <dev/ebus/ebusreg.h> 44#include <dev/ebus/ebusreg.h>
45#include <dev/ebus/ebusvar.h> 45#include <dev/ebus/ebusvar.h>
46 46
47#include <dev/ic/lptvar.h> 47#include <dev/ic/lptvar.h>
48 48
49int lpt_ebus_match(device_t, cfdata_t , void *); 49int lpt_ebus_match(device_t, cfdata_t , void *);
50void lpt_ebus_attach(device_t, device_t, void *); 50void lpt_ebus_attach(device_t, device_t, void *);
51 51
52CFATTACH_DECL_NEW(lpt_ebus, sizeof(struct lpt_softc), 52CFATTACH_DECL_NEW(lpt_ebus, sizeof(struct lpt_softc),
53 lpt_ebus_match, lpt_ebus_attach, NULL, NULL); 53 lpt_ebus_match, lpt_ebus_attach, NULL, NULL);
54 54
55#define ROM_LPT_NAME "ecpp" 55#define ROM_LPT_NAME "ecpp"
 56#define ROM_LPT_NAME2 "parallel"
56 57
57int 58int
58lpt_ebus_match(device_t parent, cfdata_t match, void *aux) 59lpt_ebus_match(device_t parent, cfdata_t match, void *aux)
59{ 60{
60 struct ebus_attach_args *ea = aux; 61 struct ebus_attach_args *ea = aux;
61 62
62 if (strcmp(ea->ea_name, ROM_LPT_NAME) == 0) 63 if (strcmp(ea->ea_name, ROM_LPT_NAME) == 0
 64 || strcmp(ea->ea_name, ROM_LPT_NAME2) == 0)
63 return (1); 65 return (1);
64 66
65 return (0); 67 return (0);
66} 68}
67 69
68void 70void
69lpt_ebus_attach(device_t parent, device_t self, void *aux) 71lpt_ebus_attach(device_t parent, device_t self, void *aux)
70{ 72{
71 struct lpt_softc *sc = device_private(self); 73 struct lpt_softc *sc = device_private(self);
72 struct ebus_attach_args *ea = aux; 74 struct ebus_attach_args *ea = aux;
73 int i; 75 int i;
74 76
75 sc->sc_dev = self; 77 sc->sc_dev = self;