Fri Dec 12 17:36:14 2008 UTC ()
CFATTACH_DECL -> CFATTACH_DECL_NEW


(matt)
diff -r1.3 -r1.4 src/sys/arch/arm/omap/obio_ohci.c
diff -r1.3 -r1.4 src/sys/arch/arm/omap/omap_emifs.c
diff -r1.3 -r1.4 src/sys/arch/arm/omap/omap_gpio.c
diff -r1.3 -r1.4 src/sys/arch/arm/omap/omap_ocp.c
diff -r1.3 -r1.4 src/sys/arch/arm/omap/omap_rtc.c
diff -r1.3 -r1.4 src/sys/arch/arm/omap/omap_tipb.c
diff -r1.6 -r1.7 src/sys/arch/arm/omap/omap2_obio.c
diff -r1.4 -r1.5 src/sys/arch/arm/omap/omap_mputmr.c

cvs diff -r1.3 -r1.4 src/sys/arch/arm/omap/Attic/obio_ohci.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/obio_ohci.c 2008/10/24 05:39:00 1.3
+++ src/sys/arch/arm/omap/Attic/obio_ohci.c 2008/12/12 17:36:14 1.4
@@ -1,39 +1,39 @@ @@ -1,39 +1,39 @@
1/* $Id: obio_ohci.c,v 1.3 2008/10/24 05:39:00 matt Exp $ */ 1/* $Id: obio_ohci.c,v 1.4 2008/12/12 17:36:14 matt Exp $ */
2 2
3/* adapted from: */ 3/* adapted from: */
4/* $NetBSD: obio_ohci.c,v 1.3 2008/10/24 05:39:00 matt Exp $ */ 4/* $NetBSD: obio_ohci.c,v 1.4 2008/12/12 17:36:14 matt Exp $ */
5/* $OpenBSD: pxa2x0_ohci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */ 5/* $OpenBSD: pxa2x0_ohci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */
6 6
7/* 7/*
8 * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> 8 * Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
9 * 9 *
10 * Permission to use, copy, modify, and distribute this software for any 10 * Permission to use, copy, modify, and distribute this software for any
11 * purpose with or without fee is hereby granted, provided that the above 11 * purpose with or without fee is hereby granted, provided that the above
12 * copyright notice and this permission notice appear in all copies. 12 * copyright notice and this permission notice appear in all copies.
13 * 13 *
14 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 14 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 */ 21 */
22 22
23#include "opt_omap.h" 23#include "opt_omap.h"
24 24
25#include <sys/cdefs.h> 25#include <sys/cdefs.h>
26__KERNEL_RCSID(0, "$NetBSD: obio_ohci.c,v 1.3 2008/10/24 05:39:00 matt Exp $"); 26__KERNEL_RCSID(0, "$NetBSD: obio_ohci.c,v 1.4 2008/12/12 17:36:14 matt Exp $");
27 27
28#include <sys/param.h> 28#include <sys/param.h>
29#include <sys/systm.h> 29#include <sys/systm.h>
30#include <sys/device.h> 30#include <sys/device.h>
31#include <sys/kernel.h> 31#include <sys/kernel.h>
32 32
33#include <machine/intr.h> 33#include <machine/intr.h>
34#include <machine/bus.h> 34#include <machine/bus.h>
35 35
36#include <dev/usb/usb.h> 36#include <dev/usb/usb.h>
37#include <dev/usb/usbdi.h> 37#include <dev/usb/usbdi.h>
38#include <dev/usb/usbdivar.h> 38#include <dev/usb/usbdivar.h>
39#include <dev/usb/usb_mem.h> 39#include <dev/usb/usb_mem.h>
@@ -49,27 +49,27 @@ struct obioohci_softc { @@ -49,27 +49,27 @@ struct obioohci_softc {
49 ohci_softc_t sc; 49 ohci_softc_t sc;
50 50
51 void *sc_ih; 51 void *sc_ih;
52 bus_addr_t sc_addr; 52 bus_addr_t sc_addr;
53 bus_addr_t sc_size; 53 bus_addr_t sc_size;
54}; 54};
55 55
56static int obioohci_match(struct device *, struct cfdata *, void *); 56static int obioohci_match(struct device *, struct cfdata *, void *);
57static void obioohci_attach(struct device *, struct device *, void *); 57static void obioohci_attach(struct device *, struct device *, void *);
58static int obioohci_detach(struct device *, int); 58static int obioohci_detach(struct device *, int);
59void * obioohci_fake_intr_establish(int (*)(void *), void *); 59void * obioohci_fake_intr_establish(int (*)(void *), void *);
60void obioohci_fake_intr(void); 60void obioohci_fake_intr(void);
61 61
62CFATTACH_DECL(obioohci, sizeof(struct obioohci_softc), 62CFATTACH_DECL_NEW(obioohci, sizeof(struct obioohci_softc),
63 obioohci_match, obioohci_attach, obioohci_detach, ohci_activate); 63 obioohci_match, obioohci_attach, obioohci_detach, ohci_activate);
64 64
65static void obioohci_clkinit(struct obio_attach_args *); 65static void obioohci_clkinit(struct obio_attach_args *);
66static void obioohci_power(int, void *); 66static void obioohci_power(int, void *);
67static void obioohci_enable(struct obioohci_softc *); 67static void obioohci_enable(struct obioohci_softc *);
68static void obioohci_disable(struct obioohci_softc *); 68static void obioohci_disable(struct obioohci_softc *);
69 69
70#define HREAD4(sc,r) bus_space_read_4((sc)->sc.iot, (sc)->sc.ioh, (r)) 70#define HREAD4(sc,r) bus_space_read_4((sc)->sc.iot, (sc)->sc.ioh, (r))
71#define HWRITE4(sc,r,v) bus_space_write_4((sc)->sc.iot, (sc)->sc.ioh, (r), (v)) 71#define HWRITE4(sc,r,v) bus_space_write_4((sc)->sc.iot, (sc)->sc.ioh, (r), (v))
72 72
73static int 73static int
74obioohci_match(struct device *parent, struct cfdata *cf, void *aux) 74obioohci_match(struct device *parent, struct cfdata *cf, void *aux)
75{ 75{

cvs diff -r1.3 -r1.4 src/sys/arch/arm/omap/Attic/omap_emifs.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap_emifs.c 2008/11/21 17:13:07 1.3
+++ src/sys/arch/arm/omap/Attic/omap_emifs.c 2008/12/12 17:36:14 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: omap_emifs.c,v 1.3 2008/11/21 17:13:07 matt Exp $ */ 1/* $NetBSD: omap_emifs.c,v 1.4 2008/12/12 17:36:14 matt Exp $ */
2 2
3 3
4/* 4/*
5 * Autoconfiguration support for the Texas Instruments OMAP EMIFS bus. 5 * Autoconfiguration support for the Texas Instruments OMAP EMIFS bus.
6 * Based on arm/xscale/pxa2x0.c which in turn was derived 6 * Based on arm/xscale/pxa2x0.c which in turn was derived
7 * from arm/sa11x0/sa11x0.c 7 * from arm/sa11x0/sa11x0.c
8 * 8 *
9 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved. 9 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved.
10 * Written by Hiroyuki Bessho for Genetec Corporation. 10 * Written by Hiroyuki Bessho for Genetec Corporation.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -87,27 +87,27 @@ @@ -87,27 +87,27 @@
87 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 87 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
88 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 88 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
89 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 89 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
90 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 90 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
91 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 91 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
92 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 92 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
93 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 93 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
94 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 94 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
95 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 95 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
96 * SUCH DAMAGE. 96 * SUCH DAMAGE.
97 */ 97 */
98 98
99#include <sys/cdefs.h> 99#include <sys/cdefs.h>
100__KERNEL_RCSID(0, "$NetBSD: omap_emifs.c,v 1.3 2008/11/21 17:13:07 matt Exp $"); 100__KERNEL_RCSID(0, "$NetBSD: omap_emifs.c,v 1.4 2008/12/12 17:36:14 matt Exp $");
101 101
102#include "locators.h" 102#include "locators.h"
103 103
104#include <sys/param.h> 104#include <sys/param.h>
105#include <sys/systm.h> 105#include <sys/systm.h>
106#include <sys/device.h> 106#include <sys/device.h>
107#include <sys/kernel.h> 107#include <sys/kernel.h>
108#include <sys/reboot.h> 108#include <sys/reboot.h>
109 109
110#include <machine/cpu.h> 110#include <machine/cpu.h>
111#include <machine/bus.h> 111#include <machine/bus.h>
112 112
113#include <arm/cpufunc.h> 113#include <arm/cpufunc.h>
@@ -155,27 +155,27 @@ static int emifs_print(void *, const cha @@ -155,27 +155,27 @@ static int emifs_print(void *, const cha
155#define EMIFS_SIZE 256 /* per TRM */ 155#define EMIFS_SIZE 256 /* per TRM */
156 156
157static const timing_parm_info timing_parms[] = { 157static const timing_parm_info timing_parms[] = {
158 { "rdwst", EMIFSCF_RDWST, REF_CLK, CCS, 4, 2, 0xF }, 158 { "rdwst", EMIFSCF_RDWST, REF_CLK, CCS, 4, 2, 0xF },
159 { "oesetup", EMIFSCF_OESETUP, REF_CLK, ACS, 0, 0, 0xF }, 159 { "oesetup", EMIFSCF_OESETUP, REF_CLK, ACS, 0, 0, 0xF },
160 { "oehold", EMIFSCF_OEHOLD, REF_CLK, ACS, 4, 0, 0xF }, 160 { "oehold", EMIFSCF_OEHOLD, REF_CLK, ACS, 4, 0, 0xF },
161 { "wrwst", EMIFSCF_WRWST, REF_CLK, CCS, 8, 1, 0xF }, 161 { "wrwst", EMIFSCF_WRWST, REF_CLK, CCS, 8, 1, 0xF },
162 { "welen", EMIFSCF_WELEN, REF_CLK, CCS, 12, 1, 0xF }, 162 { "welen", EMIFSCF_WELEN, REF_CLK, CCS, 12, 1, 0xF },
163 { "advhold", EMIFSCF_ADVHOLD, REF_CLK, ACS, 8, 1, 0x1 }, 163 { "advhold", EMIFSCF_ADVHOLD, REF_CLK, ACS, 8, 1, 0x1 },
164 { "btwst", EMIFSCF_BTWST, TC_CLK, CCS, 23, 1, 0xF } 164 { "btwst", EMIFSCF_BTWST, TC_CLK, CCS, 23, 1, 0xF }
165}; 165};
166 166
167/* attach structures */ 167/* attach structures */
168CFATTACH_DECL(emifs, sizeof(struct emifs_softc), 168CFATTACH_DECL_NEW(emifs, sizeof(struct emifs_softc),
169 emifs_match, emifs_attach, NULL, NULL); 169 emifs_match, emifs_attach, NULL, NULL);
170 170
171static int emifs_attached; 171static int emifs_attached;
172 172
173static int 173static int
174emifs_match(device_t parent, cfdata_t match, void *aux) 174emifs_match(device_t parent, cfdata_t match, void *aux)
175{ 175{
176 if (emifs_attached) 176 if (emifs_attached)
177 return 0; 177 return 0;
178 return 1; 178 return 1;
179} 179}
180 180
181static void 181static void

cvs diff -r1.3 -r1.4 src/sys/arch/arm/omap/Attic/omap_gpio.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap_gpio.c 2008/11/21 17:13:07 1.3
+++ src/sys/arch/arm/omap/Attic/omap_gpio.c 2008/12/12 17:36:14 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: omap_gpio.c,v 1.3 2008/11/21 17:13:07 matt Exp $ */ 1/* $NetBSD: omap_gpio.c,v 1.4 2008/12/12 17:36:14 matt Exp $ */
2 2
3/* 3/*
4 * The OMAP GPIO Controller interface is inspired by pxa2x0_gpio.c 4 * The OMAP GPIO Controller interface is inspired by pxa2x0_gpio.c
5 * 5 *
6 * Copyright 2003 Wasabi Systems, Inc. 6 * Copyright 2003 Wasabi Systems, Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Written by Steve C. Woodford for Wasabi Systems, Inc. 9 * Written by Steve C. Woodford for Wasabi Systems, Inc.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -28,27 +28,27 @@ @@ -28,27 +28,27 @@
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 29 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 30 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
31 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE. 37 * POSSIBILITY OF SUCH DAMAGE.
38 */ 38 */
39 39
40#include <sys/cdefs.h> 40#include <sys/cdefs.h>
41__KERNEL_RCSID(0, "$NetBSD: omap_gpio.c,v 1.3 2008/11/21 17:13:07 matt Exp $"); 41__KERNEL_RCSID(0, "$NetBSD: omap_gpio.c,v 1.4 2008/12/12 17:36:14 matt Exp $");
42 42
43#include <sys/param.h> 43#include <sys/param.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45#include <sys/device.h> 45#include <sys/device.h>
46#include <sys/malloc.h> 46#include <sys/malloc.h>
47 47
48#include <machine/intr.h> 48#include <machine/intr.h>
49#include <machine/bus.h> 49#include <machine/bus.h>
50 50
51#include <arm/omap/omap_tipb.h> 51#include <arm/omap/omap_tipb.h>
52#include <arm/omap/omap_gpio.h> 52#include <arm/omap/omap_gpio.h>
53#include <arm/omap/omap_gpioreg.h> 53#include <arm/omap/omap_gpioreg.h>
54 54
@@ -69,27 +69,27 @@ struct omapgpio_softc { @@ -69,27 +69,27 @@ struct omapgpio_softc {
69 device_t sc_dev; 69 device_t sc_dev;
70 bus_space_tag_t sc_bust; 70 bus_space_tag_t sc_bust;
71 bus_space_handle_t sc_bush; 71 bus_space_handle_t sc_bush;
72 void *sc_irqcookie; 72 void *sc_irqcookie;
73 u_int16_t sc_mask; 73 u_int16_t sc_mask;
74 struct gpio_irq_handler *sc_handlers[GPIO_NPINS]; 74 struct gpio_irq_handler *sc_handlers[GPIO_NPINS];
75}; 75};
76 76
77static int omapgpio_match(device_t, cfdata_t, void *); 77static int omapgpio_match(device_t, cfdata_t, void *);
78static void omapgpio_attach(device_t, device_t, void *); 78static void omapgpio_attach(device_t, device_t, void *);
79 79
80extern struct cfdriver omapgpio_cd; 80extern struct cfdriver omapgpio_cd;
81 81
82CFATTACH_DECL(omapgpio, sizeof(struct omapgpio_softc), 82CFATTACH_DECL_NEW(omapgpio, sizeof(struct omapgpio_softc),
83 omapgpio_match, omapgpio_attach, NULL, NULL); 83 omapgpio_match, omapgpio_attach, NULL, NULL);
84 84
85static int omapgpio_intr(void *); 85static int omapgpio_intr(void *);
86 86
87static int 87static int
88omapgpio_match(device_t parent, cfdata_t cf, void *aux) 88omapgpio_match(device_t parent, cfdata_t cf, void *aux)
89{ 89{
90 struct tipb_attach_args *tipb = aux; 90 struct tipb_attach_args *tipb = aux;
91 91
92 if (tipb->tipb_addr == -1 || tipb->tipb_intr == -1) { 92 if (tipb->tipb_addr == -1 || tipb->tipb_intr == -1) {
93 panic("omapgpio must have addr and intr specified in config."); 93 panic("omapgpio must have addr and intr specified in config.");
94 } 94 }
95 95

cvs diff -r1.3 -r1.4 src/sys/arch/arm/omap/Attic/omap_ocp.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap_ocp.c 2008/11/21 17:13:07 1.3
+++ src/sys/arch/arm/omap/Attic/omap_ocp.c 2008/12/12 17:36:14 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: omap_ocp.c,v 1.3 2008/11/21 17:13:07 matt Exp $ */ 1/* $NetBSD: omap_ocp.c,v 1.4 2008/12/12 17:36:14 matt Exp $ */
2 2
3/* 3/*
4 * Autoconfiguration support for the Texas Instruments OMAP OCP bus. 4 * Autoconfiguration support for the Texas Instruments OMAP OCP bus.
5 * Based on arm/xscale/pxa2x0.c which in turn was derived 5 * Based on arm/xscale/pxa2x0.c which in turn was derived
6 * from arm/sa11x0/sa11x0.c 6 * from arm/sa11x0/sa11x0.c
7 * 7 *
8 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved. 8 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved.
9 * Written by Hiroyuki Bessho for Genetec Corporation. 9 * Written by Hiroyuki Bessho for Genetec Corporation.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -86,27 +86,27 @@ @@ -86,27 +86,27 @@
86 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 86 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
87 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 87 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
88 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 88 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
89 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 89 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
90 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 90 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
91 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 91 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
92 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 92 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
93 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 93 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
94 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 94 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
95 * SUCH DAMAGE. 95 * SUCH DAMAGE.
96 */ 96 */
97 97
98#include <sys/cdefs.h> 98#include <sys/cdefs.h>
99__KERNEL_RCSID(0, "$NetBSD: omap_ocp.c,v 1.3 2008/11/21 17:13:07 matt Exp $"); 99__KERNEL_RCSID(0, "$NetBSD: omap_ocp.c,v 1.4 2008/12/12 17:36:14 matt Exp $");
100 100
101#include "locators.h" 101#include "locators.h"
102 102
103#include <sys/param.h> 103#include <sys/param.h>
104#include <sys/systm.h> 104#include <sys/systm.h>
105#include <sys/device.h> 105#include <sys/device.h>
106#include <sys/kernel.h> 106#include <sys/kernel.h>
107#include <sys/reboot.h> 107#include <sys/reboot.h>
108 108
109#include <machine/cpu.h> 109#include <machine/cpu.h>
110#include <machine/bus.h> 110#include <machine/bus.h>
111 111
112#include <arm/cpufunc.h> 112#include <arm/cpufunc.h>
@@ -116,27 +116,27 @@ __KERNEL_RCSID(0, "$NetBSD: omap_ocp.c,v @@ -116,27 +116,27 @@ __KERNEL_RCSID(0, "$NetBSD: omap_ocp.c,v
116 116
117struct ocp_softc { 117struct ocp_softc {
118 device_t sc_dev; 118 device_t sc_dev;
119 bus_dma_tag_t sc_dmac; 119 bus_dma_tag_t sc_dmac;
120}; 120};
121 121
122/* prototypes */ 122/* prototypes */
123static int ocp_match(device_t, cfdata_t, void *); 123static int ocp_match(device_t, cfdata_t, void *);
124static void ocp_attach(device_t, device_t, void *); 124static void ocp_attach(device_t, device_t, void *);
125static int ocp_search(device_t, cfdata_t, const int *, void *); 125static int ocp_search(device_t, cfdata_t, const int *, void *);
126static int ocp_print(void *, const char *); 126static int ocp_print(void *, const char *);
127 127
128/* attach structures */ 128/* attach structures */
129CFATTACH_DECL(ocp, sizeof(struct ocp_softc), 129CFATTACH_DECL_NEW(ocp, sizeof(struct ocp_softc),
130 ocp_match, ocp_attach, NULL, NULL); 130 ocp_match, ocp_attach, NULL, NULL);
131 131
132static int ocp_attached; 132static int ocp_attached;
133 133
134static int 134static int
135ocp_match(device_t parent, cfdata_t match, void *aux) 135ocp_match(device_t parent, cfdata_t match, void *aux)
136{ 136{
137 if (ocp_attached) 137 if (ocp_attached)
138 return 0; 138 return 0;
139 return 1; 139 return 1;
140} 140}
141 141
142static void 142static void

cvs diff -r1.3 -r1.4 src/sys/arch/arm/omap/Attic/omap_rtc.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap_rtc.c 2008/11/21 17:13:07 1.3
+++ src/sys/arch/arm/omap/Attic/omap_rtc.c 2008/12/12 17:36:14 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: omap_rtc.c,v 1.3 2008/11/21 17:13:07 matt Exp $ */ 1/* $NetBSD: omap_rtc.c,v 1.4 2008/12/12 17:36:14 matt Exp $ */
2 2
3/* 3/*
4 * OMAP RTC driver, based on i80321_timer.c. 4 * OMAP RTC driver, based on i80321_timer.c.
5 * 5 *
6 * Copyright (c) 2007 Microsoft 6 * Copyright (c) 2007 Microsoft
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, 24 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT,
25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE. 31 * SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: omap_rtc.c,v 1.3 2008/11/21 17:13:07 matt Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: omap_rtc.c,v 1.4 2008/12/12 17:36:14 matt Exp $");
36 36
37#include <sys/types.h> 37#include <sys/types.h>
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/kernel.h> 40#include <sys/kernel.h>
41#include <sys/time.h> 41#include <sys/time.h>
42#include <sys/device.h> 42#include <sys/device.h>
43#include <dev/clock_subr.h> 43#include <dev/clock_subr.h>
44 44
45#include <machine/bus.h> 45#include <machine/bus.h>
46#include <machine/intr.h> 46#include <machine/intr.h>
47 47
48#include <arm/omap/omap_reg.h> 48#include <arm/omap/omap_reg.h>
@@ -80,27 +80,27 @@ __KERNEL_RCSID(0, "$NetBSD: omap_rtc.c,v @@ -80,27 +80,27 @@ __KERNEL_RCSID(0, "$NetBSD: omap_rtc.c,v
80 80
81static int omaprtc_match(device_t, cfdata_t, void *); 81static int omaprtc_match(device_t, cfdata_t, void *);
82static void omaprtc_attach(device_t, device_t, void *); 82static void omaprtc_attach(device_t, device_t, void *);
83 83
84struct omaprtc_softc { 84struct omaprtc_softc {
85 device_t sc_dev; 85 device_t sc_dev;
86 bus_space_tag_t sc_iot; 86 bus_space_tag_t sc_iot;
87 bus_space_handle_t sc_ioh; 87 bus_space_handle_t sc_ioh;
88 int sc_intr; 88 int sc_intr;
89 void *sc_irqcookie; 89 void *sc_irqcookie;
90 struct todr_chip_handle sc_todr; 90 struct todr_chip_handle sc_todr;
91}; 91};
92 92
93CFATTACH_DECL(omaprtc, sizeof(struct omaprtc_softc), 93CFATTACH_DECL_NEW(omaprtc, sizeof(struct omaprtc_softc),
94 omaprtc_match, omaprtc_attach, NULL, NULL); 94 omaprtc_match, omaprtc_attach, NULL, NULL);
95 95
96static int omaprtc_gettime(todr_chip_handle_t, struct clock_ymdhms *); 96static int omaprtc_gettime(todr_chip_handle_t, struct clock_ymdhms *);
97static int omaprtc_settime(todr_chip_handle_t, struct clock_ymdhms *); 97static int omaprtc_settime(todr_chip_handle_t, struct clock_ymdhms *);
98 98
99#define rtc_is_busy() (bus_space_read_1(sc->sc_iot, sc->sc_ioh, \ 99#define rtc_is_busy() (bus_space_read_1(sc->sc_iot, sc->sc_ioh, \
100 RTC_STATUS_REG) & 1<<BUSY) 100 RTC_STATUS_REG) & 1<<BUSY)
101 101
102static int 102static int
103omaprtc_gettime(todr_chip_handle_t tch, struct clock_ymdhms *dt) 103omaprtc_gettime(todr_chip_handle_t tch, struct clock_ymdhms *dt)
104{ 104{
105 struct omaprtc_softc *sc = tch->cookie; 105 struct omaprtc_softc *sc = tch->cookie;
106 int s; 106 int s;

cvs diff -r1.3 -r1.4 src/sys/arch/arm/omap/Attic/omap_tipb.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap_tipb.c 2008/11/21 17:13:07 1.3
+++ src/sys/arch/arm/omap/Attic/omap_tipb.c 2008/12/12 17:36:14 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: omap_tipb.c,v 1.3 2008/11/21 17:13:07 matt Exp $ */ 1/* $NetBSD: omap_tipb.c,v 1.4 2008/12/12 17:36:14 matt Exp $ */
2 2
3/* 3/*
4 * Autoconfiguration support for the Texas Instruments OMAP TIPB. 4 * Autoconfiguration support for the Texas Instruments OMAP TIPB.
5 * Based on arm/xscale/pxa2x0.c which in turn was derived from 5 * Based on arm/xscale/pxa2x0.c which in turn was derived from
6 * arm/sa11x0/sa11x0.c. The code to do the early attach was initially derived 6 * arm/sa11x0/sa11x0.c. The code to do the early attach was initially derived
7 * from arch/sparc/dev/obio.c. 7 * from arch/sparc/dev/obio.c.
8 * 8 *
9 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved. 9 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved.
10 * Written by Hiroyuki Bessho for Genetec Corporation. 10 * Written by Hiroyuki Bessho for Genetec Corporation.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -87,58 +87,57 @@ @@ -87,58 +87,57 @@
87 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 87 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
88 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 88 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
89 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 89 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
90 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 90 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
91 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 91 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
92 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 92 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
93 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 93 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
94 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 94 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
95 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 95 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
96 * SUCH DAMAGE. 96 * SUCH DAMAGE.
97 */ 97 */
98 98
99#include <sys/cdefs.h> 99#include <sys/cdefs.h>
100__KERNEL_RCSID(0, "$NetBSD: omap_tipb.c,v 1.3 2008/11/21 17:13:07 matt Exp $"); 100__KERNEL_RCSID(0, "$NetBSD: omap_tipb.c,v 1.4 2008/12/12 17:36:14 matt Exp $");
101 101
102#include "locators.h" 102#include "locators.h"
103 103
104#include <sys/param.h> 104#include <sys/param.h>
105#include <sys/systm.h> 105#include <sys/systm.h>
106#include <sys/device.h> 106#include <sys/device.h>
107#include <sys/kernel.h> 107#include <sys/kernel.h>
108#include <sys/reboot.h> 108#include <sys/reboot.h>
109 109
110#include <machine/cpu.h> 110#include <machine/cpu.h>
111#include <machine/bus.h> 111#include <machine/bus.h>
112 112
113#include <arm/cpufunc.h> 113#include <arm/cpufunc.h>
114#include <arm/mainbus/mainbus.h> 114#include <arm/mainbus/mainbus.h>
115#include <arm/omap/omap_reg.h> 115#include <arm/omap/omap_reg.h>
116#include <arm/omap/omap_tipb.h> 116#include <arm/omap/omap_tipb.h>
117 117
118struct tipb_softc { 118struct tipb_softc {
119 device_t sc_dev; 119 device_t sc_dev;
120 bus_dma_tag_t sc_dmac; 120 bus_dma_tag_t sc_dmac;
121}; 121};
122 122
123/* prototypes */ 123/* prototypes */
124static int tipb_match(device_t, cfdata_t, void *); 124static int tipb_match(device_t, cfdata_t, void *);
125static void tipb_attach(device_t, device_t, void *); 125static void tipb_attach(device_t, device_t, void *);
126static int tipb_search(device_t, cfdata_t, 126static int tipb_search(device_t, cfdata_t, const int *, void *);
127 const int *, void *); 
128static int tipb_print(void *, const char *); 127static int tipb_print(void *, const char *);
129 128
130/* attach structures */ 129/* attach structures */
131CFATTACH_DECL(tipb, sizeof(struct tipb_softc), 130CFATTACH_DECL_NEW(tipb, sizeof(struct tipb_softc),
132 tipb_match, tipb_attach, NULL, NULL); 131 tipb_match, tipb_attach, NULL, NULL);
133 132
134static int tipb_attached; 133static int tipb_attached;
135 134
136/* 135/*
137 * There are some devices that need to be set up before all the others. The 136 * There are some devices that need to be set up before all the others. The
138 * earlies array contains their names. tipb_attach() and tipb_search() work 137 * earlies array contains their names. tipb_attach() and tipb_search() work
139 * together to attach these devices in the order they appear in this array 138 * together to attach these devices in the order they appear in this array
140 * before any other TIPB devices are attached. 139 * before any other TIPB devices are attached.
141 */ 140 */
142static const char * const earlies[] = { 141static const char * const earlies[] = {
143 OMAP_INTC_DEVICE, 142 OMAP_INTC_DEVICE,
144 "omapmputmr", 143 "omapmputmr",

cvs diff -r1.6 -r1.7 src/sys/arch/arm/omap/Attic/omap2_obio.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap2_obio.c 2008/11/21 17:13:07 1.6
+++ src/sys/arch/arm/omap/Attic/omap2_obio.c 2008/12/12 17:36:14 1.7
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1/* $Id: omap2_obio.c,v 1.6 2008/11/21 17:13:07 matt Exp $ */ 1/* $Id: omap2_obio.c,v 1.7 2008/12/12 17:36:14 matt Exp $ */
2 2
3/* adapted from: */ 3/* adapted from: */
4/* $NetBSD: omap2_obio.c,v 1.6 2008/11/21 17:13:07 matt Exp $ */ 4/* $NetBSD: omap2_obio.c,v 1.7 2008/12/12 17:36:14 matt Exp $ */
5 5
6 6
7/* 7/*
8 * Autoconfiguration support for the Texas Instruments OMAP "On Board" I/O. 8 * Autoconfiguration support for the Texas Instruments OMAP "On Board" I/O.
9 * 9 *
10 * Based on arm/omap/omap_emifs.c which in turn was derived 10 * Based on arm/omap/omap_emifs.c which in turn was derived
11 * Based on arm/xscale/pxa2x0.c which in turn was derived 11 * Based on arm/xscale/pxa2x0.c which in turn was derived
12 * from arm/sa11x0/sa11x0.c 12 * from arm/sa11x0/sa11x0.c
13 * 13 *
14 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved. 14 * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved.
15 * Written by Hiroyuki Bessho for Genetec Corporation. 15 * Written by Hiroyuki Bessho for Genetec Corporation.
16 * 16 *
17 * Redistribution and use in source and binary forms, with or without 17 * Redistribution and use in source and binary forms, with or without
@@ -93,27 +93,27 @@ @@ -93,27 +93,27 @@
93 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 93 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
94 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 94 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
95 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 95 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
96 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 96 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
97 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 97 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
98 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 98 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
99 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 99 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
100 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 100 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
101 * SUCH DAMAGE. 101 * SUCH DAMAGE.
102 */ 102 */
103 103
104#include "opt_omap.h" 104#include "opt_omap.h"
105#include <sys/cdefs.h> 105#include <sys/cdefs.h>
106__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.6 2008/11/21 17:13:07 matt Exp $"); 106__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.7 2008/12/12 17:36:14 matt Exp $");
107 107
108#include "locators.h" 108#include "locators.h"
109#include "obio.h" 109#include "obio.h"
110 110
111#include <sys/param.h> 111#include <sys/param.h>
112#include <sys/systm.h> 112#include <sys/systm.h>
113#include <sys/device.h> 113#include <sys/device.h>
114#include <sys/kernel.h> 114#include <sys/kernel.h>
115#include <sys/reboot.h> 115#include <sys/reboot.h>
116 116
117#include <machine/cpu.h> 117#include <machine/cpu.h>
118#include <machine/bus.h> 118#include <machine/bus.h>
119 119
@@ -373,29 +373,32 @@ obio_attach_critical(struct obio_softc * @@ -373,29 +373,32 @@ obio_attach_critical(struct obio_softc *
373#endif 373#endif
374 374
375 oa.obio_addr = critical_devs[i].addr; 375 oa.obio_addr = critical_devs[i].addr;
376 oa.obio_size = OBIOCF_SIZE_DEFAULT; 376 oa.obio_size = OBIOCF_SIZE_DEFAULT;
377 oa.obio_intr = OBIOCF_INTR_DEFAULT; 377 oa.obio_intr = OBIOCF_INTR_DEFAULT;
378 oa.obio_intrbase = OBIOCF_INTRBASE_DEFAULT; 378 oa.obio_intrbase = OBIOCF_INTRBASE_DEFAULT;
379 379
380 if (oa.obio_addr != OBIOCF_ADDR_DEFAULT 380 if (oa.obio_addr != OBIOCF_ADDR_DEFAULT
381 && (oa.obio_addr < sc->sc_base  381 && (oa.obio_addr < sc->sc_base
382 || oa.obio_addr >= sc->sc_base + sc->sc_size)) 382 || oa.obio_addr >= sc->sc_base + sc->sc_size))
383 continue; 383 continue;
384 384
385 cf = config_search_ia(obio_find, sc->sc_dev, "obio", &oa); 385 cf = config_search_ia(obio_find, sc->sc_dev, "obio", &oa);
386 if (cf == NULL && critical_devs[i].required) 386 if (cf == NULL) {
387 panic("obio_attach_critical: failed to find %s!", 387 if (critical_devs[i].required)
388 critical_devs[i].name); 388 panic("obio_attach_critical: failed to find %s!",
 389 critical_devs[i].name);
 390 continue;
 391 }
389 392
390 oa.obio_addr = cf->cf_loc[OBIOCF_ADDR]; 393 oa.obio_addr = cf->cf_loc[OBIOCF_ADDR];
391 oa.obio_size = cf->cf_loc[OBIOCF_SIZE]; 394 oa.obio_size = cf->cf_loc[OBIOCF_SIZE];
392 oa.obio_intr = cf->cf_loc[OBIOCF_INTR]; 395 oa.obio_intr = cf->cf_loc[OBIOCF_INTR];
393 oa.obio_intrbase = cf->cf_loc[OBIOCF_INTRBASE]; 396 oa.obio_intrbase = cf->cf_loc[OBIOCF_INTRBASE];
394 config_attach(sc->sc_dev, cf, &oa, obio_print); 397 config_attach(sc->sc_dev, cf, &oa, obio_print);
395 } 398 }
396} 399}
397 400
398static int 401static int
399obio_print(void *aux, const char *name) 402obio_print(void *aux, const char *name)
400{ 403{
401 struct obio_attach_args *oa = (struct obio_attach_args*)aux; 404 struct obio_attach_args *oa = (struct obio_attach_args*)aux;

cvs diff -r1.4 -r1.5 src/sys/arch/arm/omap/Attic/omap_mputmr.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap_mputmr.c 2008/11/21 17:13:07 1.4
+++ src/sys/arch/arm/omap/Attic/omap_mputmr.c 2008/12/12 17:36:14 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: omap_mputmr.c,v 1.4 2008/11/21 17:13:07 matt Exp $ */ 1/* $NetBSD: omap_mputmr.c,v 1.5 2008/12/12 17:36:14 matt Exp $ */
2 2
3/* 3/*
4 * Based on i80321_timer.c and arch/arm/sa11x0/sa11x0_ost.c 4 * Based on i80321_timer.c and arch/arm/sa11x0/sa11x0_ost.c
5 * 5 *
6 * Copyright (c) 1997 Mark Brinicombe. 6 * Copyright (c) 1997 Mark Brinicombe.
7 * Copyright (c) 1997 Causality Limited. 7 * Copyright (c) 1997 Causality Limited.
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * This code is derived from software contributed to The NetBSD Foundation 10 * This code is derived from software contributed to The NetBSD Foundation
11 * by IWAMOTO Toshihiro and Ichiro FUKUHARA. 11 * by IWAMOTO Toshihiro and Ichiro FUKUHARA.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions 14 * modification, are permitted provided that the following conditions
@@ -63,27 +63,27 @@ @@ -63,27 +63,27 @@
63 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 63 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
64 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 64 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
65 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 65 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
66 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 66 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
67 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 67 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
68 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 68 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
69 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 69 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
70 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 70 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
71 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 71 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
72 * POSSIBILITY OF SUCH DAMAGE. 72 * POSSIBILITY OF SUCH DAMAGE.
73 */ 73 */
74 74
75#include <sys/cdefs.h> 75#include <sys/cdefs.h>
76__KERNEL_RCSID(0, "$NetBSD: omap_mputmr.c,v 1.4 2008/11/21 17:13:07 matt Exp $"); 76__KERNEL_RCSID(0, "$NetBSD: omap_mputmr.c,v 1.5 2008/12/12 17:36:14 matt Exp $");
77 77
78#include <sys/types.h> 78#include <sys/types.h>
79#include <sys/param.h> 79#include <sys/param.h>
80#include <sys/systm.h> 80#include <sys/systm.h>
81#include <sys/kernel.h> 81#include <sys/kernel.h>
82#include <sys/time.h> 82#include <sys/time.h>
83#include <sys/timetc.h> 83#include <sys/timetc.h>
84#include <sys/device.h> 84#include <sys/device.h>
85 85
86#include <dev/clock_subr.h> 86#include <dev/clock_subr.h>
87 87
88#include <machine/bus.h> 88#include <machine/bus.h>
89#include <machine/intr.h> 89#include <machine/intr.h>
@@ -129,27 +129,27 @@ static struct omapmputmr_softc *ref_sc = @@ -129,27 +129,27 @@ static struct omapmputmr_softc *ref_sc =
129#endif 129#endif
130 130
131/* Encapsulate the device knowledge within this source. */ 131/* Encapsulate the device knowledge within this source. */
132/* Register offsets and values */ 132/* Register offsets and values */
133#define MPU_CNTL_TIMER 0x00 133#define MPU_CNTL_TIMER 0x00
134#define MPU_FREE (1<<6) 134#define MPU_FREE (1<<6)
135#define MPU_CLOCK_ENABLE (1<<5) 135#define MPU_CLOCK_ENABLE (1<<5)
136#define MPU_PTV_SHIFT 2 136#define MPU_PTV_SHIFT 2
137#define MPU_AR (1<<1) 137#define MPU_AR (1<<1)
138#define MPU_ST (1<<0) 138#define MPU_ST (1<<0)
139#define MPU_LOAD_TIMER 0x04 139#define MPU_LOAD_TIMER 0x04
140#define MPU_READ_TIMER 0x08 140#define MPU_READ_TIMER 0x08
141 141
142CFATTACH_DECL(omapmputmr, sizeof(struct omapmputmr_softc), 142CFATTACH_DECL_NEW(omapmputmr, sizeof(struct omapmputmr_softc),
143 omapmputmr_match, omapmputmr_attach, NULL, NULL); 143 omapmputmr_match, omapmputmr_attach, NULL, NULL);
144 144
145static int 145static int
146omapmputmr_match(device_t parent, cfdata_t match, void *aux) 146omapmputmr_match(device_t parent, cfdata_t match, void *aux)
147{ 147{
148 struct tipb_attach_args *tipb = aux; 148 struct tipb_attach_args *tipb = aux;
149 149
150 if (tipb->tipb_addr == -1 || tipb->tipb_intr == -1) 150 if (tipb->tipb_addr == -1 || tipb->tipb_intr == -1)
151 panic("omapmputmr must have addr and intr specified in config."); 151 panic("omapmputmr must have addr and intr specified in config.");
152 152
153 if (tipb->tipb_size == 0) 153 if (tipb->tipb_size == 0)
154 tipb->tipb_size = 256; /* Per the OMAP TRM. */ 154 tipb->tipb_size = 256; /* Per the OMAP TRM. */
155 155