From: Jan Luebbe <jlu@pengutronix.de>
To: qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, Jan Luebbe <jlu@pengutronix.de>,
qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: [PATCH] hw/char/pl011: add support for sending break
Date: Fri, 6 Aug 2021 16:47:00 +0200 [thread overview]
Message-ID: <20210806144700.3751979-1-jlu@pengutronix.de> (raw)
Break events are currently only handled by chardev/char-serial.c, so we
just ignore errors, which results in no behaviour change for other
chardevs.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
hw/char/pl011.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/char/pl011.c b/hw/char/pl011.c
index dc85527a5f92..6e2d7f75095c 100644
--- a/hw/char/pl011.c
+++ b/hw/char/pl011.c
@@ -26,6 +26,7 @@
#include "hw/qdev-properties-system.h"
#include "migration/vmstate.h"
#include "chardev/char-fe.h"
+#include "chardev/char-serial.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "trace.h"
@@ -231,6 +232,11 @@ static void pl011_write(void *opaque, hwaddr offset,
s->read_count = 0;
s->read_pos = 0;
}
+ if ((s->lcr ^ value) & 0x1) {
+ int break_enable = value & 0x1;
+ qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_SET_BREAK,
+ &break_enable);
+ }
s->lcr = value;
pl011_set_read_trigger(s);
break;
--
2.30.2
next reply other threads:[~2021-08-06 14:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 14:47 Jan Luebbe [this message]
2021-08-13 16:28 ` [PATCH] hw/char/pl011: add support for sending break Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210806144700.3751979-1-jlu@pengutronix.de \
--to=jlu@pengutronix.de \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).