[coreboot-gerrit] Change in coreboot[master]: vexpress: charge to write32

Vladimir Serbinenko (Code Review) gerrit at coreboot.org
Sat May 13 22:30:13 CEST 2017


Vladimir Serbinenko has uploaded a new change for review. ( https://review.coreboot.org/19685 )

Change subject: vexpress: charge to write32
......................................................................

vexpress: charge to write32

Change-Id: I5fcc83328441ccfb34ee63a7406d26e393633c21
---
M src/mainboard/emulation/qemu-armv7/mainboard.c
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/19685/1

diff --git a/src/mainboard/emulation/qemu-armv7/mainboard.c b/src/mainboard/emulation/qemu-armv7/mainboard.c
index c1fcc6a..39c2361 100644
--- a/src/mainboard/emulation/qemu-armv7/mainboard.c
+++ b/src/mainboard/emulation/qemu-armv7/mainboard.c
@@ -21,25 +21,26 @@
 #include <halt.h>
 #include "mainboard.h"
 #include <edid.h>
+#include <arch/io.h>
 
 static void init_gfx(void)
 {
-	volatile uint32_t *pl111;
+	uint32_t *pl111;
 	struct edid edid;
 	/* width is at most 4096 */
 	/* height is at most 1024 */
 	int width = 800, height = 600;
 	uint32_t framebuffer = 0x4c000000;
 	pl111 = (uint32_t *) 0x10020000;
-	pl111[0] = (width / 4) - 4;
-	pl111[1] = height - 1;
+	write32(pl111, (width / 4) - 4);
+	write32(pl111 + 1, height - 1);
 	/* registers 2, 3 and 5 are ignored by qemu. Set them correctly if
 	   we ever go for real hw.  */
 	/* framebuffer adress offset. Has to be in vram.  */
-	pl111[4] = framebuffer;
-	pl111[7] = 0;
-	pl111[10] = 0xff;
-	pl111[6] = (5 << 1) | 0x801;
+	write32(pl111 + 4, framebuffer);
+	write32(pl111 + 7, 0);
+	write32(pl111 + 10, 0xff);
+	write32(pl111 + 6, (5 << 1) | 0x801);
 
 	edid.framebuffer_bits_per_pixel = 32;
 	edid.bytes_per_line = width * 4;

-- 
To view, visit https://review.coreboot.org/19685
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fcc83328441ccfb34ee63a7406d26e393633c21
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Vladimir Serbinenko <phcoder at gmail.com>



More information about the coreboot-gerrit mailing list