- Correct uninitialized pointer issue I made.

- Put a comment why the original prodtype detection logic made no trouble.
This commit is contained in:
nisimura 1999-05-29 09:31:02 +00:00
parent 58aa48a579
commit fcd9e7edb9

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_3maxplus.c,v 1.21 1999/05/29 07:10:36 simonb Exp $ */
/* $NetBSD: dec_3maxplus.c,v 1.22 1999/05/29 09:31:02 nisimura Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -73,7 +73,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.21 1999/05/29 07:10:36 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.22 1999/05/29 09:31:02 nisimura Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -140,11 +140,10 @@ dec_3maxplus_init()
{
u_int32_t prodtype;
/* Initialise ioasic_base early on so we can determine product type */
ioasic_base = MIPS_PHYS_TO_KSEG1(KN03_SYS_ASIC);
prodtype = *(u_int32_t *)(ioasic_base + IOASIC_INTR);
/* we can determine product type with INTR register. */
prodtype = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_REG_INTR);
prodtype &= KN03_INTR_PROD_JUMPER;
/* the bit persists even after INTR register is assigned with 0. */
platform.iobus = "tc3maxplus";
@ -174,7 +173,7 @@ dec_3maxplus_os_init()
*(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0;
kn03_wbflush();
/* XXX: ioasic_base initialised in dec_3maxplus_init() */
ioasic_base = MIPS_PHYS_TO_KSEG1(KN03_SYS_ASIC);
mips_hardware_intr = dec_3maxplus_intr;
tc_enable_interrupt = dec_3maxplus_enable_intr; /* XXX */
mcclock_addr = (void *)(ioasic_base + IOASIC_SLOT_8_START);