hw/pxa2xx_gpio.c
PATCH 1/1 hw/pxa2xx_gpio.c
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
pxa2xx_gpio.c +5 -0
@@ -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];