Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967151AbdCXTcw (ORCPT ); Fri, 24 Mar 2017 15:32:52 -0400 Received: from mail-by2nam01on0055.outbound.protection.outlook.com ([104.47.34.55]:58720 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967062AbdCXTaG (ORCPT ); Fri, 24 Mar 2017 15:30:06 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Wendy Liang To: CC: , , "Wendy Liang" , Wendy Liang , Michal Simek Subject: [RFC LINUX PATCH 04/19] remoteproc: sysfs: Add running independent state Date: Fri, 24 Mar 2017 12:22:20 -0700 Message-ID: <1490383355-23176-5-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1490383355-23176-1-git-send-email-jliang@xilinx.com> References: <1490383355-23176-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-22962.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(39450400003)(39860400002)(39410400002)(39850400002)(39840400002)(2980300002)(438002)(199003)(189002)(9170700003)(356003)(305945005)(50986999)(5003940100001)(110136004)(4326008)(2906002)(38730400002)(76176999)(47776003)(9786002)(50226002)(48376002)(8936002)(50466002)(107886003)(6916009)(2950100002)(81166006)(33646002)(2351001)(189998001)(106466001)(36386004)(36756003)(54906002)(8676002)(5660300001)(77096006)(6666003)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0201MB0712;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT028;1:38Y/JBW4glT+cOmXdp+m66KWAPKhrItYnqvLCcRNRiHa0EEuhoS4QTFwtirCHjIOPsKIiDmOWywJlp+vYDFYSdXqV2qM6CpiDui1E5sBT9g73saHWqGZFUt/7RSf+EILJ6/zrDjTBlAnmQNnmw5uVB/Xl+FN75I3F3jnT0ipYYcZ5RW8orNnO9aOGE3KG7v1GN4EroajPgbtDgAbLfPToN4TvW4CwziQg3kp+skVMj6KY0Pfp/AXuUsOq3JP6soSN5bn7jY/oGGPSFn709BrDKXEOOpJ8UbU80YOAh915rYh1BwkSL+nhG82g0DGe/Y4Inxbuwg4+hh/ZOM86vjFN1hml4n3DgC1VqRBXCUFllSn5tWfNJY8GAEFAvn8IXhZN4PV6WcPcRZ8n3YekaXF8LTnqyR+CHuC63qBcw8w1UVSFqzeRfq7SFSgbxdubrlF4lZL5ASCh0rZhY51OjFk8XeNNP4HSAoRM+JHX5T6bTESbzbzMGuXwyD4v0IOPEdDyhJIgUXdLqY41NP23lXgY6PDhGxSzinRR4+uaXvctjblYszfWpZ2NLdq1WtSNZRpxEyx2vexrpmeAajC+vxxLA== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 454f1030-0def-480c-a494-08d472ec2248 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002)(2017030254075);SRVR:BY2PR0201MB0712; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0712;3:hQYtd6fgP1C5gshPj4N2RVciZKvE+QpyU87EI5FJ7DU0clpgWcJB10c/o/HzgZz0PIOJVwRtrggubvkJ7xUfbpPe3QGpdSa2iO+K1X0vg8Sqs7dvo0NQrRE7skNmNMXYczhrwhjmeGCTLEEDZrp5KsBQwG1/fCsyL3aAFhiaXuZ3QjrHrzuK5Gjh7/VmptiYryLunBZBRf4k5ljJRgw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rhTTnXu+YMTWMn0s+xcHNKYCC1kb9ff48SL/7UA2NBF5JeXtWyAhT8zmMWQl+pLmB4QSUgw6SGmZAT1tq1B6U2I9w1IvJUJlpYG20NEhZDo/5rv61NEMrbKw+0Pq7SYEV/6oFQlUynyH0kAz+3Gpix5j1h7yB60HXJ6P+Rim+dq7wTWKr44aYLCjHJ2AzsM9rRfNP8EfdnqsfnXwDP5uj2CEwnmrdAJy/Xb/dm/YhgOI9IS5mRDnmeSYpj4FFbdqYF3dByWbSTHquXqZdipE1RhlhmK2ZoDHdAny91WuhZIfESFjCKhJ+vipbEWkOprCVeQQfWMMoDr66XKNx9wCHHMIAKyzzOAzRbAlgqTLy4PkvFFgMa/NoSF/OF1zyH7BPdBCLlL+utgBDbUU1a6iO27cvzvlh7PdLNXnLducWOS97K7R3vgDeC3ndcf9Kzlg8rQ8psMwT14tTILC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(13017025)(8121501046)(13023025)(13024025)(5005006)(13015025)(13018025)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123558025)(20161123555025)(20161123564025)(20161123560025)(6072148);SRVR:BY2PR0201MB0712;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB0712; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0712;4:08GDj4bOrFxVY/6MfrUs81SJBDe+N6WKx2CkDEDIHbU1vbvJKfuB7FslcF1kzHBGt8lTRUPnPkYpDvq+2nfIbHNOvmYPlct+WV1ya9Qrd5Q0nUP41lcRVrzBDrigTYcYXsyz693ddnHDjZNg137fg7f+RNfbnbIBa1bAjD+BZxK7OqlnA0Zdss2pPncIQSoZLf9idoDqMqGJIAgIRsvZx9E07YXRCw8Tmc/hqrPbaodzoIB/+3rlFvA6QOePTlLt5W1oaABJGlQPChSx6wPrUv1jBpm1SCQCd4K0+70Z4SwwNY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dk+C3hCn2BEXgq7Ulh9x0TUw/8MjagZTj4tJhaohA4KZYRHXU4nqCmvhAVdyiSFOIWu4XaDTndPIMGOHyH0gm6z+T9SHgY8hz/tOdd2+PHcp5gz80nfaLZw0bkqJCSEuZ7ZKMEowqCAwkFffKEPWnRVCu4P1ECiQ5r5I+HDvepcm1BwHP2uBsBrGMmzwnzxT+kLLi1schfaW5Q=;5:nUaAiAUhy6AAwPIdLewwhNzbakfnFOxTakr1dQmK5RDSj62Pqn6BaV8RbfUoBHPrz+sEW+XT4UiTtucHvBr2qy2p9JoudLj/imhWqkoh8tOTl9DImsbRDBXHBVeSmf2UkJfary12R1FPDKho7gIAnQ==;24:5g872w7uPG/DWLHyYcL2L8EdTN2acxFOZsBERvkzFGi6wAhrNaIcFW6ifwd7VBUTDRRvQverknZ2IDmplkmvXRU4RfCU5uSJ6uriqM//Jwc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0712;7:8AfHAQG2LzliVCCSBGjJ3L3S0d0zVGnumZVWae1QPC745OPMNr+h6jM47OxGITNHO5QQbRavq3qtll1VyOYydAFowo9WnDY2Y28AMTX0Vc6k4w1tvi7sXMrD4pb0De/Hlitw/47LtP14qHnVOJnan51u6yijR86CW/qzby5TdRtTK6FS6H//w2/79njf5mpPaCnuh/VD/un6fqFyUBQbzDFDhmbuf1Q4TF6w/hbtjKhvbWORcJl2/tq+V5Va/Y9OFfZScX7VyEM3BYgdhMRuPTU3GMBYpr/vPt4uu/5V2dMd/SIY/+qQUtqHV4ngRiqUkLLvad1IKsxVZjROUUspGQ== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 19:29:47.6616 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB0712 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1402 Lines: 44 From: Wendy Liang Show running independent state to indicate the remote runs and it is not started by the remoteproc driver. Signed-off-by: Wendy Liang Signed-off-by: Michal Simek --- drivers/remoteproc/remoteproc_sysfs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index 47be411..616057d 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -74,6 +74,7 @@ static ssize_t firmware_store(struct device *dev, [RPROC_RUNNING] = "running", [RPROC_CRASHED] = "crashed", [RPROC_DELETED] = "deleted", + [RPROC_RUNNING_INDEPENDENT] = "running_independent", [RPROC_LAST] = "invalid", }; @@ -97,14 +98,16 @@ static ssize_t state_store(struct device *dev, int ret = 0; if (sysfs_streq(buf, "start")) { - if (rproc->state == RPROC_RUNNING) + if (rproc->state == RPROC_RUNNING || + rproc->state == RPROC_RUNNING_INDEPENDENT) return -EBUSY; ret = rproc_boot(rproc); if (ret) dev_err(&rproc->dev, "Boot failed: %d\n", ret); } else if (sysfs_streq(buf, "stop")) { - if (rproc->state != RPROC_RUNNING) + if (rproc->state != RPROC_RUNNING && + rproc->state != RPROC_RUNNING_INDEPENDENT) return -EINVAL; rproc_shutdown(rproc); -- 1.9.1