From: Klaus Jensen <its@irrelevant.dk>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>,
qemu-devel@nongnu.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
qemu-arm@nongnu.org, Peter Delevoryas <pdel@fb.com>,
Peter Maydell <peter.maydell@linaro.org>,
Corey Minyard <cminyard@mvista.com>,
Padmakar Kalghatgi <p.kalghatgi@samsung.com>,
Damien Hedde <damien.hedde@greensocs.com>,
Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>,
Arun Kumar Kashinath Agasar <arun.kka@samsung.com>,
Klaus Jensen <k.jensen@samsung.com>,
Zev Weiss <zev@bewilderbeest.net>
Subject: Re: [RFC PATCH v2 0/6] hw/i2c: i2c slave mode support
Date: Thu, 2 Jun 2022 21:19:57 +0200 [thread overview]
Message-ID: <YpkNXUkafYQ3ZSpT@apples> (raw)
In-Reply-To: <c796202d-2e57-32b3-3007-343d37dcdb84@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]
On Jun 2 17:40, Cédric Le Goater wrote:
> On 6/2/22 16:29, Jae Hyun Yoo wrote:
> > Hi Klaus,
> >
> > On 6/2/2022 6:50 AM, Cédric Le Goater wrote:
> > > On 6/2/22 10:21, Klaus Jensen wrote:
> > > >
> > > > There is an outstanding issue with the SLAVE_ADDR_RX_MATCH interrupt bit
> > > > (bit 7). Remember from my first series I had a workaround to make sure
> > > > it wasnt masked.
> > > >
> > > > I posted this upstream to linux
> > > >
> > > > https://lore.kernel.org/lkml/20220602054842.122271-1-its@irrelevant.dk/
> > > >
> > > > Not sure if that is the right way to fix it.
> > >
> > > That's weird. I would have thought it was already enabled [ Adding Jae ]
> >
> > Slave mode support in Aspeed I2C driver is already enabled and it has
> > worked well so far. The fix Klaus made in the link is incorrect.
> >
> > https://lore.kernel.org/lkml/20220602054842.122271-1-its@irrelevant.dk/
> >
> > The patch is adding ASPEED_I2CD_INTR_SLAVE_MATCH as a mask bit for
> > I2CD0C (Interrupt Control Register) but actually this bit is part of
> > I2CD10 (Interrupt Status Register). Means that the slave match interrupt
> > can be enabled without enabling any mask bit in I2CD0C.
>
> Thanks Jae.
>
> So we should enable this interrupt always independently of the
> Interrupt Control Register value.
>
> I would simply extend the mask value (bus->regs[intr_ctrl_reg])
> with the SLAVE_ADDR_RX_MATCH bit when interrupts are raised in
> aspeed_i2c_bus_raise_interrupt().
>
Alright, so my "workaround" from v1 was actually the right fix - I'll
re-add it ;)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-06-02 19:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 21:08 [RFC PATCH v2 0/6] hw/i2c: i2c slave mode support Klaus Jensen
2022-06-01 21:08 ` [RFC PATCH v2 1/6] hw/i2c/aspeed: rework raise interrupt trace event Klaus Jensen
2022-06-02 6:49 ` Cédric Le Goater
2022-06-02 6:52 ` Klaus Jensen
2022-06-01 21:08 ` [RFC PATCH v2 2/6] hw/i2c/aspeed: add DEV_ADDR in old register mode Klaus Jensen
2022-06-02 7:30 ` Cédric Le Goater
2022-06-02 7:34 ` Klaus Jensen
2022-06-01 21:08 ` [RFC PATCH v2 3/6] hw/i2c: support multiple masters Klaus Jensen
2022-06-01 22:00 ` Corey Minyard
2022-06-01 21:08 ` [RFC PATCH v2 4/6] hw/i2c: add asynchronous send Klaus Jensen
2022-06-01 22:05 ` Corey Minyard
2022-06-02 7:32 ` Cédric Le Goater
2022-06-02 7:35 ` Klaus Jensen
2022-06-01 21:08 ` [RFC PATCH v2 5/6] hw/i2c/aspeed: add slave device in old register mode Klaus Jensen
2022-06-01 21:08 ` [RFC PATCH v2 6/6] hw/misc: add a toy i2c echo device [DO NOT PULL] Klaus Jensen
2022-06-02 7:37 ` Cédric Le Goater
2022-06-02 7:52 ` [RFC PATCH v2 0/6] hw/i2c: i2c slave mode support Cédric Le Goater
2022-06-02 8:21 ` Klaus Jensen
2022-06-02 13:50 ` Cédric Le Goater
2022-06-02 14:29 ` Jae Hyun Yoo
2022-06-02 15:40 ` Cédric Le Goater
2022-06-02 19:19 ` Klaus Jensen [this message]
2022-06-03 5:31 ` Cédric Le Goater
2022-06-03 7:07 ` Cédric Le Goater
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=YpkNXUkafYQ3ZSpT@apples \
--to=its@irrelevant.dk \
--cc=Jonathan.Cameron@huawei.com \
--cc=andrew@aj.id.au \
--cc=arun.kka@samsung.com \
--cc=clg@kaod.org \
--cc=cminyard@mvista.com \
--cc=damien.hedde@greensocs.com \
--cc=joel@jms.id.au \
--cc=k.jensen@samsung.com \
--cc=p.kalghatgi@samsung.com \
--cc=pdel@fb.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quic_jaehyoo@quicinc.com \
--cc=zev@bewilderbeest.net \
/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).