From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xNsm93W0szDqJ7 for ; Fri, 4 Aug 2017 13:26:49 +1000 (AEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v743O2hd047572 for ; Thu, 3 Aug 2017 23:26:47 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0a-001b2d01.pphosted.com with ESMTP id 2c4ckg28tw-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 03 Aug 2017 23:26:46 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 Aug 2017 23:26:46 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 3 Aug 2017 23:26:44 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v743QhPZ26542278; Fri, 4 Aug 2017 03:26:43 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1C2AAC03F; Thu, 3 Aug 2017 23:26:58 -0400 (EDT) Received: from Christophers-MacBook-Pro.local.com (unknown [9.83.5.232]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 46787AC040; Thu, 3 Aug 2017 23:26:55 -0400 (EDT) From: Christopher Bostic To: joel@jms.id.au, jk@ozlabs.org Cc: Christopher Bostic , openbmc@lists.ozlabs.org Subject: [PATCH linux dev-4.10 v2 3/3] fsi: core: Add check for master property no-scan-on-init Date: Thu, 3 Aug 2017 22:26:22 -0500 X-Mailer: git-send-email 2.10.1 (Apple Git-78) In-Reply-To: <20170804032622.88674-1-cbostic@linux.vnet.ibm.com> References: <20170804032622.88674-1-cbostic@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17080403-0044-0000-0000-000003781A8C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007480; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000216; SDB=6.00897252; UDB=6.00448933; IPR=6.00677436; BA=6.00005509; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016525; XFM=3.00000015; UTC=2017-08-04 03:26:45 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17080403-0045-0000-0000-000007A62D71 Message-Id: <20170804032622.88674-4-cbostic@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-04_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1708040050 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 03:26:50 -0000 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 --- 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