Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/amiga - ANSIfy



details:   https://anonhg.NetBSD.org/src/rev/22b37c6f0b76
branches:  trunk
changeset: 521217:22b37c6f0b76
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Sat Jan 26 13:24:53 2002 +0000

description:
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits

diffstat:

 sys/arch/amiga/amiga/amiga_bus_simple_4.c |  22 ++----
 sys/arch/amiga/amiga/amiga_init.c         |  65 ++++++++++-----------
 sys/arch/amiga/amiga/autoconf.c           |  26 ++++----
 sys/arch/amiga/amiga/busfuncs.c           |   6 +-
 sys/arch/amiga/amiga/cc.c                 |  42 +++++++-------
 sys/arch/amiga/amiga/cc.h                 |  80 +++++++++++++-------------
 sys/arch/amiga/amiga/cia.c                |  16 ++--
 sys/arch/amiga/amiga/cia.h                |  10 +-
 sys/arch/amiga/amiga/color.h              |   6 +-
 sys/arch/amiga/amiga/conf.c               |   8 +-
 sys/arch/amiga/amiga/db_memrw.c           |  14 ++--
 sys/arch/amiga/amiga/device.h             |  15 ++--
 sys/arch/amiga/amiga/disksubr.c           |  36 ++++++------
 sys/arch/amiga/amiga/dkbad.c              |   4 +-
 sys/arch/amiga/amiga/drcustom.h           |   8 +-
 sys/arch/amiga/amiga/gayle.h              |   8 ++-
 sys/arch/amiga/amiga/isr.h                |  16 ++--
 sys/arch/amiga/amiga/locore.s             |  30 +++++-----
 sys/arch/amiga/amiga/machdep.c            |  92 +++++++++++++++---------------
 sys/arch/amiga/amiga/memlist.h            |   4 +-
 sys/arch/amiga/amiga/pmap.c               |  58 +++++++++---------
 sys/arch/amiga/amiga/simple_busfuncs.c    |  40 ++++++------
 sys/arch/amiga/amiga/sys_machdep.c        |   6 +-
 sys/arch/amiga/amiga/trap.c               |  80 +++++++++++++-------------
 sys/arch/amiga/amiga/vm_machdep.c         |   8 +-
 25 files changed, 348 insertions(+), 352 deletions(-)

diffs (truncated from 2171 to 300 lines):

diff -r b719ea749794 -r 22b37c6f0b76 sys/arch/amiga/amiga/amiga_bus_simple_4.c
--- a/sys/arch/amiga/amiga/amiga_bus_simple_4.c Sat Jan 26 13:22:16 2002 +0000
+++ b/sys/arch/amiga/amiga/amiga_bus_simple_4.c Sat Jan 26 13:24:53 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amiga_bus_simple_4.c,v 1.2 2000/02/01 05:21:24 mhitch Exp $ */
+/* $NetBSD: amiga_bus_simple_4.c,v 1.3 2002/01/26 13:24:53 aymeric Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -52,16 +52,13 @@
 bswm(oabs(bswm2_swap_), u_int16_t);
 
 void
-oabs(bsrm2_swap_)(handle, offset, pointer, count)
-       bus_space_handle_t handle;
-       bus_size_t offset;
-       u_int16_t *pointer;
-       bus_size_t count;
+oabs(bsrm2_swap_)(bus_space_handle_t handle, bus_size_t offset,
+                 u_int16_t *pointer, bus_size_t count)
 {
        volatile u_int16_t *p;
 
        p = (volatile u_int16_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
-       
+
        while (count > 0) {
                *pointer++ = bswap16(*p);
                --count;
@@ -69,16 +66,13 @@
 }
 
 void
-oabs(bswm2_swap_)(handle, offset, pointer, count)
-       bus_space_handle_t handle;
-       bus_size_t offset;
-       const u_int16_t *pointer;
-       bus_size_t count;
+oabs(bswm2_swap_)(bus_space_handle_t handle, bus_size_t offset,
+                 const u_int16_t *pointer, bus_size_t count)
 {
        volatile u_int16_t *p;
 
        p = (volatile u_int16_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
-       
+
        while (count > 0) {
                *p = bswap16(*pointer);
                ++pointer;
@@ -93,7 +87,7 @@
         oabs(bsu_),
         0,
         0,
- 
+
         oabs(bsr1_),
         oabs(bsw1_),
         oabs(bsrm1_),
diff -r b719ea749794 -r 22b37c6f0b76 sys/arch/amiga/amiga/amiga_init.c
--- a/sys/arch/amiga/amiga/amiga_init.c Sat Jan 26 13:22:16 2002 +0000
+++ b/sys/arch/amiga/amiga/amiga_init.c Sat Jan 26 13:24:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amiga_init.c,v 1.74 2001/03/02 16:29:41 mhitch Exp $   */
+/*     $NetBSD: amiga_init.c,v 1.75 2002/01/26 13:24:53 aymeric Exp $  */
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -117,19 +117,18 @@
 u_long scsi_nosync;
 int shift_nosync;
 
-void  start_c __P((int, u_int, u_int, u_int, char *, u_int, u_long, u_long));
-void rollcolor __P((int));
-static int kernel_image_magic_size __P((void));
-static void kernel_image_magic_copy __P((u_char *));
-int kernel_reload_write __P((struct uio *));
-extern void kernel_reload __P((char *, u_long, u_long, u_long, u_long,
-       u_long, u_long, u_long, u_long, u_long, u_long));
-extern void etext __P((void));
-void start_c_cleanup __P((void));
+void  start_c(int, u_int, u_int, u_int, char *, u_int, u_long, u_long);
+void rollcolor(int);
+static int kernel_image_magic_size(void);
+static void kernel_image_magic_copy(u_char *);
+int kernel_reload_write(struct uio *);
+extern void kernel_reload(char *, u_long, u_long, u_long, u_long,
+       u_long, u_long, u_long, u_long, u_long, u_long);
+extern void etext(void);
+void start_c_cleanup(void);
 
 void *
-chipmem_steal(amount)
-       long amount;
+chipmem_steal(long amount)
 {
        /*
         * steal from top of chipmem, so we don't collide with
@@ -366,8 +365,8 @@
        ptpa = pstart;
 #ifdef DRACO
        if ((id>>24)==0x7D) {
-               ptextra = NDRCCPG 
-                   + RELOC(NZTWOMEMPG, u_int) 
+               ptextra = NDRCCPG
+                   + RELOC(NZTWOMEMPG, u_int)
                    + btoc(RELOC(ZBUSAVAIL, u_int));
        } else
 #endif
@@ -493,8 +492,8 @@
                        }
                        sg = (u_int *)RELOC(Sysseg_pa, u_int);
                        sg = (u_int *)(sg[loadbase >> SG4_SHIFT1] & SG4_ADDR1);
-                       shadow_pt = 
-                           ((u_int *)(sg[(loadbase & SG4_MASK2) >> SG4_SHIFT2] 
+                       shadow_pt =
+                           ((u_int *)(sg[(loadbase & SG4_MASK2) >> SG4_SHIFT2]
                                & SG4_ADDR1)) +
                            ((loadbase & SG4_MASK3) >> SG4_SHIFT3); /* XXX is */
 
@@ -560,8 +559,8 @@
                                vstart += NBPG;
                                avail -= NBPG;
                        }
-                       shadow_pt = 
-                           ((u_int *)(sg[loadbase >> SG_ISHIFT] & 0xffffff00)) 
+                       shadow_pt =
+                           ((u_int *)(sg[loadbase >> SG_ISHIFT] & 0xffffff00))
                            + ((loadbase & SG_PMASK) >> SG_PSHIFT);
                }
        }
@@ -583,7 +582,7 @@
 
 #if defined(M68040) || defined(M68060)
        /*
-        * map the kernel segment table cache invalidated for 
+        * map the kernel segment table cache invalidated for
         * these machines (for the 68040 not strictly necessary, but
         * recommended by Motorola; for the 68060 mandatory)
         */
@@ -639,7 +638,7 @@
 
 #ifdef DEBUG_KERNEL_START
                /*
-                * early rollcolor Altais mapping 
+                * early rollcolor Altais mapping
                 * XXX (only works if in slot 0)
                 */
                *pg++ = 0x20000000 | PG_RW | PG_CI | PG_V;
@@ -647,7 +646,7 @@
        } else
 #endif
        {
-               pg_proto = CHIPMEMBASE | PG_RW | PG_CI | PG_V;  
+               pg_proto = CHIPMEMBASE | PG_RW | PG_CI | PG_V;
                                                /* CI needed here?? */
                while (pg_proto < CHIPMEMTOP) {
                        *pg++     = pg_proto;
@@ -688,10 +687,10 @@
                pg = shadow_pt;
                *pg++ = PG_NV;                  /* Make page 0 invalid */
                pg_proto += NBPG;
-               for (i = NBPG; i < (u_int)etext; i += NBPG, pg_proto += NBPG) 
+               for (i = NBPG; i < (u_int)etext; i += NBPG, pg_proto += NBPG)
                        *pg++ = pg_proto;
                pg_proto = (pg_proto & PG_FRAME) | PG_RW | PG_V;
-               for (; i < vstart + USPACE; i += NBPG, pg_proto += NBPG) 
+               for (; i < vstart + USPACE; i += NBPG, pg_proto += NBPG)
                        *pg++ = pg_proto;
        }
 
@@ -749,7 +748,7 @@
                            RELOC(DRCCADDR, u_int) + NDRCCPG * NBPG;
 
                        RELOC(ZBUSADDR, vaddr_t) =
-                           RELOC(ZTWOMEMADDR, u_int) + 
+                           RELOC(ZTWOMEMADDR, u_int) +
                            RELOC(NZTWOMEMPG, u_int)*NBPG;
                } else {
                        RELOC(ZBUSADDR, vaddr_t) =
@@ -760,7 +759,7 @@
                 * some nice variables for pmap to use
                 */
                RELOC(amigahwaddr, vaddr_t) = RELOC(DRCCADDR, u_int);
-       } else 
+       } else
 #endif
        {
                RELOC(CHIPMEMADDR, u_int) =
@@ -836,8 +835,8 @@
 
                if (id & AMIGA_68060) {
                        /* do i need to clear the branch cache? */
-                       asm volatile (  ".word 0x4e7a,0x0002;" 
-                                       "orl #0x400000,%%d0;" 
+                       asm volatile (  ".word 0x4e7a,0x0002;"
+                                       "orl #0x400000,%%d0;"
                                        ".word 0x4e7b,0x0002" : : : "d0");
                }
 
@@ -855,7 +854,7 @@
 ((volatile struct Custom *)0xdff000)->color[0] = 0xA70;                /* ORANGE */
 #endif
 
-               asm volatile ("movel #0xc000,%%d0; .word 0x4e7b,0x0003" 
+               asm volatile ("movel #0xc000,%%d0; .word 0x4e7b,0x0003"
                    : : :"d0" );
        } else
 #endif
@@ -909,7 +908,7 @@
                draco_intfrc = draco_intpen + NBPG;
                draco_misc = draco_intfrc + NBPG;
                draco_ioct = (struct drioct *)(DRCCADDR + DRIOCTLPG*NBPG);
-       } else 
+       } else
 #endif
        {
                INTREQRaddr = (vaddr_t)&custom.intreqr;
@@ -954,11 +953,11 @@
 
                *(volatile u_int8_t *)(DRCCADDR + 1 +
                    DRSUPIOPG*NBPG + 4*(0x2F8 + 1)) = 0; /* and com1 */
-               
+
                draco_ioct->io_control |= DRCNTRL_WDOGDIS; /* stop Fido */
                *draco_misc &= ~1/*DRMISC_FASTZ2*/;
 
-       } else 
+       } else
 #endif
        {
                custom.intena = 0x7fff;                 /* disable ints */
@@ -992,10 +991,10 @@
 
 #ifdef P5PPC68KBOARD
        /*
-        * Are we an P5 PPC/68K board? install different reset 
+        * Are we an P5 PPC/68K board? install different reset
         * routine.
         */
-        
+
         for (cdp = cfdev, ecdp = &cfdev[ncfdev]; cdp < ecdp; cdp++) {
                if (cdp->rom.manid == 8512 &&
                    (cdp->rom.prodid == 100 || cdp->rom.prodid == 110)) {
diff -r b719ea749794 -r 22b37c6f0b76 sys/arch/amiga/amiga/autoconf.c
--- a/sys/arch/amiga/amiga/autoconf.c   Sat Jan 26 13:22:16 2002 +0000
+++ b/sys/arch/amiga/amiga/autoconf.c   Sat Jan 26 13:24:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.78 2001/02/02 21:52:12 is Exp $ */
+/*     $NetBSD: autoconf.c,v 1.79 2002/01/26 13:24:53 aymeric Exp $    */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -42,10 +42,10 @@
 #include <amiga/amiga/device.h>
 #include <amiga/amiga/custom.h>
 
-static void findroot __P((void));
-void mbattach __P((struct device *, struct device *, void *));
-int mbprint __P((void *, const char *));
-int mbmatch __P((struct device *, struct cfdata *, void *));
+static void findroot(void);
+void mbattach(struct device *, struct device *, void *);
+int mbprint(void *, const char *);
+int mbmatch(struct device *, struct cfdata *, void *);
 
 #include <sys/kernel.h>
 
@@ -82,7 +82,7 @@
 #ifdef DEBUG_KERNEL_START
        printf("survived autoconf, going to enable interrupts\n");
 #endif
-       
+
 #ifdef DRACO
        if (is_draco()) {
                *draco_intena |= DRIRQ_GLOBAL;
@@ -147,8 +147,8 @@
 
 /*
  * use config_search to find appropriate device, then call that device
- * directly with NULL device variable storage.  A device can then 
- * always tell the difference betwean the real and console init 
+ * directly with NULL device variable storage.  A device can then
+ * always tell the difference betwean the real and console init
  * by checking for NULL.
  */
 int
@@ -179,12 +179,12 @@
 
 /*
  * this function needs to get enough configured to do a console
- * basically this means start attaching the grfxx's that support 
+ * basically this means start attaching the grfxx's that support
  * the console. Kinda hacky but it works.
  */
 void
 config_console()
-{      
+{



Home | Main Index | Thread Index | Old Index