qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] imx_serial: set wake bit when we receive a data byte
Date: Thu, 15 Jun 2023 11:27:36 +0200	[thread overview]
Message-ID: <20230615092736.jsdurv6dvv4mxofk@viti.kaiser.cx> (raw)
In-Reply-To: <239a543f-6d97-eb14-ba4f-284093fccfba@linaro.org>

Hi Philippe,

thanks for reviewing my patch.

Philippe Mathieu-Daudé (philmd@linaro.org) wrote:

> Shouldn't we mask this bit for interruptions now?

yes, we should support interrupts from the wake bit. I'll add your
snippet and send a v2.

Thanks,
Martin

> -- >8 --
> diff --git a/include/hw/char/imx_serial.h b/include/hw/char/imx_serial.h
> index 91c9894ad5..b823f94519 100644
> --- a/include/hw/char/imx_serial.h
> +++ b/include/hw/char/imx_serial.h
> @@ -71,6 +71,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(IMXSerialState, IMX_SERIAL)

>  #define UCR4_DREN       BIT(0)    /* Receive Data Ready interrupt enable */
>  #define UCR4_TCEN       BIT(3)    /* TX complete interrupt enable */
> +#define UCR4_WKEN       BIT(7)    /* WAKE interrupt enable */

>  #define UTS1_TXEMPTY    (1<<6)
>  #define UTS1_RXEMPTY    (1<<5)
> diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c
> index ee1375e26d..c8ec247350 100644
> --- a/hw/char/imx_serial.c
> +++ b/hw/char/imx_serial.c
> @@ -80,7 +80,7 @@ static void imx_update(IMXSerialState *s)
>       * TCEN and TXDC are both bit 3
>       * RDR and DREN are both bit 0
>       */
> -    mask |= s->ucr4 & (UCR4_TCEN | UCR4_DREN);
> +    mask |= s->ucr4 & (UCR4_WKEN | UCR4_TCEN | UCR4_DREN);

>      usr2 = s->usr2 & mask;
> ---


  reply	other threads:[~2023-06-15  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08 15:41 [PATCH] imx_serial: set wake bit when we receive a data byte Martin Kaiser
2023-06-12 13:23 ` Philippe Mathieu-Daudé
2023-06-15  9:27   ` Martin Kaiser [this message]
2023-06-15  9:30 ` [PATCH v2] " Martin Kaiser
2023-06-15 10:25   ` Philippe Mathieu-Daudé
2023-06-15 14:22 ` [PATCH v3] " Martin Kaiser
2023-06-19 10:36   ` Peter Maydell
2023-06-19 13:09     ` Philippe Mathieu-Daudé

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=20230615092736.jsdurv6dvv4mxofk@viti.kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@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).