hw/arm/pxa2xx_gpio: Fix handling of GPSR/GPCR reads
authorPeter Maydell <peter.maydell@linaro.org>
Sun, 29 Jun 2014 17:38:40 +0000 (18:38 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Sun, 29 Jun 2014 17:38:40 +0000 (18:38 +0100)
commitab7a0f0b6dbe8836d490c736803abef6e3695e1f
tree731672c6bbe31834c2e9010c4dc547fdee7d2a25
parented657d7117d751dfaf5b00e5b17e45cd4a6d974d
hw/arm/pxa2xx_gpio: Fix handling of GPSR/GPCR reads

The PXA2xx GPIO GPSR and GPCR registers are write-only, with reads being
undefined behaviour. Instead of having GPCR return 31337 and GPSR return
the value last written, make both log the guest error and return 0.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
hw/arm/pxa2xx_gpio.c