[PATCH linux dev-5.4 1/3] fsi: master: Remove link enable read-back
Eddie James
eajames at linux.ibm.com
Tue Apr 7 05:19:36 AEST 2020
Both the Aspeed and hub masters read back the link enable register
after enabling the link, but this is unnecessary, so remove it.
Signed-off-by: Eddie James <eajames at linux.ibm.com>
---
drivers/fsi/fsi-master-aspeed.c | 11 +----------
drivers/fsi/fsi-master-hub.c | 6 +++---
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c
index fe2da6f90590..0c04656208a6 100644
--- a/drivers/fsi/fsi-master-aspeed.c
+++ b/drivers/fsi/fsi-master-aspeed.c
@@ -306,7 +306,7 @@ static int aspeed_master_link_enable(struct fsi_master *master, int link)
{
struct fsi_master_aspeed *aspeed = to_fsi_master_aspeed(master);
int idx, bit, ret;
- __be32 reg, result;
+ __be32 reg;
idx = link / 32;
bit = link % 32;
@@ -319,15 +319,6 @@ static int aspeed_master_link_enable(struct fsi_master *master, int link)
mdelay(FSI_LINK_ENABLE_SETUP_TIME);
- ret = opb_readl(aspeed, ctrl_base + FSI_MENP0 + (4 * idx), &result);
- if (ret)
- return ret;
-
- if (result != reg) {
- dev_err(aspeed->dev, "%s failed: %08x\n", __func__, result);
- return -EIO;
- }
-
return 0;
}
diff --git a/drivers/fsi/fsi-master-hub.c b/drivers/fsi/fsi-master-hub.c
index def35cf92571..f89c25d68b5a 100644
--- a/drivers/fsi/fsi-master-hub.c
+++ b/drivers/fsi/fsi-master-hub.c
@@ -90,12 +90,12 @@ static int hub_master_link_enable(struct fsi_master *master, int link)
reg = cpu_to_be32(0x80000000 >> bit);
rc = fsi_device_write(hub->upstream, FSI_MSENP0 + (4 * idx), ®, 4);
+ if (rc)
+ return rc;
mdelay(FSI_LINK_ENABLE_SETUP_TIME);
- fsi_device_read(hub->upstream, FSI_MENP0 + (4 * idx), ®, 4);
-
- return rc;
+ return 0;
}
static void hub_master_release(struct device *dev)
--
2.24.0
More information about the openbmc
mailing list