Sat Aug 7 06:16:22 2010 UTC ()
Remove unnecessary line.
Variable openpic_base exists, if defined PIC_OPENPIC.


(kiyohara)
diff -r1.70 -r1.71 src/sys/arch/prep/prep/machdep.c

cvs diff -r1.70 -r1.71 src/sys/arch/prep/prep/machdep.c (expand / switch to unified diff)

--- src/sys/arch/prep/prep/machdep.c 2009/11/27 03:23:12 1.70
+++ src/sys/arch/prep/prep/machdep.c 2010/08/07 06:16:22 1.71
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.70 2009/11/27 03:23:12 rmind Exp $ */ 1/* $NetBSD: machdep.c,v 1.71 2010/08/07 06:16:22 kiyohara Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH. 5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 22 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.70 2009/11/27 03:23:12 rmind Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.71 2010/08/07 06:16:22 kiyohara Exp $");
36 36
37#include "opt_compat_netbsd.h" 37#include "opt_compat_netbsd.h"
38#include "opt_openpic.h" 38#include "opt_openpic.h"
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/buf.h> 41#include <sys/buf.h>
42#include <sys/conf.h> 42#include <sys/conf.h>
43#include <sys/device.h> 43#include <sys/device.h>
44#include <sys/exec.h> 44#include <sys/exec.h>
45#include <sys/extent.h> 45#include <sys/extent.h>
46#include <sys/kernel.h> 46#include <sys/kernel.h>
47#include <sys/malloc.h> 47#include <sys/malloc.h>
48#include <sys/mbuf.h> 48#include <sys/mbuf.h>
@@ -433,50 +433,51 @@ prep_init(void) @@ -433,50 +433,51 @@ prep_init(void)
433 433
434 ndev = be32toh(res->ActualNumDevices); 434 ndev = be32toh(res->ActualNumDevices);
435 ppc_dev = res->Devices; 435 ppc_dev = res->Devices;
436 foundmpic = 0; 436 foundmpic = 0;
437 prep_intr_reg = 0; 437 prep_intr_reg = 0;
438 438
439 for (i = 0; i < ((ndev > MAX_DEVICES) ? MAX_DEVICES : ndev); i++) { 439 for (i = 0; i < ((ndev > MAX_DEVICES) ? MAX_DEVICES : ndev); i++) {
440 if (ppc_dev[i].DeviceId.DevId == 0x41d00000) /* ISA_PIC */ 440 if (ppc_dev[i].DeviceId.DevId == 0x41d00000) /* ISA_PIC */
441 setup_ivr(&ppc_dev[i]); 441 setup_ivr(&ppc_dev[i]);
442#if defined(PIC_OPENPIC) 442#if defined(PIC_OPENPIC)
443 if (ppc_dev[i].DeviceId.DevId == 0x244d000d) { /* MPIC */ 443 if (ppc_dev[i].DeviceId.DevId == 0x244d000d) { /* MPIC */
444 foundmpic = prep_setup_openpic(&ppc_dev[i]); 444 foundmpic = prep_setup_openpic(&ppc_dev[i]);
445 } 445 }
446#else 
447 ; 
448#endif 446#endif
449 447
450 } 448 }
451 if (!prep_intr_reg) { 449 if (!prep_intr_reg) {
452 /* 450 /*
453 * For some reason we never found one, this is known to 451 * For some reason we never found one, this is known to
454 * occur on certain motorola VME boards. Instead we need 452 * occur on certain motorola VME boards. Instead we need
455 * to just hardcode it. 453 * to just hardcode it.
456 */ 454 */
457 prep_intr_reg = (vaddr_t) mapiodev(PREP_INTR_REG, PAGE_SIZE); 455 prep_intr_reg = (vaddr_t) mapiodev(PREP_INTR_REG, PAGE_SIZE);
458 if (!prep_intr_reg) 456 if (!prep_intr_reg)
459 panic("startup: no room for interrupt register"); 457 panic("startup: no room for interrupt register");
460 prep_intr_reg_off = INTR_VECTOR_REG; 458 prep_intr_reg_off = INTR_VECTOR_REG;
461 } 459 }
462 if (!foundmpic) 460 if (!foundmpic)
463 init_intr(); 461 init_intr();
464} 462}
465 463
466static void 464static void
467init_intr(void) 465init_intr(void)
468{ 466{
469 int i; 467 int i;
 468
 469#if defined(PIC_OPENPIC)
470 openpic_base = 0; 470 openpic_base = 0;
 471#endif
471 472
472 pic_init(); 473 pic_init();
473 i = find_platform_quirk(res->VitalProductData.PrintableModel); 474 i = find_platform_quirk(res->VitalProductData.PrintableModel);
474 if (i != -1) 475 if (i != -1)
475 if (platform_quirks[i].quirk & PLAT_QUIRK_ISA_HANDLER && 476 if (platform_quirks[i].quirk & PLAT_QUIRK_ISA_HANDLER &&
476 platform_quirks[i].isa_intr_handler == EXT_INTR_I8259) { 477 platform_quirks[i].isa_intr_handler == EXT_INTR_I8259) {
477 isa_pic = setup_prepivr(PIC_IVR_MOT); 478 isa_pic = setup_prepivr(PIC_IVR_MOT);
478 return; 479 return;
479 } 480 }
480 isa_pic = setup_prepivr(PIC_IVR_IBM); 481 isa_pic = setup_prepivr(PIC_IVR_IBM);
481 oea_install_extint(pic_ext_intr); 482 oea_install_extint(pic_ext_intr);
482} 483}