Module Name:    src
Committed By:   christos
Date:           Thu Jul 21 17:02:47 UTC 2016

Modified Files:
        src/sys/arch/mips/sibyte/dev: sbbuswatch.c sbmac.c sbobio.c sbscn.c
            sbtimer.c sbwdog.c
        src/sys/arch/mips/sibyte/pci: sbbrz.c sbbrz_pci.c

Log Message:
make this compile


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/sibyte/dev/sbbuswatch.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/mips/sibyte/dev/sbmac.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/sibyte/dev/sbobio.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/mips/sibyte/dev/sbscn.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/mips/sibyte/dev/sbtimer.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/sibyte/dev/sbwdog.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/sibyte/pci/sbbrz.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/sibyte/pci/sbbrz_pci.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/mips/sibyte/dev/sbbuswatch.c
diff -u src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.2 src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.3
--- src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.2	Sun Feb 20 02:47:39 2011
+++ src/sys/arch/mips/sibyte/dev/sbbuswatch.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbbuswatch.c,v 1.2 2011/02/20 07:47:39 matt Exp $	*/
+/*	$NetBSD: sbbuswatch.c,v 1.3 2016/07/21 17:02:47 christos Exp $	*/
 /*
  * Copyright (c) 2010, The NetBSD Foundation, Inc.  All rights reserved.
  *
@@ -38,8 +38,8 @@
 #include <mips/sibyte/include/sb1250_regs.h>
 #include <mips/sibyte/dev/sbbuswatchvar.h>
 
-#define READ_REG(rp)            (mips3_ld((volatile uint64_t *)(rp)))
-#define WRITE_REG(rp, val)      (mips3_sd((volatile uint64_t *)(rp), (val)))
+#define READ_REG(rp)            mips3_ld((register_t)(rp))
+#define WRITE_REG(rp, val)      mips3_sd((register_t)(rp), (val))
 
 static void sibyte_bus_watch_intr(void *, uint32_t, vaddr_t);
 

Index: src/sys/arch/mips/sibyte/dev/sbmac.c
diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.45 src/sys/arch/mips/sibyte/dev/sbmac.c:1.46
--- src/sys/arch/mips/sibyte/dev/sbmac.c:1.45	Fri Jun 10 09:27:12 2016
+++ src/sys/arch/mips/sibyte/dev/sbmac.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.45 2016/06/10 13:27:12 ozaki-r Exp $ */
+/* $NetBSD: sbmac.c,v 1.46 2016/07/21 17:02:47 christos Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.45 2016/06/10 13:27:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.46 2016/07/21 17:02:47 christos Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -111,8 +111,8 @@ typedef enum { sbmac_state_uninit, sbmac
 #define	dprintf(x)
 #endif
 
-#define	SBMAC_READCSR(t) mips3_ld((volatile uint64_t *) (t))
-#define	SBMAC_WRITECSR(t, v) mips3_sd((volatile uint64_t *) (t), (v))
+#define	SBMAC_READCSR(t) mips3_ld((register_t)(t))
+#define	SBMAC_WRITECSR(t, v) mips3_sd((register_t)(t), (v))
 
 #define	PKSEG1(x) ((sbmac_port_t) MIPS_PHYS_TO_KSEG1(x))
 

Index: src/sys/arch/mips/sibyte/dev/sbobio.c
diff -u src/sys/arch/mips/sibyte/dev/sbobio.c:1.22 src/sys/arch/mips/sibyte/dev/sbobio.c:1.23
--- src/sys/arch/mips/sibyte/dev/sbobio.c:1.22	Sun Jul 10 19:32:03 2011
+++ src/sys/arch/mips/sibyte/dev/sbobio.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sbobio.c,v 1.22 2011/07/10 23:32:03 matt Exp $ */
+/* $NetBSD: sbobio.c,v 1.23 2016/07/21 17:02:47 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbobio.c,v 1.22 2011/07/10 23:32:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbobio.c,v 1.23 2016/07/21 17:02:47 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -180,7 +180,7 @@ sbobio_match(device_t parent, cfdata_t m
 	if (zap->za_locs.za_type != ZBBUS_ENTTYPE_OBIO)
 		return (0);
 
-	sysrev = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION));
+	sysrev = mips3_ld((register_t)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION));
 	switch (SYS_SOC_TYPE(sysrev)) {
 	case K_SYS_SOC_TYPE_BCM1120:
 	case K_SYS_SOC_TYPE_BCM1125:
@@ -205,7 +205,7 @@ sbobio_attach(device_t parent, device_t 
 	int i, devcount;
 	int locs[SBOBIOCF_NLOCS];
 
-	sysrev = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION));
+	sysrev = mips3_ld((register_t)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION));
 	switch (SYS_SOC_TYPE(sysrev)) {
 	case K_SYS_SOC_TYPE_BCM1120:
 	case K_SYS_SOC_TYPE_BCM1125:

Index: src/sys/arch/mips/sibyte/dev/sbscn.c
diff -u src/sys/arch/mips/sibyte/dev/sbscn.c:1.41 src/sys/arch/mips/sibyte/dev/sbscn.c:1.42
--- src/sys/arch/mips/sibyte/dev/sbscn.c:1.41	Mon Apr 13 17:18:42 2015
+++ src/sys/arch/mips/sibyte/dev/sbscn.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sbscn.c,v 1.41 2015/04/13 21:18:42 riastradh Exp $ */
+/* $NetBSD: sbscn.c,v 1.42 2016/07/21 17:02:47 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -109,7 +109,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.41 2015/04/13 21:18:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.42 2016/07/21 17:02:47 christos Exp $");
 
 #define	SBSCN_DEBUG
 
@@ -242,8 +242,8 @@ static void	sbscn_attach(device_t, devic
 CFATTACH_DECL_NEW(sbscn, sizeof(struct sbscn_softc),
     sbscn_match, sbscn_attach, NULL, NULL);
 
-#define	READ_REG(rp)		(mips3_ld((volatile uint64_t *)(rp)))
-#define	WRITE_REG(rp, val)	(mips3_sd((volatile uint64_t *)(rp), (val)))
+#define	READ_REG(rp)		(mips3_ld((register_t)(rp)))
+#define	WRITE_REG(rp, val)	(mips3_sd((register_t)(rp), (val)))
 
 /*
  * input and output signals are actually the _inverse_ of the bits in the

Index: src/sys/arch/mips/sibyte/dev/sbtimer.c
diff -u src/sys/arch/mips/sibyte/dev/sbtimer.c:1.19 src/sys/arch/mips/sibyte/dev/sbtimer.c:1.20
--- src/sys/arch/mips/sibyte/dev/sbtimer.c:1.19	Thu Mar 10 12:40:50 2011
+++ src/sys/arch/mips/sibyte/dev/sbtimer.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sbtimer.c,v 1.19 2011/03/10 17:40:50 tsutsui Exp $ */
+/* $NetBSD: sbtimer.c,v 1.20 2016/07/21 17:02:47 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbtimer.c,v 1.19 2011/03/10 17:40:50 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbtimer.c,v 1.20 2016/07/21 17:02:47 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -56,8 +56,8 @@ struct sbtimer_softc {
 #define	SBTIMER_CLOCK		1
 #define	SBTIMER_STATCLOCK	2
 
-#define	READ_REG(rp)		(mips3_ld((volatile uint64_t *)(rp)))
-#define	WRITE_REG(rp, val)	(mips3_sd((volatile uint64_t *)(rp), (val)))
+#define	READ_REG(rp)		mips3_ld((register_t)(rp))
+#define	WRITE_REG(rp, val)	mips3_sd((register_t)(rp), (val))
 
 static int	sbtimer_match(device_t, cfdata_t, void *);
 static void	sbtimer_attach(device_t, device_t, void *);

Index: src/sys/arch/mips/sibyte/dev/sbwdog.c
diff -u src/sys/arch/mips/sibyte/dev/sbwdog.c:1.13 src/sys/arch/mips/sibyte/dev/sbwdog.c:1.14
--- src/sys/arch/mips/sibyte/dev/sbwdog.c:1.13	Sun Jul 10 19:32:03 2011
+++ src/sys/arch/mips/sibyte/dev/sbwdog.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sbwdog.c,v 1.13 2011/07/10 23:32:03 matt Exp $ */
+/* $NetBSD: sbwdog.c,v 1.14 2016/07/21 17:02:47 christos Exp $ */
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbwdog.c,v 1.13 2011/07/10 23:32:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbwdog.c,v 1.14 2016/07/21 17:02:47 christos Exp $");
 
 #include "locators.h"
 
@@ -76,8 +76,8 @@ static void sbwdog_intr(void *, uint32_t
 CFATTACH_DECL_NEW(sbwdog, sizeof(struct sbwdog_softc),
     sbwdog_match, sbwdog_attach, NULL, NULL);
 
-#define	READ_REG(rp)		(mips3_ld((volatile uint64_t *)(rp)))
-#define	WRITE_REG(rp, val)	(mips3_sd((volatile uint64_t *)(rp), (val)))
+#define	READ_REG(rp)		(mips3_ld((register_t)(rp)))
+#define	WRITE_REG(rp, val)	(mips3_sd((register_t)(rp), (val)))
 
 static int
 sbwdog_match(device_t parent, cfdata_t cf, void *aux)

Index: src/sys/arch/mips/sibyte/pci/sbbrz.c
diff -u src/sys/arch/mips/sibyte/pci/sbbrz.c:1.3 src/sys/arch/mips/sibyte/pci/sbbrz.c:1.4
--- src/sys/arch/mips/sibyte/pci/sbbrz.c:1.3	Tue May 17 13:34:51 2011
+++ src/sys/arch/mips/sibyte/pci/sbbrz.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sbbrz.c,v 1.3 2011/05/17 17:34:51 dyoung Exp $ */
+/* $NetBSD: sbbrz.c,v 1.4 2016/07/21 17:02:47 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -174,7 +174,7 @@ sbbrz_attach(device_t parent, device_t s
         bool host;
 
         /* Tell the user whether it's host or device mode. */
-        regval = mips3_ld((void *)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_CFG));
+        regval = mips3_ld((register_t)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_CFG));
         host = (regval & M_SYS_PCI_HOST) != 0;
 
         aprint_normal(": %s pci mode\n", host ? "host" : "device");

Index: src/sys/arch/mips/sibyte/pci/sbbrz_pci.c
diff -u src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.6 src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.7
--- src/sys/arch/mips/sibyte/pci/sbbrz_pci.c:1.6	Fri Oct  2 01:22:51 2015
+++ src/sys/arch/mips/sibyte/pci/sbbrz_pci.c	Thu Jul 21 13:02:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sbbrz_pci.c,v 1.6 2015/10/02 05:22:51 msaitoh Exp $ */
+/* $NetBSD: sbbrz_pci.c,v 1.7 2016/07/21 17:02:47 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -64,7 +64,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.6 2015/10/02 05:22:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbbrz_pci.c,v 1.7 2016/07/21 17:02:47 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -145,7 +145,7 @@ sbbrz_pci_bus_maxdevs(void *cpv, int bus
 		return 32;
 
 	/* If the PCI on the 1250, 32 devices if host mode, otherwise only 2. */
-	regval = mips3_ld((void *)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_CFG));
+	regval = mips3_ld((register_t)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_CFG));
 	host = (regval & M_SYS_PCI_HOST) != 0;
 
 	return (host ? 32 : 2);
@@ -192,7 +192,7 @@ sbbrz_pci_conf_read(void *cpv, pcitag_t 
 	if (badaddr64(addr, 4) != 0)
 		return 0xffffffff;
 
-	return mips3_lw_a64(addr);
+	return mips3_ld(addr);
 }
 
 void
@@ -211,7 +211,7 @@ sbbrz_pci_conf_write(void *cpv, pcitag_t
 	addr = A_PHYS_LDTPCI_CFG_MATCH_BITS + tag + offset;
 	addr = MIPS_PHYS_TO_XKPHYS(MIPS3_TLB_ATTR_UNCACHED, addr);
 
-	return mips3_sw_a64(addr, data);
+	return mips3_sd(addr, data);
 }
 
 int

Reply via email to