summaryrefslogtreecommitdiffstats
path: root/hw/gpio/aspeed_gpio.c
diff options
context:
space:
mode:
authorPeter Maydell2019-10-25 14:12:16 +0200
committerPeter Maydell2019-10-25 14:12:16 +0200
commit7bc8f9734213b76e76631a483be13d6737c2adbc (patch)
tree57158eb4d19eeec866bb7b0363164740ac0f1f42 /hw/gpio/aspeed_gpio.c
parentMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191024' into... (diff)
parenthw/arm/highbank: Use AddressSpace when using write_secondary_boot() (diff)
downloadqemu-7bc8f9734213b76e76631a483be13d6737c2adbc.tar.gz
qemu-7bc8f9734213b76e76631a483be13d6737c2adbc.tar.xz
qemu-7bc8f9734213b76e76631a483be13d6737c2adbc.zip
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20191025' into staging
target-arm queue: * raspi boards: some cleanup * raspi: implement the bcm2835 system timer device * raspi: implement a dummy thermal sensor * misc devices: switch to ptimer transaction API * cache TB flag state to improve performance of cpu_get_tb_cpu_state * aspeed: Add an AST2600 eval board # gpg: Signature made Fri 25 Oct 2019 13:11:25 BST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20191025: (42 commits) hw/arm/highbank: Use AddressSpace when using write_secondary_boot() hw/arm/raspi: Use AddressSpace when using arm_boot::write_secondary_boot hw/arm/bcm2836: Rename cpus[] as cpu[].core hw/arm/bcm2836: Make the SoC code modular hw/arm/bcm2835_peripherals: Use the SYS_timer hw/timer/bcm2835: Add the BCM2835 SYS_timer hw/arm/bcm2835_peripherals: Use the thermal sensor block hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor hw/watchdog/milkymist-sysctl.c: Switch to transaction-based ptimer API hw/m68k/mcf5206.c: Switch to transaction-based ptimer API hw/timer/grlib_gptimer.c: Switch to transaction-based ptimer API hw/timer/slavio_timer.c: Switch to transaction-based ptimer API hw/timer/slavio_timer: Remove useless check for NULL t->timer hw/dma/xilinx_axidma.c: Switch to transaction-based ptimer API hw/timer/xilinx_timer.c: Switch to transaction-based ptimer API hw/net/fsl_etsec/etsec.c: Switch to transaction-based ptimer API target/arm: Rely on hflags correct in cpu_get_tb_cpu_state linux-user/arm: Rebuild hflags for TARGET_WORDS_BIGENDIAN linux-user/aarch64: Rebuild hflags for TARGET_WORDS_BIGENDIAN target/arm: Rebuild hflags for M-profile NVIC ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/gpio/aspeed_gpio.c')
-rw-r--r--hw/gpio/aspeed_gpio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c
index 196e47c262..7acc5fa8e2 100644
--- a/hw/gpio/aspeed_gpio.c
+++ b/hw/gpio/aspeed_gpio.c
@@ -733,13 +733,13 @@ static void aspeed_gpio_get_pin(Object *obj, Visitor *v, const char *name,
{
int pin = 0xfff;
bool level = true;
- char group[3];
+ char group[4];
AspeedGPIOState *s = ASPEED_GPIO(obj);
int set_idx, group_idx = 0;
if (sscanf(name, "gpio%2[A-Z]%1d", group, &pin) != 2) {
/* 1.8V gpio */
- if (sscanf(name, "gpio%3s%1d", group, &pin) != 2) {
+ if (sscanf(name, "gpio%3[18A-E]%1d", group, &pin) != 2) {
error_setg(errp, "%s: error reading %s", __func__, name);
return;
}
@@ -760,7 +760,7 @@ static void aspeed_gpio_set_pin(Object *obj, Visitor *v, const char *name,
Error *local_err = NULL;
bool level;
int pin = 0xfff;
- char group[3];
+ char group[4];
AspeedGPIOState *s = ASPEED_GPIO(obj);
int set_idx, group_idx = 0;
@@ -771,7 +771,7 @@ static void aspeed_gpio_set_pin(Object *obj, Visitor *v, const char *name,
}
if (sscanf(name, "gpio%2[A-Z]%1d", group, &pin) != 2) {
/* 1.8V gpio */
- if (sscanf(name, "gpio%3s%1d", group, &pin) != 2) {
+ if (sscanf(name, "gpio%3[18A-E]%1d", group, &pin) != 2) {
error_setg(errp, "%s: error reading %s", __func__, name);
return;
}