hw/gpio/pl061: Document a shortcoming in our implementation
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 2 Jul 2021 10:40:17 +0000 (11:40 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 9 Jul 2021 15:09:12 +0000 (16:09 +0100)
The Luminary PL061s in the Stellaris LM3S9695 don't all have the same
reset value for GPIOPUR.  We can get away with not letting the board
configure the PUR reset value because we don't actually wire anything
up to the lines which should reset to pull-up.  Add a comment noting
this omission.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/gpio/pl061.c

index 4002ab51544604cb34e18e8f71ab7fb63e4303ba..899be861cc5f94ba5cb08728c926d0dfcbb308b5 100644 (file)
@@ -453,6 +453,15 @@ static void pl061_enter_reset(Object *obj, ResetType type)
     trace_pl061_reset(DEVICE(s)->canonical_path);
 
     /* reset values from PL061 TRM, Stellaris LM3S5P31 & LM3S8962 Data Sheet */
+
+    /*
+     * FIXME: For the LM3S6965, not all of the PL061 instances have the
+     * same reset values for GPIOPUR, GPIOAFSEL and GPIODEN, so in theory
+     * we should allow the board to configure these via properties.
+     * In practice, we don't wire anything up to the affected GPIO lines
+     * (PB7, PC0, PC1, PC2, PC3 -- they're used for JTAG), so we can
+     * get away with this inaccuracy.
+     */
     s->data = 0;
     s->old_in_data = 0;
     s->dir = 0;