summaryrefslogtreecommitdiffstats
path: root/hw/arm/stm32f205_soc.c
diff options
context:
space:
mode:
authorStefan Hajnoczi2018-08-16 15:05:28 +0200
committerPeter Maydell2018-08-16 15:05:28 +0200
commita1c5a06224173043eb4ac5b280f0b78718121fa2 (patch)
tree0c05d1a4ad31d281b0b067a56ef0dbb220ad4407 /hw/arm/stm32f205_soc.c
parenti.MX6UL: Add Freescale i.MX6 UltraLite 14x14 EVK Board (diff)
downloadqemu-a1c5a06224173043eb4ac5b280f0b78718121fa2.tar.gz
qemu-a1c5a06224173043eb4ac5b280f0b78718121fa2.tar.xz
qemu-a1c5a06224173043eb4ac5b280f0b78718121fa2.zip
hw/arm: make bitbanded IO optional on ARMv7-M
Some ARM CPUs have bitbanded IO, a memory region that allows convenient bit access via 32-bit memory loads/stores. This eliminates the need for read-modify-update instruction sequences. This patch makes this optional feature an ARMv7MState qdev property, allowing boards to choose whether they want bitbanding or not. Status of boards: * iotkit (Cortex M33), no bitband * mps2 (Cortex M3), bitband * msf2 (Cortex M3), bitband * stellaris (Cortex M3), bitband * stm32f205 (Cortex M3), bitband As a side-effect of this patch, Peter Maydell noted that the Ethernet controller on mps2 board is now accessible. Previously they were hidden by the bitband region (which does not exist on the real board). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180814162739.11814-2-stefanha@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/stm32f205_soc.c')
-rw-r--r--hw/arm/stm32f205_soc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c
index c486d06a8b..980e5af13c 100644
--- a/hw/arm/stm32f205_soc.c
+++ b/hw/arm/stm32f205_soc.c
@@ -109,6 +109,7 @@ static void stm32f205_soc_realize(DeviceState *dev_soc, Error **errp)
armv7m = DEVICE(&s->armv7m);
qdev_prop_set_uint32(armv7m, "num-irq", 96);
qdev_prop_set_string(armv7m, "cpu-type", s->cpu_type);
+ qdev_prop_set_bit(armv7m, "enable-bitband", true);
object_property_set_link(OBJECT(&s->armv7m), OBJECT(get_system_memory()),
"memory", &error_abort);
object_property_set_bool(OBJECT(&s->armv7m), true, "realized", &err);