diff options
author | Eddie James <eajames@linux.ibm.com> | 2020-06-10 00:39:27 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2020-09-10 05:52:47 +0300 |
commit | 04635a30dd53890fac4e926f91c4ec8619c9227b (patch) | |
tree | a20f60529a37c5f26180f0fe6e3e3dad401eef3e /drivers/fsi/fsi-master-hub.c | |
parent | 3c3c484850bcb4b28f2377e3d641a32c42af949c (diff) | |
download | linux-04635a30dd53890fac4e926f91c4ec8619c9227b.tar.xz |
fsi: master: Add boolean parameter to link_enable function
Add the ability to disable a link with a boolean parameter to the
link_enable function. This is necessary so that the master can disable
links that it isn't using; for example, links to slaves that fail
initialization.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/fsi/fsi-master-hub.c')
-rw-r--r-- | drivers/fsi/fsi-master-hub.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/fsi/fsi-master-hub.c b/drivers/fsi/fsi-master-hub.c index def35cf92571..1d3cf2da6a16 100644 --- a/drivers/fsi/fsi-master-hub.c +++ b/drivers/fsi/fsi-master-hub.c @@ -77,7 +77,8 @@ static int hub_master_break(struct fsi_master *master, int link) return hub_master_write(master, link, 0, addr, &cmd, sizeof(cmd)); } -static int hub_master_link_enable(struct fsi_master *master, int link) +static int hub_master_link_enable(struct fsi_master *master, int link, + bool enable) { struct fsi_master_hub *hub = to_fsi_master_hub(master); int idx, bit; @@ -89,6 +90,10 @@ static int hub_master_link_enable(struct fsi_master *master, int link) reg = cpu_to_be32(0x80000000 >> bit); + if (!enable) + return fsi_device_write(hub->upstream, FSI_MCENP0 + (4 * idx), + ®, 4); + rc = fsi_device_write(hub->upstream, FSI_MSENP0 + (4 * idx), ®, 4); mdelay(FSI_LINK_ENABLE_SETUP_TIME); |