Module Name:    src
Committed By:   christos
Date:           Mon Feb 24 22:31:56 UTC 2014

Modified Files:
        src/sys/arch/emips/stand/common: clock.c common.h enic.c prom_iface.c
            putchar.c

Log Message:
make this compile


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/stand/common/clock.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/stand/common/common.h \
    src/sys/arch/emips/stand/common/enic.c \
    src/sys/arch/emips/stand/common/prom_iface.c \
    src/sys/arch/emips/stand/common/putchar.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/emips/stand/common/clock.c
diff -u src/sys/arch/emips/stand/common/clock.c:1.1 src/sys/arch/emips/stand/common/clock.c:1.2
--- src/sys/arch/emips/stand/common/clock.c:1.1	Tue Jan 25 20:18:54 2011
+++ src/sys/arch/emips/stand/common/clock.c	Mon Feb 24 17:31:56 2014
@@ -1,4 +1,4 @@
-/*      $NetBSD: clock.c,v 1.1 2011/01/26 01:18:54 pooka Exp $ */
+/*      $NetBSD: clock.c,v 1.2 2014/02/24 22:31:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -33,11 +33,12 @@
 
 #include <sys/types.h>
 #include <machine/emipsreg.h>
+#include <lib/libsa/net.h>
 
 #include <stand/common/common.h>
 
-long
-getsecs()
+satime_t
+getsecs(void)
 {
     struct _Tc *Tc = (struct _Tc *)TIMER_DEFAULT_ADDRESS;
 	uint64_t now;

Index: src/sys/arch/emips/stand/common/common.h
diff -u src/sys/arch/emips/stand/common/common.h:1.2 src/sys/arch/emips/stand/common/common.h:1.3
--- src/sys/arch/emips/stand/common/common.h:1.2	Thu Feb  6 13:43:41 2014
+++ src/sys/arch/emips/stand/common/common.h	Mon Feb 24 17:31:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.h,v 1.2 2014/02/06 18:43:41 christos Exp $	*/
+/*	$NetBSD: common.h,v 1.3 2014/02/24 22:31:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -43,9 +43,6 @@ extern int debug;	/* only used for netwo
 /* startprog.S */
 extern void startprog (int, int, int, char **, int, const void *, int, int);
 
-/* clock.c */
-extern long getsecs (void);
-
 /* init_board.c */
 #define BOARD_HAS_DISK0   0x01
 #define BOARD_HAS_DISK1   0x02
@@ -69,5 +66,8 @@ extern int enic_present(int);
 /* print.c */
 extern void xputchar(int);
 
+/* putchar.c */
+extern void putchar(int);
+
 /* vers.c (generated by newvers.sh) */
 extern const char bootprog_rev[];
Index: src/sys/arch/emips/stand/common/enic.c
diff -u src/sys/arch/emips/stand/common/enic.c:1.2 src/sys/arch/emips/stand/common/enic.c:1.3
--- src/sys/arch/emips/stand/common/enic.c:1.2	Mon Feb 24 03:00:52 2014
+++ src/sys/arch/emips/stand/common/enic.c	Mon Feb 24 17:31:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: enic.c,v 1.2 2014/02/24 08:00:52 martin Exp $	*/
+/*	$NetBSD: enic.c,v 1.3 2014/02/24 22:31:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -69,6 +69,10 @@
 #include "start.h"
 
 #include <machine/emipsreg.h>
+
+#include "start.h"
+#include "common.h"
+
 #define the_enic ((struct _Enic *)ETHERNET_DEFAULT_ADDRESS)
 
 /* forward declarations */
@@ -100,7 +104,8 @@ static void dump_packet(void *, int);
 
 /* Send a packet
  */
-static int enic_putpkt(struct _Enic *regs, void *buf, int bytes)
+static int
+enic_putpkt(struct _Enic *regs, void *buf, int bytes)
 {
     paddr_t phys = kvtophys(buf);
 
@@ -113,7 +118,8 @@ static int enic_putpkt(struct _Enic *reg
 
 /* Get a packet
  */
-int enic_getpkt(struct _Enic *regs, void *buf, int bytes, int timeo)
+static int
+enic_getpkt(struct _Enic *regs, void *buf, int bytes, int timeo)
 {
     paddr_t phys;
     unsigned int isr, saf, hi, lo, fl;
@@ -143,8 +149,9 @@ int enic_getpkt(struct _Enic *regs, void
 
             /* beware, order matters */
             saf = regs->SizeAndFlags;
-            hi  = regs->BufferAddressHi32; /* BUGBUG 64bit */
-            lo  = regs->BufferAddressLo32; /* this pops the fifo */
+            hi = regs->BufferAddressHi32; /* BUGBUG 64bit */
+            lo = regs->BufferAddressLo32; /* this pops the fifo */
+	    __USE(hi);
 
             fl = saf & (ES_F_MASK &~ ES_F_DONE);
 
@@ -182,7 +189,7 @@ static int enic_getmac(struct _Enic *reg
 
     regs->Control = EC_RESET;
     Delay(1);
-	regs->Control = regs->Control & (~EC_RXDIS);
+    regs->Control = regs->Control & (~EC_RXDIS);
 
     buffer[0] = ENIC_CMD_GET_ADDRESS;
 
@@ -208,10 +215,11 @@ static int enic_getmac(struct _Enic *reg
 
 /* Exported interface
  */
-int enic_present(int unit)
+int
+enic_present(int unit)
 {
-	if ((unit != 0) || (the_enic->Tag != PMTTAG_ETHERNET))
-        return 0;
+    if ((unit != 0) || (the_enic->Tag != PMTTAG_ETHERNET))
+	return 0;
 
     return 1;
 }
Index: src/sys/arch/emips/stand/common/prom_iface.c
diff -u src/sys/arch/emips/stand/common/prom_iface.c:1.2 src/sys/arch/emips/stand/common/prom_iface.c:1.3
--- src/sys/arch/emips/stand/common/prom_iface.c:1.2	Mon Feb 24 02:50:22 2014
+++ src/sys/arch/emips/stand/common/prom_iface.c	Mon Feb 24 17:31:56 2014
@@ -62,10 +62,11 @@ void *nope(void);
 void real_halt(void*);
 void halt(int *unused, int howto);
 
-void *nope(void) {return NULL;}
+static void *nope(void) {return NULL;}
 int getchar(void){return GetChar();}
 
-void real_halt(void *arg)
+static void
+real_halt(void *arg)
 {
     int howto = (int)arg;
     u_int ps = GetPsr();
@@ -101,7 +102,8 @@ void real_halt(void *arg)
     }
 }
 
-void halt(int *unused, int howto)
+static void
+halt(int *unused, int howto)
 {
     /* We must switch to a safe stack! TLB will go down 
      */
@@ -119,10 +121,10 @@ struct callback cb = {
     nope,
     nope,
     nope,
-	getchar,
+    getchar,
     nope,
     nope,
-	printf,
+    printf,
     nope,
     nope,
     nope,
@@ -149,7 +151,7 @@ struct callback cb = {
     nope,
     nope,
     nope,
-	halt
+    halt
 };
 
 typedef char *string_t;
@@ -249,7 +251,7 @@ int init_memory(void)
     /* Make sure we know */
  DoneFirst:
     if ((First == NULL) || (Ours == NULL)) {
-        printf("Bad memory layout (%p,%p), wont work.\n", First, Ours);
+        printf("Bad memory layout (%p, %p), wont work.\n", First, Ours);
         return 0;
     }
 
Index: src/sys/arch/emips/stand/common/putchar.c
diff -u src/sys/arch/emips/stand/common/putchar.c:1.2 src/sys/arch/emips/stand/common/putchar.c:1.3
--- src/sys/arch/emips/stand/common/putchar.c:1.2	Mon Feb 24 02:41:15 2014
+++ src/sys/arch/emips/stand/common/putchar.c	Mon Feb 24 17:31:56 2014
@@ -1,4 +1,4 @@
-/*      $NetBSD: putchar.c,v 1.2 2014/02/24 07:41:15 martin Exp $	*/
+/*      $NetBSD: putchar.c,v 1.3 2014/02/24 22:31:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -34,8 +34,6 @@
 #include "start.h"
 #include "common.h"
 
-void	putchar(int);
-
 /* Write a character to the USART
  */
 void

Reply via email to