Change u_int -> uint32_t, u_char,char -> uint8_t where appropriate.
This commit is contained in:
parent
a60e4db92a
commit
ad494d3b04
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.15 2005/02/06 02:18:02 tsutsui Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.16 2005/02/06 02:58:15 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -143,12 +143,12 @@ extern u_int intrcnt[];
|
|||
|
||||
/* handle i/o device interrupts */
|
||||
#ifdef news3400
|
||||
void news3400_intr(u_int, u_int, u_int, u_int);
|
||||
void news3400_intr(uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
#endif
|
||||
#ifdef news5000
|
||||
void news5000_intr(u_int, u_int, u_int, u_int);
|
||||
void news5000_intr(uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
#endif
|
||||
extern void (*hardware_intr)(u_int, u_int, u_int, u_int);
|
||||
extern void (*hardware_intr)(uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
extern void (*enable_intr)(void);
|
||||
extern void (*disable_intr)(void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: news3400.c,v 1.14 2005/02/06 02:18:03 tsutsui Exp $ */
|
||||
/* $NetBSD: news3400.c,v 1.15 2005/02/06 02:58:15 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: news3400.c,v 1.14 2005/02/06 02:18:03 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: news3400.c,v 1.15 2005/02/06 02:58:15 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -53,7 +53,7 @@ static void news3400_level1_intr(void);
|
|||
static void news3400_enable_intr(void);
|
||||
static void news3400_disable_intr(void);
|
||||
static void news3400_enable_timer(void);
|
||||
static void news3400_readidrom(u_char *);
|
||||
static void news3400_readidrom(uint8_t *);
|
||||
|
||||
static int badaddr_flag;
|
||||
|
||||
|
@ -63,7 +63,7 @@ static int badaddr_flag;
|
|||
* Handle news3400 interrupts.
|
||||
*/
|
||||
void
|
||||
news3400_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
||||
news3400_intr(uint32_t status, uint32_t cause, uint32_t pc, uint32_t ipending)
|
||||
{
|
||||
struct clockframe cf;
|
||||
|
||||
|
@ -71,10 +71,10 @@ news3400_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
|||
if (ipending & MIPS_INT_MASK_2) {
|
||||
int stat;
|
||||
|
||||
stat = *(volatile u_char *)INTST0;
|
||||
stat = *(volatile uint8_t *)INTST0;
|
||||
stat &= INTST0_TIMINT|INTST0_KBDINT|INTST0_MSINT;
|
||||
|
||||
*(volatile u_char *)INTCLR0 = stat;
|
||||
*(volatile uint8_t *)INTCLR0 = stat;
|
||||
if (stat & INTST0_TIMINT) {
|
||||
cf.pc = pc;
|
||||
cf.sr = status;
|
||||
|
@ -92,14 +92,14 @@ news3400_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
|||
_splset(MIPS_SR_INT_IE | (status & MIPS_INT_MASK_2));
|
||||
|
||||
if (ipending & MIPS_INT_MASK_5) {
|
||||
*(volatile char *)INTCLR0 = INTCLR0_PERR;
|
||||
*(volatile uint8_t *)INTCLR0 = INTCLR0_PERR;
|
||||
printf("Memory error interrupt(?) at 0x%x\n", pc);
|
||||
cause &= ~MIPS_INT_MASK_5;
|
||||
}
|
||||
|
||||
/* asynchronous bus error */
|
||||
if (ipending & MIPS_INT_MASK_4) {
|
||||
*(volatile char *)INTCLR0 = INTCLR0_BERR;
|
||||
*(volatile uint8_t *)INTCLR0 = INTCLR0_BERR;
|
||||
cause &= ~MIPS_INT_MASK_4;
|
||||
badaddr_flag = 1;
|
||||
}
|
||||
|
@ -135,9 +135,9 @@ news3400_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
|||
static void
|
||||
news3400_level0_intr(void)
|
||||
{
|
||||
volatile u_char *intst1 = (void *)INTST1;
|
||||
volatile u_char *intclr1 = (void *)INTCLR1;
|
||||
int stat;
|
||||
volatile uint8_t *intst1 = (void *)INTST1;
|
||||
volatile uint8_t *intclr1 = (void *)INTCLR1;
|
||||
uint8_t stat;
|
||||
|
||||
stat = *intst1 & LEVEL0_MASK;
|
||||
*intclr1 = stat;
|
||||
|
@ -156,10 +156,10 @@ news3400_level0_intr(void)
|
|||
static void
|
||||
news3400_level1_intr(void)
|
||||
{
|
||||
volatile u_char *inten1 = (void *)INTEN1;
|
||||
volatile u_char *intst1 = (void *)INTST1;
|
||||
volatile u_char *intclr1 = (void *)INTCLR1;
|
||||
int stat1, saved_inten1;
|
||||
volatile uint8_t *inten1 = (void *)INTEN1;
|
||||
volatile uint8_t *intst1 = (void *)INTST1;
|
||||
volatile uint8_t *intclr1 = (void *)INTCLR1;
|
||||
uint8_t stat1, saved_inten1;
|
||||
|
||||
saved_inten1 = *inten1;
|
||||
|
||||
|
@ -253,9 +253,9 @@ news3400_enable_timer(void)
|
|||
}
|
||||
|
||||
static void
|
||||
news3400_readidrom(u_char *rom)
|
||||
news3400_readidrom(uint8_t *rom)
|
||||
{
|
||||
u_char *p = (u_char *)IDROM;
|
||||
uint8_t *p = (uint8_t *)IDROM;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof (struct idrom); i++, p += 2)
|
||||
|
@ -272,6 +272,6 @@ news3400_init(void)
|
|||
disable_intr = news3400_disable_intr;
|
||||
enable_timer = news3400_enable_timer;
|
||||
|
||||
news3400_readidrom((u_char *)&idrom);
|
||||
news3400_readidrom((uint8_t *)&idrom);
|
||||
hostid = idrom.id_serial;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: news5000.c,v 1.13 2005/02/06 02:18:03 tsutsui Exp $ */
|
||||
/* $NetBSD: news5000.c,v 1.14 2005/02/06 02:58:15 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 SHIMIZU Ryo. All rights reserved.
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: news5000.c,v 1.13 2005/02/06 02:18:03 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: news5000.c,v 1.14 2005/02/06 02:58:15 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -40,7 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: news5000.c,v 1.13 2005/02/06 02:18:03 tsutsui Exp $"
|
|||
#include <newsmips/apbus/apbusvar.h>
|
||||
#include <newsmips/newsmips/machid.h>
|
||||
|
||||
extern void (*readmicrotime) (struct timeval *tvp);
|
||||
extern void (*readmicrotime)(struct timeval *tvp);
|
||||
|
||||
static void news5000_level1_intr(void);
|
||||
static void news5000_level0_intr(void);
|
||||
|
@ -49,7 +49,7 @@ static void news5000_enable_intr(void);
|
|||
static void news5000_disable_intr(void);
|
||||
static void news5000_enable_timer(void);
|
||||
static void news5000_readmicrotime(struct timeval *);
|
||||
static void news5000_readidrom(u_char *);
|
||||
static void news5000_readidrom(uint8_t *);
|
||||
|
||||
static u_int freerun_off;
|
||||
|
||||
|
@ -57,31 +57,31 @@ static u_int freerun_off;
|
|||
* Handle news5000 interrupts.
|
||||
*/
|
||||
void
|
||||
news5000_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
||||
news5000_intr(uint32_t status, uint32_t cause, uint32_t pc, uint32_t ipending)
|
||||
{
|
||||
if (ipending & MIPS_INT_MASK_2) {
|
||||
#ifdef DEBUG
|
||||
static int l2cnt = 0;
|
||||
#endif
|
||||
u_int int2stat;
|
||||
uint32_t int2stat;
|
||||
struct clockframe cf;
|
||||
|
||||
int2stat = *(volatile u_int *)NEWS5000_INTST2;
|
||||
int2stat = *(volatile uint32_t *)NEWS5000_INTST2;
|
||||
|
||||
#ifdef DEBUG
|
||||
l2cnt++;
|
||||
if (l2cnt == 50) {
|
||||
*(volatile u_int *)NEWS5000_LED_SEC = 1;
|
||||
*(volatile uint32_t *)NEWS5000_LED_SEC = 1;
|
||||
}
|
||||
if (l2cnt == 100) {
|
||||
*(volatile u_int *)NEWS5000_LED_SEC = 0;
|
||||
*(volatile uint32_t *)NEWS5000_LED_SEC = 0;
|
||||
l2cnt = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (int2stat & NEWS5000_INT2_TIMER0) {
|
||||
*(volatile u_int *)NEWS5000_TIMER0 = 1;
|
||||
freerun_off = *(volatile u_int *)NEWS5000_FREERUN;
|
||||
*(volatile uint32_t *)NEWS5000_TIMER0 = 1;
|
||||
freerun_off = *(volatile uint32_t *)NEWS5000_FREERUN;
|
||||
|
||||
cf.pc = pc;
|
||||
cf.sr = status;
|
||||
|
@ -97,7 +97,9 @@ news5000_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
|||
_splset(MIPS_SR_INT_IE | (status & MIPS_INT_MASK_2));
|
||||
|
||||
if (ipending & MIPS_INT_MASK_5) {
|
||||
u_int int5stat = *(volatile u_int *)NEWS5000_INTST5;
|
||||
uint32_t int5stat;
|
||||
|
||||
int5stat = *(volatile u_int *)NEWS5000_INTST5;
|
||||
printf("level5 interrupt (%08x)\n", int5stat);
|
||||
|
||||
apbus_wbflush();
|
||||
|
@ -105,24 +107,28 @@ news5000_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
|||
}
|
||||
|
||||
if (ipending & MIPS_INT_MASK_4) {
|
||||
u_int int4stat = *(volatile u_int *)NEWS5000_INTST4;
|
||||
uint32_t int4stat;
|
||||
|
||||
int4stat = *(volatile uint32_t *)NEWS5000_INTST4;
|
||||
printf("level4 interrupt (%08x)\n", int4stat);
|
||||
if (int4stat & NEWS5000_INT4_APBUS) {
|
||||
u_int stat = *(volatile u_int *)NEWS5000_APBUS_INTST;
|
||||
uint32_t stat;
|
||||
|
||||
stat = *(volatile uint32_t *)NEWS5000_APBUS_INTST;
|
||||
printf("APbus error 0x%04x\n", stat & 0xffff);
|
||||
if (stat & NEWS5000_APBUS_INT_DMAADDR) {
|
||||
printf("DMA Address Error: "
|
||||
"slot=%x, addr=0x%08x\n",
|
||||
*(volatile u_int *)NEWS5000_APBUS_DER_S,
|
||||
*(volatile u_int *)NEWS5000_APBUS_DER_A);
|
||||
*(volatile uint32_t *)NEWS5000_APBUS_DER_S,
|
||||
*(volatile uint32_t *)NEWS5000_APBUS_DER_A);
|
||||
}
|
||||
if (stat & NEWS5000_APBUS_INT_RDTIMEO)
|
||||
printf("IO Read Timeout: addr=0x%08x\n",
|
||||
*(volatile u_int *)NEWS5000_APBUS_BER_A);
|
||||
*(volatile uint32_t *)NEWS5000_APBUS_BER_A);
|
||||
if (stat & NEWS5000_APBUS_INT_WRTIMEO)
|
||||
printf("IO Write Timeout: addr=0x%08x\n",
|
||||
*(volatile u_int *)NEWS5000_APBUS_BER_A);
|
||||
*(volatile u_int *)0xb4c00014 = stat;
|
||||
*(volatile uint32_t *)NEWS5000_APBUS_BER_A);
|
||||
*(volatile uint32_t *)0xb4c00014 = stat;
|
||||
}
|
||||
|
||||
apbus_wbflush();
|
||||
|
@ -130,7 +136,9 @@ news5000_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
|||
}
|
||||
|
||||
if (ipending & MIPS_INT_MASK_3) {
|
||||
u_int int3stat = *(volatile u_int *)NEWS5000_INTST3;
|
||||
uint32_t int3stat;
|
||||
|
||||
int3stat = *(volatile uint32_t *)NEWS5000_INTST3;
|
||||
printf("level3 interrupt (%08x)\n", int3stat);
|
||||
|
||||
apbus_wbflush();
|
||||
|
@ -156,9 +164,9 @@ news5000_intr(u_int status, u_int cause, u_int pc, u_int ipending)
|
|||
static void
|
||||
news5000_level1_intr(void)
|
||||
{
|
||||
u_int int1stat;
|
||||
uint32_t int1stat;
|
||||
|
||||
int1stat = *(volatile u_int *)NEWS5000_INTST1;
|
||||
int1stat = *(volatile uint32_t *)NEWS5000_INTST1;
|
||||
|
||||
if (int1stat) {
|
||||
if (apbus_intr_dispatch(1, int1stat) == 0)
|
||||
|
@ -171,9 +179,9 @@ news5000_level1_intr(void)
|
|||
static void
|
||||
news5000_level0_intr(void)
|
||||
{
|
||||
u_int int0stat;
|
||||
uint32_t int0stat;
|
||||
|
||||
int0stat = *(volatile u_int *)NEWS5000_INTST0;
|
||||
int0stat = *(volatile uint32_t *)NEWS5000_INTST0;
|
||||
|
||||
if (int0stat) {
|
||||
if (apbus_intr_dispatch(0, int0stat) == 0)
|
||||
|
@ -191,23 +199,23 @@ news5000_enable_intr(void)
|
|||
/* INT2 -- It's not a time to enable timer yet. */
|
||||
/* INT3 -- not used for NWS-5000 */
|
||||
|
||||
*(volatile u_int *)NEWS5000_INTEN4 = NEWS5000_INT4_APBUS;
|
||||
*(volatile u_int *)NEWS5000_APBUS_INTMSK = 0xffff;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN4 = NEWS5000_INT4_APBUS;
|
||||
*(volatile uint32_t *)NEWS5000_APBUS_INTMSK = 0xffff;
|
||||
|
||||
/* INT5 -- currently ignored */
|
||||
*(volatile u_int *)NEWS5000_INTEN5 = 0;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN5 = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
news5000_disable_intr(void)
|
||||
{
|
||||
|
||||
*(volatile u_int *)NEWS5000_INTEN0 = 0;
|
||||
*(volatile u_int *)NEWS5000_INTEN1 = 0;
|
||||
*(volatile u_int *)NEWS5000_INTEN2 = 0;
|
||||
*(volatile u_int *)NEWS5000_INTEN3 = 0;
|
||||
*(volatile u_int *)NEWS5000_INTEN4 = 0;
|
||||
*(volatile u_int *)NEWS5000_INTEN5 = 0;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN0 = 0;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN1 = 0;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN2 = 0;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN3 = 0;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN4 = 0;
|
||||
*(volatile uint32_t *)NEWS5000_INTEN5 = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -221,10 +229,10 @@ news5000_enable_timer(void)
|
|||
static void
|
||||
news5000_readmicrotime(struct timeval *tvp)
|
||||
{
|
||||
u_int freerun;
|
||||
uint32_t freerun;
|
||||
|
||||
*tvp = time;
|
||||
freerun = *(volatile u_int *)NEWS5000_FREERUN;
|
||||
freerun = *(volatile uint32_t *)NEWS5000_FREERUN;
|
||||
freerun -= freerun_off;
|
||||
if (freerun > 1000000)
|
||||
freerun = 1000000;
|
||||
|
@ -236,12 +244,12 @@ news5000_readmicrotime(struct timeval *tvp)
|
|||
}
|
||||
|
||||
static void
|
||||
news5000_readidrom(u_char *rom)
|
||||
news5000_readidrom(uint8_t *rom)
|
||||
{
|
||||
uint32_t *p = (void *)NEWS5000_IDROM;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof (struct idrom); i++, p += 2)
|
||||
for (i = 0; i < sizeof(struct idrom); i++, p += 2)
|
||||
*rom++ = ((*p & 0x0f) << 4) + (*(p + 1) & 0x0f);
|
||||
}
|
||||
|
||||
|
@ -255,7 +263,7 @@ news5000_init(void)
|
|||
disable_intr = news5000_disable_intr;
|
||||
enable_timer = news5000_enable_timer;
|
||||
|
||||
news5000_readidrom((u_char *)&idrom);
|
||||
news5000_readidrom((uint8_t *)&idrom);
|
||||
readmicrotime = news5000_readmicrotime;
|
||||
hostid = idrom.id_serial;
|
||||
|
||||
|
|
Loading…
Reference in New Issue