[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240516181907.3468796-14-eajames@linux.ibm.com>
Date: Thu, 16 May 2024 13:18:40 -0500
From: Eddie James <eajames@...ux.ibm.com>
To: linux-fsi@...ts.ozlabs.org
Cc: linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-spi@...r.kernel.org, broonie@...nel.org, andi.shyti@...nel.org,
joel@....id.au, alistair@...ple.id.au, jk@...abs.org,
andrew@...econstruct.com.au, linux-aspeed@...ts.ozlabs.org,
eajames@...ux.ibm.com
Subject: [PATCH v3 13/40] fsi: core: Disable relative addressing during scan
Relative addressing is not allowed during slave ID initialization, so
turn it off during the FSI scan procedure.
Signed-off-by: Eddie James <eajames@...ux.ibm.com>
---
drivers/fsi/fsi-core.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
index bfb147de90efc..8b402149acbe9 100644
--- a/drivers/fsi/fsi-core.c
+++ b/drivers/fsi/fsi-core.c
@@ -1223,8 +1223,20 @@ static int fsi_master_break(struct fsi_master *master, int link)
static int fsi_master_scan(struct fsi_master *master)
{
+ bool set_mmode = false;
int link, rc;
+ /* relative addressing is not allowed during slave ID initialization */
+ if (master->map && (master->flags & FSI_MASTER_FLAG_RELA)) {
+ u32 mmode = master->mmode & ~FSI_MMODE_RELA;
+
+ rc = regmap_write(master->map, FSI_MMODE, mmode);
+ if (rc)
+ return rc;
+
+ set_mmode = true;
+ }
+
trace_fsi_master_scan(master, true);
for (link = 0; link < master->n_links; link++) {
rc = _fsi_master_link_enable(master, link);
@@ -1246,6 +1258,12 @@ static int fsi_master_scan(struct fsi_master *master)
fsi_master_link_disable(master, link);
}
+ if (set_mmode) {
+ rc = regmap_write(master->map, FSI_MMODE, master->mmode);
+ if (rc)
+ return rc;
+ }
+
return 0;
}
--
2.39.3
Powered by blists - more mailing lists