* [Qemu-devel] [PATCH] hw/pxa2xx_gpio.c
@ 2007-11-16 15:14 Thorsten Zitterell
0 siblings, 0 replies; only message in thread
From: Thorsten Zitterell @ 2007-11-16 15:14 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 92 bytes --]
This patch avoids crashing of QEMU when applications (e.g pxaregs) read the GPCR
register.
[-- Attachment #2: qemu-pxa-gpio-fix --]
[-- Type: text/plain, Size: 840 bytes --]
Index: pxa2xx_gpio.c
===================================================================
RCS file: /sources/qemu/qemu/hw/pxa2xx_gpio.c,v
retrieving revision 1.5
diff -u -r1.5 pxa2xx_gpio.c
--- pxa2xx_gpio.c 4 Oct 2007 19:41:17 -0000 1.5
+++ pxa2xx_gpio.c 16 Nov 2007 15:08:00 -0000
@@ -157,6 +157,11 @@
printf("%s: Read from a write-only register " REG_FMT "\n",
__FUNCTION__, offset);
return s->gpsr[bank]; /* Return last written value. */
+
+ case GPCR: /* GPIO Pin-Output Clear registers */
+ printf("%s: Read from a write-only register " REG_FMT "\n",
+ __FUNCTION__, offset);
+ return 0; /* Reading specified as unpredictable in documentation */
case GRER: /* GPIO Rising-Edge Detect Enable registers */
return s->rising[bank];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-16 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-16 15:14 [Qemu-devel] [PATCH] hw/pxa2xx_gpio.c Thorsten Zitterell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).