qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thorsten Zitterell <the.real.hik@gmx.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] hw/pxa2xx_gpio.c
Date: Fri, 16 Nov 2007 16:14:30 +0100	[thread overview]
Message-ID: <473DB3D6.5030301@gmx.net> (raw)

[-- 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];


                 reply	other threads:[~2007-11-16 15:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=473DB3D6.5030301@gmx.net \
    --to=the.real.hik@gmx.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).