* [PATCH] i2c: aspeed: do not mask SLAVE_MATCH
@ 2022-06-02 5:48 Klaus Jensen
2022-06-03 5:49 ` Klaus Jensen
0 siblings, 1 reply; 2+ messages in thread
From: Klaus Jensen @ 2022-06-02 5:48 UTC (permalink / raw)
To: linux-kernel
Cc: Brendan Higgins, linux-i2c, openbmc, Wolfram Sang,
linux-arm-kernel, linux-aspeed, Benjamin Herrenschmidt,
Joel Stanley, Klaus Jensen, Andrew Jeffery, Klaus Jensen
From: Klaus Jensen <k.jensen@samsung.com>
When commit f9eb91350bb2 ("i2c: aspeed: added slave support for Aspeed
I2C driver") added slave mode support, the SLAVE_MATCH interrupt bit
(bit 7) was not added to INTR_ALL and so will never be set by the Aspeed
I2C controller.
Fixes: f9eb91350bb2 ("i2c: aspeed: added slave support for Aspeed I2C driver")
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
I am working on slave mode in QEMU and noticed that the device would not
generate the SLAVE_ADDR_RX_MATCH interrupt. This patch fixes it, but I
do not have a spec sheet on the Aspeed, so I am not sure if this is the
intended behavior?
drivers/i2c/busses/i2c-aspeed.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 771e53d3d197..7f432babcd72 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -86,6 +86,7 @@
#define ASPEED_I2CD_INTR_ALL \
(ASPEED_I2CD_INTR_SDA_DL_TIMEOUT | \
ASPEED_I2CD_INTR_BUS_RECOVER_DONE | \
+ ASPEED_I2CD_INTR_SLAVE_MATCH | \
ASPEED_I2CD_INTR_SCL_TIMEOUT | \
ASPEED_I2CD_INTR_ABNORMAL | \
ASPEED_I2CD_INTR_NORMAL_STOP | \
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: aspeed: do not mask SLAVE_MATCH
2022-06-02 5:48 [PATCH] i2c: aspeed: do not mask SLAVE_MATCH Klaus Jensen
@ 2022-06-03 5:49 ` Klaus Jensen
0 siblings, 0 replies; 2+ messages in thread
From: Klaus Jensen @ 2022-06-03 5:49 UTC (permalink / raw)
To: linux-kernel
Cc: Brendan Higgins, linux-i2c, openbmc, Wolfram Sang,
linux-arm-kernel, linux-aspeed, Benjamin Herrenschmidt,
Joel Stanley, Andrew Jeffery, Klaus Jensen
[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]
On Jun 2 07:48, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
>
> When commit f9eb91350bb2 ("i2c: aspeed: added slave support for Aspeed
> I2C driver") added slave mode support, the SLAVE_MATCH interrupt bit
> (bit 7) was not added to INTR_ALL and so will never be set by the Aspeed
> I2C controller.
>
> Fixes: f9eb91350bb2 ("i2c: aspeed: added slave support for Aspeed I2C driver")
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> ---
> I am working on slave mode in QEMU and noticed that the device would not
> generate the SLAVE_ADDR_RX_MATCH interrupt. This patch fixes it, but I
> do not have a spec sheet on the Aspeed, so I am not sure if this is the
> intended behavior?
>
> drivers/i2c/busses/i2c-aspeed.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
> index 771e53d3d197..7f432babcd72 100644
> --- a/drivers/i2c/busses/i2c-aspeed.c
> +++ b/drivers/i2c/busses/i2c-aspeed.c
> @@ -86,6 +86,7 @@
> #define ASPEED_I2CD_INTR_ALL \
> (ASPEED_I2CD_INTR_SDA_DL_TIMEOUT | \
> ASPEED_I2CD_INTR_BUS_RECOVER_DONE | \
> + ASPEED_I2CD_INTR_SLAVE_MATCH | \
> ASPEED_I2CD_INTR_SCL_TIMEOUT | \
> ASPEED_I2CD_INTR_ABNORMAL | \
> ASPEED_I2CD_INTR_NORMAL_STOP | \
> --
> 2.36.1
>
I've been informed that SLAVE_MATCH should always be generated,
regardless of INTR_CTRL, so please ignore this patch.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-03 5:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 5:48 [PATCH] i2c: aspeed: do not mask SLAVE_MATCH Klaus Jensen
2022-06-03 5:49 ` Klaus Jensen
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).