This patch avoids crashing of QEMU when applications (e.g pxaregs) read the GPCR register.
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];