qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qianfanguijin@163.com
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	 Strahinja Jankovic <strahinja.p.jankovic@gmail.com>,
	Beniamino Galvani <b.galvani@gmail.com>
Subject: Re: [PATCH v2 2/3] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs
Date: Mon, 6 Mar 2023 13:23:51 +0000	[thread overview]
Message-ID: <CAFEAcA9DErs9iSDYfg58PctRqxjj41ud4pwG21Ar2eahj2O_6g@mail.gmail.com> (raw)
In-Reply-To: <20230220081252.25348-2-qianfanguijin@163.com>

On Mon, 20 Feb 2023 at 08:13, <qianfanguijin@163.com> wrote:
>
> From: qianfan Zhao <qianfanguijin@163.com>
>
> TWI_CNTR_INT_FLAG is W1C(write 1 to clear and write 0 has non-effect)
> register on SUN6i based SoCs, we should lower interrupt when the guest
> set this bit.
>
> The linux kernel will hang in irq handler(mv64xxx_i2c_intr) if no
> device connected on the i2c bus, next is the trace log:
>
> allwinner_i2c_write write   CNTR(0x0c): 0xc4 A_ACK BUS_EN INT_EN
> allwinner_i2c_write write   CNTR(0x0c): 0xcc A_ACK INT_FLAG BUS_EN INT_EN
> allwinner_i2c_read  read    CNTR(0x0c): 0xcc A_ACK INT_FLAG BUS_EN INT_EN
> allwinner_i2c_read  read    STAT(0x10): 0x20 STAT_M_ADDR_WR_NACK
> allwinner_i2c_write write   CNTR(0x0c): 0x54 A_ACK M_STP BUS_EN
> allwinner_i2c_write write   CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
> allwinner_i2c_read  read    CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
> allwinner_i2c_read  read    STAT(0x10): 0xf8 STAT_IDLE
> allwinner_i2c_write write   CNTR(0x0c): 0x54 A_ACK M_STP BUS_EN
> allwinner_i2c_write write   CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
> allwinner_i2c_read  read    CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
> allwinner_i2c_read  read    STAT(0x10): 0xf8 STAT_IDLE
> ...
>
> Fix it.
>
> Signed-off-by: qianfan Zhao <qianfanguijin@163.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


  parent reply	other threads:[~2023-03-06 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20  8:12 [PATCH v2 1/3] hw: allwinner-i2c: Make the trace message more readable qianfanguijin
2023-02-20  8:12 ` [PATCH v2 2/3] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs qianfanguijin
2023-02-21 20:53   ` Strahinja Jankovic
2023-03-06 13:23   ` Peter Maydell [this message]
2023-02-20  8:12 ` [PATCH v2 3/3] hw: arm: allwinner-h3: Fix and complete H3 i2c devices qianfanguijin
2023-02-21 21:08   ` Strahinja Jankovic
2023-03-06 13:24   ` Peter Maydell
2023-03-06 13:23 ` [PATCH v2 1/3] hw: allwinner-i2c: Make the trace message more readable Peter Maydell
2023-03-06 14:07   ` 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=CAFEAcA9DErs9iSDYfg58PctRqxjj41ud4pwG21Ar2eahj2O_6g@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=b.galvani@gmail.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qianfanguijin@163.com \
    --cc=strahinja.p.jankovic@gmail.com \
    /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).