Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/luna68k/luna68k Relocate boot flag detection from c...



details:   https://anonhg.NetBSD.org/src/rev/b65a1d7402d1
branches:  trunk
changeset: 500439:b65a1d7402d1
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Tue Dec 12 04:07:35 2000 +0000

description:
Relocate boot flag detection from consinit() to more logical place.

diffstat:

 sys/arch/luna68k/luna68k/machdep.c |  30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)

diffs (77 lines):

diff -r b1f350e6f960 -r b65a1d7402d1 sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c        Tue Dec 12 04:06:08 2000 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c        Tue Dec 12 04:07:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.12 2000/09/24 12:32:35 jdolecek Exp $ */
+/* $NetBSD: machdep.c,v 1.13 2000/12/12 04:07:35 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 2000/09/24 12:32:35 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.13 2000/12/12 04:07:35 nisimura Exp $");
 
 #include "opt_ddb.h"
 
@@ -154,7 +154,10 @@
 void
 luna68k_init()
 {
-       int i;
+       volatile unsigned char *pio0 = (void *)0x49000000;
+       int sw1, i;
+       char *cp;
+       extern char bootarg[64];
 
        extern paddr_t avail_start, avail_end;
 
@@ -174,22 +177,10 @@
                    avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE,
                    VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED);
        initmsgbuf(msgbufaddr, m68k_round_page(MSGBUFSIZE));
-}
 
-/*
- * Console initialization: called early on from main,
- */
-void
-consinit()
-{
-       volatile unsigned char *pio0 = (void *)0x49000000;
-       int sw1, i;
-       char *cp;
-       extern char bootarg[64];
 
        pio0[3] = 0xb6;
        pio0[2] = 1 << 6;               /* enable parity check */
-
        pio0[3] = 0xb6;
        sw1 = pio0[0];                  /* dipssw1 value */
        sw1 ^= 0xff;
@@ -215,7 +206,14 @@
        if (boothowto == 0)
                boothowto = (sw1 & 0x1) ? RB_SINGLE : 0;
 #endif
+}
 
+/*
+ * Console initialization: called early on from main,
+ */
+void
+consinit()
+{
        if (sysconsole == 0)
                syscnattach(0);
        else {
@@ -423,7 +421,7 @@
                cpuspeed = 20; delay_divisor = 102;     /* 20MHz 68030 */
                hz = 60;
                break;
-#ifdef M68040
+#if defined(M68040)
        case CPU_68040:
                cpu = "MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches";
                machtype = LUNA_II;



Home | Main Index | Thread Index | Old Index