Module Name:    src
Committed By:   macallan
Date:           Tue Aug 25 02:09:18 UTC 2015

Modified Files:
        src/sys/arch/sgimips/gio: newport.c

Log Message:
- pass the right address to bus_space_mmap() so this works on N32 kernels
- don't mess with XMAP9 when switching to graphics mode


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/gio/newport.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/sgimips/gio/newport.c
diff -u src/sys/arch/sgimips/gio/newport.c:1.18 src/sys/arch/sgimips/gio/newport.c:1.19
--- src/sys/arch/sgimips/gio/newport.c:1.18	Mon Jun  2 15:16:23 2014
+++ src/sys/arch/sgimips/gio/newport.c	Tue Aug 25 02:09:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: newport.c,v 1.18 2014/06/02 15:16:23 macallan Exp $	*/
+/*	$NetBSD: newport.c,v 1.19 2015/08/25 02:09:18 macallan Exp $	*/
 
 /*
  * Copyright (c) 2003 Ilpo Ruotsalainen
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.18 2014/06/02 15:16:23 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.19 2015/08/25 02:09:18 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -58,10 +58,9 @@ struct newport_softc {
 };
 
 struct newport_devconfig {
-	uint32_t		dc_addr;
-
 	bus_space_tag_t		dc_st;
 	bus_space_handle_t	dc_sh;
+	bus_addr_t		dc_addr;
 
 	int			dc_boardrev;
 	int			dc_vc2rev;
@@ -909,12 +908,6 @@ newport_ioctl(void *v, void *vs, u_long 
 				rex3_wait_gfifo(dc);
 				newport_setup_hw(dc);
 				vcons_redraw_screen(vd->active);
-			} else {
-				xmap9_write_mode(dc, 0,
-	    			    XMAP9_MODE_GAMMA_BYPASS |
-				    XMAP9_CONFIG_RGBMAP_2 |
-	    			    XMAP9_MODE_PIXSIZE_24BPP);
-				xmap9_write(dc, XMAP9_DCBCRS_MODE_SELECT, 0);
 			}
 		}
 		return 0;
@@ -934,5 +927,5 @@ newport_mmap(void *v, void *vs, off_t of
 	if ( offset >= 0xfffff)
 		return -1;
 
-	return bus_space_mmap(dc->dc_st, dc->dc_sh, offset, prot, 0);
+	return bus_space_mmap(dc->dc_st, dc->dc_addr, offset, prot, 0);
 }

Reply via email to