Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1933361lqa; Tue, 30 Apr 2024 03:55:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXlaEECQMaUfh93FFOvi+cHC8awy4XeCjzJhpFOIvDDQjoH+iSZazvCvuNlsItx7eMfLTrN0kMyAbdS08gL2DS3H9z5ZScHd5v4n+IZA== X-Google-Smtp-Source: AGHT+IEKNhe04QAG/n2mh/hyRbY73dPCNi88s4xOuMu5bDJoajeI09InPG5ZSAhK+NG7ZjlzWYX+ X-Received: by 2002:a17:90b:2389:b0:2a0:2fb3:c1ff with SMTP id mr9-20020a17090b238900b002a02fb3c1ffmr12369901pjb.15.1714474551737; Tue, 30 Apr 2024 03:55:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714474551; cv=pass; d=google.com; s=arc-20160816; b=vSCsax48xxiZtJVOl9NiKlilFguzb/zsF8V2J7M+je7GDy6N+vEDXujV4kK6n5nd5b WIGgGAoy67yKfACoNCp+QfK9HB8difxuErMr+zaAfAJyCPP1ytljhWuPiuR9jkcuBHXl 6SE6togh+SDw5zZKIYiZTijzFlLobXb+sp2TjxL6EEMIb42w/U/PhJAlWVuqnt1p0o6K YeA3YHEXrwHkx5jCXmAHxQIcAFvp1bnNtl34gUC47qxWozzT6MGzrKmekm9Vews4kcld dIHEmg80wAMLcMnl0GVE9kT5krI4zFnk35ljrL6eHfXV1pXs2Khpt730ipwOHMG/hoeH 6kCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=/S2o4fuM/8KSLXddRuXzzl3ArTQb6LjGDSIjynvSBeE=; fh=epinPfLfQ0hGyNd7Cj1Zem5kDPAg4Y3HQWsqHeWqiDI=; b=XIRf3UDl44aVJjD4/5pRwdy1sFeLmfhJTRTW9wwR/km2hdyUazpBWoxVsmsLU13rW2 GgBd9AX+nNYMt/TJxauklvYcn9SMYvkev4aQVt6PHkWtuj5SIKZS9j8LDRBGcWTuAfQT Ue1cV8jgb7J0k4pvPZNXQNuRiuOxpqxoUTJl2Nw0WXnh0nlTVEF/SL4/GKSeP7YjJ+7v 48mZHGoviPn4UObD8/5D8iDKpB/SilUF80GS29duGQTucqjSyk3mq++RVWEtBqYUcqVm kbe8ach5kxPReVVZDNTKm7Zu4LniE0VD0kUL5y5AbPen5WZnZj/X+EZbo/ZPRLycigsG 18/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=tzWSFHll; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-163803-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163803-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p15-20020a17090ad30f00b002aba8352544si21952719pju.5.2024.04.30.03.55.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 03:55:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163803-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=tzWSFHll; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-163803-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163803-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6193F2860F5 for ; Tue, 30 Apr 2024 10:54:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A06912C554; Tue, 30 Apr 2024 10:53:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="tzWSFHll" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E91E612C490; Tue, 30 Apr 2024 10:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714474396; cv=none; b=ivLotGuJqlP3CMB2VKmJ5ZEUfuw/Y4HtoByLhnZvW3kiP4sA7uHHsxGK+NIPuK+X7gecIay0x/9gmaFVf/gGUk39QTyQKNlozQHfGezuxKNQpnlWzuaPQOSO84zHbL1qx4kdsdui7WkqCt3St4EJGFlttnRduuH2OXEmgFNYulo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714474396; c=relaxed/simple; bh=RWRXpLCKdKSQs2XuJN03r9hEXbuXWjMhl2cAlMgAKaM=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=XtQnurGgEZBZAecsX7ZAXo5JcdnMTK19fl2YtQJl+9JSEsPABfKBfYevzJvy1dOokCxCtAjxqrFa7rChwwjqX3eocdCO9NSIhcNi0BUNCZPfRgtsRauUd4HtTIBBfYQa7Dzj2UPAp063U+7OESu18u11L6VL0hhwI9GfHhoGL8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=tzWSFHll; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43UArCWV130406; Tue, 30 Apr 2024 05:53:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1714474392; bh=/S2o4fuM/8KSLXddRuXzzl3ArTQb6LjGDSIjynvSBeE=; h=From:To:CC:Subject:Date; b=tzWSFHll6BhIJfv4TEZK5d0zamDSqyPUKJkqcjJ7epNkQuJlOv37VK3QJjb1Qfb7y xlfK61KdjzJPzmKS5OrL0x249Zy29Ww7rexEHE64nPzy4aPIfV4pjmgCnhjyWnUxRl U2pllCVYx0fkzSrskT4zqlBxC/lzMFbmDVvas3TY= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43UArCKx004449 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Apr 2024 05:53:12 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 30 Apr 2024 05:53:11 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 30 Apr 2024 05:53:11 -0500 Received: from uda0510294.dhcp.ti.com (uda0510294.dhcp.ti.com [10.24.69.66]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43UAr8Dp038508; Tue, 30 Apr 2024 05:53:09 -0500 From: Beleswar Padhi To: CC: , , , , , , , Subject: [PATCH v3 0/2] remoteproc: k3-r5: Wait for core0 power-up before powering up core1 Date: Tue, 30 Apr 2024 16:23:05 +0530 Message-ID: <20240430105307.1190615-1-b-padhi@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 PSC controller has a limitation that it can only power-up the second core when the first core is in ON state. Power-state for core0 should be equal to or higher than core1, else the kernel is seen hanging during rproc loading. Make the powering up of cores sequential, by waiting for the current core to power-up before proceeding to the next core, with a timeout of 2sec. Add a wait queue event in k3_r5_cluster_rproc_init call, that will wait for the current core to be released from reset before proceeding with the next core. Also, ensure that core1 can not be powered on before core0 when starting cores from sysfs. Similarly, ensure that core0 can not be shutdown before core1 from sysfs. v3: Changelog: 1) Added my own Signed-off-by in PATCH 1, specifying the changes done 2) Addressed changes requested by adding comments in code in PATCH 1 Link to v2: https://lore.kernel.org/all/20240424130504.494916-1-b-padhi@ti.com/ v2: Changelog: 1) Fixed multi-line comment format 2) Included root cause of bug in comments 3) Added a patch to ensure power-up/shutdown is sequential via sysfs Link to v1: https://lore.kernel.org/all/20230906124756.3480579-1-a-nandan@ti.com/ Apurva Nandan (1): remoteproc: k3-r5: Wait for core0 power-up before powering up core1 Beleswar Padhi (1): remoteproc: k3-r5: Do not allow core1 to power up before core0 via sysfs drivers/remoteproc/ti_k3_r5_remoteproc.c | 56 +++++++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) -- 2.34.1