Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/newsmips Change u_int -> uint32_t, u_char, char -> u...



details:   https://anonhg.NetBSD.org/src/rev/34c260ca348b
branches:  trunk
changeset: 573716:34c260ca348b
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Feb 06 02:58:15 2005 +0000

description:
Change u_int -> uint32_t, u_char,char -> uint8_t where appropriate.

diffstat:

 sys/arch/newsmips/include/intr.h      |   8 +-
 sys/arch/newsmips/newsmips/news3400.c |  36 +++++++-------
 sys/arch/newsmips/newsmips/news5000.c |  84 +++++++++++++++++++---------------
 3 files changed, 68 insertions(+), 60 deletions(-)

diffs (truncated from 366 to 300 lines):

diff -r 0d5f3f98d0a2 -r 34c260ca348b sys/arch/newsmips/include/intr.h
--- a/sys/arch/newsmips/include/intr.h  Sun Feb 06 02:56:15 2005 +0000
+++ b/sys/arch/newsmips/include/intr.h  Sun Feb 06 02:58:15 2005 +0000
@@ -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 @@
 
 /* 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);
diff -r 0d5f3f98d0a2 -r 34c260ca348b sys/arch/newsmips/newsmips/news3400.c
--- a/sys/arch/newsmips/newsmips/news3400.c     Sun Feb 06 02:56:15 2005 +0000
+++ b/sys/arch/newsmips/newsmips/news3400.c     Sun Feb 06 02:58:15 2005 +0000
@@ -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_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 @@
  * 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 @@
        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 @@
        _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 @@
 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 @@
 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 @@
 }
 
 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 @@
        disable_intr = news3400_disable_intr;
        enable_timer = news3400_enable_timer;
 
-       news3400_readidrom((u_char *)&idrom);
+       news3400_readidrom((uint8_t *)&idrom);
        hostid = idrom.id_serial;
 }
diff -r 0d5f3f98d0a2 -r 34c260ca348b sys/arch/newsmips/newsmips/news5000.c
--- a/sys/arch/newsmips/newsmips/news5000.c     Sun Feb 06 02:56:15 2005 +0000
+++ b/sys/arch/newsmips/newsmips/news5000.c     Sun Feb 06 02:58:15 2005 +0000
@@ -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 @@
 #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_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 @@
  * 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 @@
        _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 @@
        }
 
        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 @@
        }
 
        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 @@
 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 @@
 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 @@
        /* INT2 -- It's not a time to enable timer yet. */
        /* INT3 -- not used for NWS-5000 */
 



Home | Main Index | Thread Index | Old Index