aboutsummaryrefslogtreecommitdiff
path: root/include/hw/char
diff options
context:
space:
mode:
authorLuc Michel <luc@lmichel.fr>2020-10-10 15:57:58 +0200
committerPeter Maydell <peter.maydell@linaro.org>2020-10-27 11:10:44 +0000
commitaac63e0e6ea30b521370d3e3477cdcec17035d02 (patch)
tree830692c325450176789955a7b497f2f5666d95b6 /include/hw/char
parent83ad469547812bb77faec1e98226f2859ab158d9 (diff)
hw/char/pl011: add a clock input
Add a clock input to the PL011 UART so we can compute the current baud rate and trace it. This is intended for developers who wish to use QEMU to e.g. debug their firmware or to figure out the baud rate configured by an unknown/closed source binary. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Luc Michel <luc@lmichel.fr> Tested-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/char')
-rw-r--r--include/hw/char/pl011.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h
index a91ea50e11..33e5e5317b 100644
--- a/include/hw/char/pl011.h
+++ b/include/hw/char/pl011.h
@@ -49,6 +49,7 @@ struct PL011State {
int read_trigger;
CharBackend chr;
qemu_irq irq[6];
+ Clock *clk;
const unsigned char *id;
};