| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: beagle_machdep.c,v 1.37 2013/03/13 03:03:04 khorben Exp $ */ | | 1 | /* $NetBSD: beagle_machdep.c,v 1.38 2013/04/15 18:56:38 bouyer Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Machine dependent functions for kernel setup for TI OSK5912 board. | | 4 | * Machine dependent functions for kernel setup for TI OSK5912 board. |
5 | * Based on lubbock_machdep.c which in turn was based on iq80310_machhdep.c | | 5 | * Based on lubbock_machdep.c which in turn was based on iq80310_machhdep.c |
6 | * | | 6 | * |
7 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. | | 7 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. |
8 | * Written by Hiroyuki Bessho for Genetec Corporation. | | 8 | * Written by Hiroyuki Bessho for Genetec Corporation. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -115,36 +115,37 @@ | | | @@ -115,36 +115,37 @@ |
115 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | | 115 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
116 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 116 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
117 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, | | 117 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, |
118 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | | 118 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
119 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | 119 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
120 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 120 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
121 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 121 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
122 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 122 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
123 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 123 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
124 | * SUCH DAMAGE. | | 124 | * SUCH DAMAGE. |
125 | */ | | 125 | */ |
126 | | | 126 | |
127 | #include <sys/cdefs.h> | | 127 | #include <sys/cdefs.h> |
128 | __KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.37 2013/03/13 03:03:04 khorben Exp $"); | | 128 | __KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.38 2013/04/15 18:56:38 bouyer Exp $"); |
129 | | | 129 | |
130 | #include "opt_machdep.h" | | 130 | #include "opt_machdep.h" |
131 | #include "opt_ddb.h" | | 131 | #include "opt_ddb.h" |
132 | #include "opt_kgdb.h" | | 132 | #include "opt_kgdb.h" |
133 | #include "opt_ipkdb.h" | | 133 | #include "opt_ipkdb.h" |
134 | #include "opt_md.h" | | 134 | #include "opt_md.h" |
135 | #include "opt_com.h" | | 135 | #include "opt_com.h" |
136 | #include "opt_omap.h" | | 136 | #include "opt_omap.h" |
137 | #include "prcm.h" | | 137 | #include "prcm.h" |
| | | 138 | #include "com.h" |
138 | | | 139 | |
139 | #include <sys/param.h> | | 140 | #include <sys/param.h> |
140 | #include <sys/systm.h> | | 141 | #include <sys/systm.h> |
141 | #include <sys/bus.h> | | 142 | #include <sys/bus.h> |
142 | #include <sys/cpu.h> | | 143 | #include <sys/cpu.h> |
143 | #include <sys/device.h> | | 144 | #include <sys/device.h> |
144 | #include <sys/exec.h> | | 145 | #include <sys/exec.h> |
145 | #include <sys/kernel.h> | | 146 | #include <sys/kernel.h> |
146 | #include <sys/ksyms.h> | | 147 | #include <sys/ksyms.h> |
147 | #include <sys/msgbuf.h> | | 148 | #include <sys/msgbuf.h> |
148 | #include <sys/proc.h> | | 149 | #include <sys/proc.h> |
149 | #include <sys/reboot.h> | | 150 | #include <sys/reboot.h> |
150 | #include <sys/termios.h> | | 151 | #include <sys/termios.h> |
| @@ -231,27 +232,26 @@ static void omap3_cpu_clk(void); | | | @@ -231,27 +232,26 @@ static void omap3_cpu_clk(void); |
231 | #if defined(OMAP_4430) | | 232 | #if defined(OMAP_4430) |
232 | static void omap4_cpu_clk(void); | | 233 | static void omap4_cpu_clk(void); |
233 | #endif | | 234 | #endif |
234 | #if defined(TI_AM335X) | | 235 | #if defined(TI_AM335X) |
235 | static void am335x_cpu_clk(void); | | 236 | static void am335x_cpu_clk(void); |
236 | #endif | | 237 | #endif |
237 | | | 238 | |
238 | #if defined(OMAP_3430) || defined(OMAP_3530) | | 239 | #if defined(OMAP_3430) || defined(OMAP_3530) |
239 | static psize_t omap3530_memprobe(void); | | 240 | static psize_t omap3530_memprobe(void); |
240 | #endif | | 241 | #endif |
241 | | | 242 | |
242 | bs_protos(bs_notimpl); | | 243 | bs_protos(bs_notimpl); |
243 | | | 244 | |
244 | #include "com.h" | | | |
245 | #if NCOM > 0 | | 245 | #if NCOM > 0 |
246 | #include <dev/ic/comreg.h> | | 246 | #include <dev/ic/comreg.h> |
247 | #include <dev/ic/comvar.h> | | 247 | #include <dev/ic/comvar.h> |
248 | #endif | | 248 | #endif |
249 | | | 249 | |
250 | /* | | 250 | /* |
251 | * Static device mappings. These peripheral registers are mapped at | | 251 | * Static device mappings. These peripheral registers are mapped at |
252 | * fixed virtual addresses very early in initarm() so that we can use | | 252 | * fixed virtual addresses very early in initarm() so that we can use |
253 | * them while booting the kernel, and stay at the same address | | 253 | * them while booting the kernel, and stay at the same address |
254 | * throughout whole kernel's life time. | | 254 | * throughout whole kernel's life time. |
255 | * | | 255 | * |
256 | * We use this table twice; once with bootstrap page table, and once | | 256 | * We use this table twice; once with bootstrap page table, and once |
257 | * with kernel's page table which we build up in initarm(). | | 257 | * with kernel's page table which we build up in initarm(). |