[PATCH 11/13 v3] viafb: viafbdev.c

Previous thread: [Patch 3/13 v3] viafb: accel.c & accel.h by JosephChan on Tuesday, August 26, 2008 - 2:51 am. (2 messages)

Next thread: [PATCH 1/1] IPC - Document the new auto_msgmni proc file by Nadia.Derbey on Tuesday, August 26, 2008 - 2:54 am. (1 message)
From: JosephChan
Date: Tuesday, August 26, 2008 - 2:51 am

Remove the marco MMIO_OUT32, and replace it with writel() function.
And replace "u32" with "unsigned long" in writel() function (original 
MMIO_OUT32 marco) for avoiding warning message in 64bit OS.


Signed-off-by: Joseph Chan <josephchan@via.com.tw>

--- a/drivers/video/via/viafbdev.c	2008-08-07 23:55:46.000000000 +0800
+++ b/drivers/video/via/viafbdev.c	2008-08-23 08:24:31.000000000 +0800
@@ -891,30 +891,32 @@
 	}
 
 	/* BitBlt Source Address */
-	MMIO_OUT32(VIA_REG_SRCPOS, 0x0);
+	writel(0x0, viaparinfo->io_virt + VIA_REG_SRCPOS);
 	/* Source Base Address */
-	MMIO_OUT32(VIA_REG_SRCBASE, 0x0);
+	writel(0x0, viaparinfo->io_virt + VIA_REG_SRCBASE);
 	/* Destination Base Address */
-	/*MMIO_OUT32(VIA_REG_DSTBASE, 0x0); */
-	MMIO_OUT32(VIA_REG_DSTBASE,
-		   ((u32) (info->screen_base) - (u32) viafb_FB_MM) >> 3);
+	writel(((unsigned long) (info->screen_base) -
+		   (unsigned long) viafb_FB_MM) >> 3,
+		   viaparinfo->io_virt + VIA_REG_DSTBASE);
 	/* Pitch */
 	pitch = (info->var.xres_virtual + 7) & ~7;
-	MMIO_OUT32(VIA_REG_PITCH,
-		   VIA_PITCH_ENABLE |
+	writel(VIA_PITCH_ENABLE |
 		   (((pitch *
 		      info->var.bits_per_pixel >> 3) >> 3) |
 		      (((pitch * info->
-		      var.bits_per_pixel >> 3) >> 3) << 16)));
+		      var.bits_per_pixel >> 3) >> 3) << 16)),
+		      viaparinfo->io_virt + VIA_REG_PITCH);
 	/* BitBlt Destination Address */
-	MMIO_OUT32(VIA_REG_DSTPOS, ((rect->dy << 16) | rect->dx));
+	writel(((rect->dy << 16) | rect->dx),
+		viaparinfo->io_virt + VIA_REG_DSTPOS);
 	/* Dimension: width & height */
-	MMIO_OUT32(VIA_REG_DIMENSION,
-		   (((rect->height - 1) << 16) | (rect->width - 1)));
+	writel((((rect->height - 1) << 16) | (rect->width - 1)),
+		viaparinfo->io_virt + VIA_REG_DIMENSION);
 	/* Forground color or Destination color */
-	MMIO_OUT32(VIA_REG_FGCOLOR, col);
+	writel(col, viaparinfo->io_virt + VIA_REG_FGCOLOR);
 	/* GE Command */
-	MMIO_OUT32(VIA_REG_GECMD, (0x01 | 0x2000 | (rop << 24)));
+	writel((0x01 | 0x2000 | (rop << ...
From: Krzysztof Helt
Date: Tuesday, August 26, 2008 - 9:54 pm

On Tue, 26 Aug 2008 17:51:47 +0800

Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>

----------------------------------------------------------------------

--

Previous thread: [Patch 3/13 v3] viafb: accel.c & accel.h by JosephChan on Tuesday, August 26, 2008 - 2:51 am. (2 messages)

Next thread: [PATCH 1/1] IPC - Document the new auto_msgmni proc file by Nadia.Derbey on Tuesday, August 26, 2008 - 2:54 am. (1 message)