Tue Mar 30 04:53:13 2021 UTC ()
- Include tlb.h directly, instead of uvm_extern.h.
- Explicitly include param.h.
- Drop unused headers.
- Sort and group headers.

No binary changes.


(rin)
diff -r1.9 -r1.10 src/sys/arch/evbppc/obs405/obs200_autoconf.c
diff -r1.22 -r1.23 src/sys/arch/evbppc/obs405/obs200_machdep.c

cvs diff -r1.9 -r1.10 src/sys/arch/evbppc/obs405/obs200_autoconf.c (expand / switch to unified diff)

--- src/sys/arch/evbppc/obs405/obs200_autoconf.c 2021/03/29 13:38:31 1.9
+++ src/sys/arch/evbppc/obs405/obs200_autoconf.c 2021/03/30 04:53:13 1.10
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: obs200_autoconf.c,v 1.9 2021/03/29 13:38:31 rin Exp $ */ 1/* $NetBSD: obs200_autoconf.c,v 1.10 2021/03/30 04:53:13 rin Exp $ */
2 2
3/* 3/*
4 * Copyright 2004 Shigeyuki Fukushima. 4 * Copyright 2004 Shigeyuki Fukushima.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Shigeyuki Fukushima for The NetBSD Project. 7 * Written by Shigeyuki Fukushima for The NetBSD Project.
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 14 * 2. Redistributions in binary form must reproduce the above
@@ -23,40 +23,37 @@ @@ -23,40 +23,37 @@
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 25 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 28 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
29 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
32 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 32 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
33 * DAMAGE. 33 * DAMAGE.
34 */ 34 */
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: obs200_autoconf.c,v 1.9 2021/03/29 13:38:31 rin Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: obs200_autoconf.c,v 1.10 2021/03/30 04:53:13 rin Exp $");
37 37
38#include <sys/systm.h> 38#include <sys/param.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/cpu.h> 40#include <sys/systm.h>
41 41
42#include <machine/obs200.h> 42#include <machine/obs200.h>
43 43
44#include <powerpc/ibm4xx/cpu.h> 44#include <powerpc/ibm4xx/cpu.h>
45#include <powerpc/ibm4xx/dcr4xx.h> 45#include <powerpc/ibm4xx/dcr4xx.h>
46 46
47#include <dev/ic/comreg.h> 
48 
49 
50/* 47/*
51 * Determine device configuration for a machine. 48 * Determine device configuration for a machine.
52 */ 49 */
53void 50void
54cpu_configure(void) 51cpu_configure(void)
55{ 52{
56 53
57 intr_init(); 54 intr_init();
58 calc_delayconst(); 55 calc_delayconst();
59 56
60 /* Make sure that timers run at CPU frequency */ 57 /* Make sure that timers run at CPU frequency */
61 mtdcr(DCR_CPC0_CR1, mfdcr(DCR_CPC0_CR1) & ~CPC0_CR1_CETE); 58 mtdcr(DCR_CPC0_CR1, mfdcr(DCR_CPC0_CR1) & ~CPC0_CR1_CETE);
62 59

cvs diff -r1.22 -r1.23 src/sys/arch/evbppc/obs405/obs200_machdep.c (expand / switch to unified diff)

--- src/sys/arch/evbppc/obs405/obs200_machdep.c 2021/03/30 01:33:50 1.22
+++ src/sys/arch/evbppc/obs405/obs200_machdep.c 2021/03/30 04:53:13 1.23
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: obs200_machdep.c,v 1.22 2021/03/30 01:33:50 rin Exp $ */ 1/* $NetBSD: obs200_machdep.c,v 1.23 2021/03/30 04:53:13 rin Exp $ */
2/* Original: machdep.c,v 1.3 2005/01/17 17:24:09 shige Exp */ 2/* Original: machdep.c,v 1.3 2005/01/17 17:24:09 shige Exp */
3 3
4/* 4/*
5 * Copyright 2001, 2002 Wasabi Systems, Inc. 5 * Copyright 2001, 2002 Wasabi Systems, Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. 8 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc.
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.
@@ -58,65 +58,58 @@ @@ -58,65 +58,58 @@
58 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 58 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
59 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 59 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
60 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 60 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 61 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
62 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 62 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
63 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 63 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
64 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 64 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
65 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 65 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
66 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 66 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
67 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 67 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68 */ 68 */
69 69
70#include <sys/cdefs.h> 70#include <sys/cdefs.h>
71__KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.22 2021/03/30 01:33:50 rin Exp $"); 71__KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.23 2021/03/30 04:53:13 rin Exp $");
72 72
73#include "opt_compat_netbsd.h" 
74#include "opt_ddb.h" 73#include "opt_ddb.h"
75 74
76#include <sys/param.h> 75#include <sys/param.h>
 76#include <sys/bus.h>
 77#include <sys/device.h>
77#include <sys/kernel.h> 78#include <sys/kernel.h>
78#include <sys/ksyms.h> 79#include <sys/module.h>
79#include <sys/mount.h> 
80#include <sys/reboot.h> 80#include <sys/reboot.h>
81#include <sys/systm.h> 81#include <sys/systm.h>
82#include <sys/device.h> 
83#include <sys/module.h> 
84#include <sys/bus.h> 
85#include <sys/cpu.h> 
86 
87#include <uvm/uvm_extern.h> 
88 82
89#include <machine/obs200.h> 83#include <machine/obs200.h>
90#include <machine/century_bios.h> 84#include <machine/century_bios.h>
91 85
92#include <powerpc/spr.h> 86#include <powerpc/spr.h>
93#include <powerpc/ibm4xx/spr.h> 87#include <powerpc/ibm4xx/spr.h>
94 88
95#include <powerpc/ibm4xx/cpu.h> 89#include <powerpc/ibm4xx/cpu.h>
96#include <powerpc/ibm4xx/dcr4xx.h> 90#include <powerpc/ibm4xx/dcr4xx.h>
97#include <powerpc/ibm4xx/ibm405gp.h> 91#include <powerpc/ibm4xx/ibm405gp.h>
98#include <powerpc/ibm4xx/pci_machdep.h> 92#include <powerpc/ibm4xx/tlb.h>
99#include <powerpc/ibm4xx/dev/comopbvar.h> 
100 93
101#include <dev/ic/comreg.h> 94#include <powerpc/ibm4xx/pci_machdep.h>
102#include <dev/pci/pcivar.h> 
103#include <dev/pci/pciconf.h> 95#include <dev/pci/pciconf.h>
104 96#include <dev/pci/pcivar.h>
105#include "ksyms.h" 
106 97
107#include "com.h" 98#include "com.h"
108#if (NCOM > 0) 99#if (NCOM > 0)
109#include <sys/termios.h> 100#include <sys/termios.h>
 101#include <powerpc/ibm4xx/dev/comopbvar.h>
 102#include <dev/ic/comreg.h>
110 103
111#ifndef CONADDR 104#ifndef CONADDR
112#define CONADDR IBM405GP_UART0_BASE 105#define CONADDR IBM405GP_UART0_BASE
113#endif 106#endif
114#ifndef CONSPEED 107#ifndef CONSPEED
115#define CONSPEED B9600 108#define CONSPEED B9600
116#endif 109#endif
117#ifndef CONMODE 110#ifndef CONMODE
118 /* 8N1 */ 111 /* 8N1 */
119#define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) 112#define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8)
120#endif 113#endif
121#endif /* NCOM */ 114#endif /* NCOM */
122 115