public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error
@ 2023-09-13  3:17 Joshua Yeong
  2023-09-13  3:17 ` [PATCH v2 1/1] i3c: master: cdns: Fix reading status register Joshua Yeong
  2023-09-25 21:36 ` [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error Alexandre Belloni
  0 siblings, 2 replies; 4+ messages in thread
From: Joshua Yeong @ 2023-09-13  3:17 UTC (permalink / raw)
  To: pgaj, miquel.raynal
  Cc: alexandre.belloni, linux-i3c, linux-kernel, stable, Joshua Yeong

I3C ibirfifodepth and cmdrfifodepth field should read from status0 instead of
status1. Update I3C slave macro.

Joshua Yeong (1):
  i3c: master: cdns: Fix reading status register

 drivers/i3c/master/i3c-master-cdns.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--
2.25.1


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/1] i3c: master: cdns: Fix reading status register
  2023-09-13  3:17 [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error Joshua Yeong
@ 2023-09-13  3:17 ` Joshua Yeong
  2023-09-13  6:43   ` Miquel Raynal
  2023-09-25 21:36 ` [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error Alexandre Belloni
  1 sibling, 1 reply; 4+ messages in thread
From: Joshua Yeong @ 2023-09-13  3:17 UTC (permalink / raw)
  To: pgaj, miquel.raynal
  Cc: alexandre.belloni, linux-i3c, linux-kernel, stable, Joshua Yeong

IBIR_DEPTH and CMDR_DEPTH should read from status0 instead of status1.

Cc: stable@vger.kernel.org
Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP")
Signed-off-by: Joshua Yeong <joshua.yeong@starfivetech.com>
---
 drivers/i3c/master/i3c-master-cdns.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c
index 49551db71bc9..8f1fda3c7ac5 100644
--- a/drivers/i3c/master/i3c-master-cdns.c
+++ b/drivers/i3c/master/i3c-master-cdns.c
@@ -191,7 +191,7 @@
 #define SLV_STATUS1_HJ_DIS		BIT(18)
 #define SLV_STATUS1_MR_DIS		BIT(17)
 #define SLV_STATUS1_PROT_ERR		BIT(16)
-#define SLV_STATUS1_DA(x)		(((s) & GENMASK(15, 9)) >> 9)
+#define SLV_STATUS1_DA(s)		(((s) & GENMASK(15, 9)) >> 9)
 #define SLV_STATUS1_HAS_DA		BIT(8)
 #define SLV_STATUS1_DDR_RX_FULL		BIT(7)
 #define SLV_STATUS1_DDR_TX_FULL		BIT(6)
@@ -1623,13 +1623,13 @@ static int cdns_i3c_master_probe(struct platform_device *pdev)
 	/* Device ID0 is reserved to describe this master. */
 	master->maxdevs = CONF_STATUS0_DEVS_NUM(val);
 	master->free_rr_slots = GENMASK(master->maxdevs, 1);
+	master->caps.ibirfifodepth = CONF_STATUS0_IBIR_DEPTH(val);
+	master->caps.cmdrfifodepth = CONF_STATUS0_CMDR_DEPTH(val);

 	val = readl(master->regs + CONF_STATUS1);
 	master->caps.cmdfifodepth = CONF_STATUS1_CMD_DEPTH(val);
 	master->caps.rxfifodepth = CONF_STATUS1_RX_DEPTH(val);
 	master->caps.txfifodepth = CONF_STATUS1_TX_DEPTH(val);
-	master->caps.ibirfifodepth = CONF_STATUS0_IBIR_DEPTH(val);
-	master->caps.cmdrfifodepth = CONF_STATUS0_CMDR_DEPTH(val);

 	spin_lock_init(&master->ibi.lock);
 	master->ibi.num_slots = CONF_STATUS1_IBI_HW_RES(val);
--
2.25.1


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] i3c: master: cdns: Fix reading status register
  2023-09-13  3:17 ` [PATCH v2 1/1] i3c: master: cdns: Fix reading status register Joshua Yeong
@ 2023-09-13  6:43   ` Miquel Raynal
  0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2023-09-13  6:43 UTC (permalink / raw)
  To: Joshua Yeong; +Cc: pgaj, alexandre.belloni, linux-i3c, linux-kernel, stable

Hi Joshua,

joshua.yeong@starfivetech.com wrote on Wed, 13 Sep 2023 11:17:45 +0800:

> IBIR_DEPTH and CMDR_DEPTH should read from status0 instead of status1.
> 
> Cc: stable@vger.kernel.org
> Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP")
> Signed-off-by: Joshua Yeong <joshua.yeong@starfivetech.com>

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

Thanks,
Miquèl

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error
  2023-09-13  3:17 [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error Joshua Yeong
  2023-09-13  3:17 ` [PATCH v2 1/1] i3c: master: cdns: Fix reading status register Joshua Yeong
@ 2023-09-25 21:36 ` Alexandre Belloni
  1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2023-09-25 21:36 UTC (permalink / raw)
  To: pgaj, miquel.raynal, Joshua Yeong; +Cc: linux-i3c, linux-kernel, stable


On Wed, 13 Sep 2023 11:17:43 +0800, Joshua Yeong wrote:
> I3C ibirfifodepth and cmdrfifodepth field should read from status0 instead of
> status1. Update I3C slave macro.
> 
> Joshua Yeong (1):
>   i3c: master: cdns: Fix reading status register
> 
>  drivers/i3c/master/i3c-master-cdns.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> [...]

Applied, thanks!

[1/1] i3c: master: cdns: Fix reading status register
      commit: 4bd8405257da717cd556f99e5fb68693d12c9766

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-25 21:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13  3:17 [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error Joshua Yeong
2023-09-13  3:17 ` [PATCH v2 1/1] i3c: master: cdns: Fix reading status register Joshua Yeong
2023-09-13  6:43   ` Miquel Raynal
2023-09-25 21:36 ` [PATCH v2 0/1] Cadence I3C Status Register Bit Mask Error Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox