From a1d5ce111aa2f8b9d5d4db3ed85b11e53251d676 Mon Sep 17 00:00:00 2001 From: Eddie James Date: Mon, 6 Apr 2020 14:19:36 -0500 Subject: [PATCH] fsi: master: Remove link enable read-back 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 Signed-off-by: Joel Stanley --- 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 6152cfe6d18e..2b8ca72baeb5 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; @@ -323,15 +323,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 1d3cf2da6a16..3caa2da7838c 100644 --- a/drivers/fsi/fsi-master-hub.c +++ b/drivers/fsi/fsi-master-hub.c @@ -95,12 +95,12 @@ static int hub_master_link_enable(struct fsi_master *master, int link, ®, 4); 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)