[PATCH linux dev-4.10 v2 3/3] fsi: core: Add check for master property no-scan-on-init
Christopher Bostic
cbostic at linux.vnet.ibm.com
Fri Aug 4 13:26:22 AEST 2017
Prior to scanning a master check if the optional property
no-scan-on-init is present. If it is then avoid scanning. This is
necessary in cases where a master scan could interfere with another
FSI master on the same bus.
Signed-off-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
---
v2 - Remove changes in hub and gpio masters and make check for device
tree property in the core itself.
---
drivers/fsi/fsi-core.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
index 9b83f1a..7b06b0d 100644
--- a/drivers/fsi/fsi-core.c
+++ b/drivers/fsi/fsi-core.c
@@ -900,6 +900,7 @@ static ssize_t master_break_store(struct device *dev,
int fsi_master_register(struct fsi_master *master)
{
int rc;
+ struct device_node *np;
if (!master)
return -EINVAL;
@@ -927,7 +928,9 @@ int fsi_master_register(struct fsi_master *master)
return rc;
}
- fsi_master_scan(master);
+ np = dev_of_node(&master->dev);
+ if (!of_property_read_bool(np, "no-scan-on-init"))
+ fsi_master_scan(master);
return 0;
}
--
1.8.2.2
More information about the openbmc
mailing list