Sat Jan 23 17:09:51 2016 UTC ()
add another special case so SM50x's framebuffer gets mapped with prefetching /
write combining enabled.
This needs to be generalized somewhere...


(macallan)
diff -r1.150 -r1.151 src/sys/dev/pci/pci.c

cvs diff -r1.150 -r1.151 src/sys/dev/pci/pci.c (expand / switch to context diff)
--- src/sys/dev/pci/pci.c 2015/11/02 09:29:08 1.150
+++ src/sys/dev/pci/pci.c 2016/01/23 17:09:51 1.151
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.c,v 1.150 2015/11/02 09:29:08 knakahara Exp $	*/
+/*	$NetBSD: pci.c,v 1.151 2016/01/23 17:09:51 macallan Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.150 2015/11/02 09:29:08 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.151 2016/01/23 17:09:51 macallan Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -352,8 +352,12 @@
 				nr->r_size = 0x7ff000;
 				nr->r_flags = BUS_SPACE_MAP_LINEAR |
 					      BUS_SPACE_MAP_PREFETCHABLE;
+			} else if ((PCI_VENDOR(id) == PCI_VENDOR_SILMOTION) &&
+			   (PCI_PRODUCT(id) == PCI_PRODUCT_SILMOTION_SM502) &&
+			   (bar == 0x10)) {
+			   	r->r_flags = BUS_SPACE_MAP_LINEAR |
+					     BUS_SPACE_MAP_PREFETCHABLE;
 			}
-			
 		}
 	}