Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp399735lqd; Wed, 24 Apr 2024 06:05:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzlw20KbzB9qnuAk1xwPDm8Pre1jVLNUFYnvMuh0n2oO46FENx0Pka0x2KF8i8irQgB72M09xA08a7dMdpuzVPvqrMlcq9TocW1II7iw== X-Google-Smtp-Source: AGHT+IFVee4eXtIxAOwXOjl7BdmBTI4cXAXplOKHS+qeg7HCYRfQ0+ex0U92XL3MbwWK+roXnJ7k X-Received: by 2002:a25:910c:0:b0:dcc:dbb8:ba73 with SMTP id v12-20020a25910c000000b00dccdbb8ba73mr2636342ybl.9.1713963927204; Wed, 24 Apr 2024 06:05:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713963927; cv=pass; d=google.com; s=arc-20160816; b=F88orW0JLOrlaEZCYqOS5ujYfPofWq6fXERCBl4+1HefjhH+NRIZ3pG67dbALjbYsk ZUI619CtDkm1GfQ8dBeKYVObldN0gYKD8sNvW9bCCDcWRC/H0Mt1hxmtGYJqaqr//gDJ AQ4qffJBpn/QvOCrzT+ig4GOX85CLyCVd74/TVlsq9FVk/lR5paVctkvyYiM0Qgye9rj BM3FEH4AnC/Ich6QVkav67L5xeuq80sUzJd87TWQwjey3XovDQVDzL7n8vYQiK03JNs0 28IOKvpyOfuoYuC84/oXAx0GjLQCx/D2lX2hAjO+23ga/hMYNZgfvx/+Sb/55Rhr4ico a98w== 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=n6Gm8aFsB7jXyyx0SKj7OlRHLpLiF56JlQ+Nni+T9QQ=; fh=epinPfLfQ0hGyNd7Cj1Zem5kDPAg4Y3HQWsqHeWqiDI=; b=P/RVrwVNb4qiz/i96rZowkxSruPjkr6XamhdbPtsuCs8IPoJFCW7Dv0Yjhq8iD3wh4 /bmho2OMVkxkeuquymgWTvXcMAvj/K6zMaY7vZUCWd4+UZza9bfb5Tnt0GSknDq8K2rf Z9/kTVAXuMe+oPpol10gL/leAK9feSS9il1R3TY8r2YBDykzffVsoaOmWVC98/eyyz0H WuFSbl+ht1GkRwpC5kynPPcDVIaeH8dqx5Y7YtzzS7bqgJbOcefFTyypazjwlHWMB3Nu oBJ0L/0eL/HQpQOS3XmHWC70BKyxJ8c0qKS8VxGHWe3c+ol06yU2dAgmWLw/0RKPCLOh Ur0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Mr6bsXSG; 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-156921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t7-20020a252d07000000b00dccc3c3dfc1si7783553ybt.137.2024.04.24.06.05.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 06:05:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Mr6bsXSG; 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-156921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156921-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DD0051C2379A for ; Wed, 24 Apr 2024 13:05:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F92E15B153; Wed, 24 Apr 2024 13:05:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Mr6bsXSG" 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 27CC815ADA5; Wed, 24 Apr 2024 13:05: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=1713963916; cv=none; b=Fc1+n3HF+Q9Emfq36lpmkEaEO4KMeEhs7yWeH3ugYdy5eyjG877EHSkKpsVec3wdSTcdXj5QqPGaMYCbQpoCEkZqDEJeQAXYS8y5J6RNPIGd9fB7ldyjPfkMHjWnKBT0iY52iez3Uq/tmHJMIh1uJDkmLi7bnVLU6nP7sUSEwTk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713963916; c=relaxed/simple; bh=trZv5sD4FjAPbHiMr1RJMNDyj7jQZo+hKTtHm5ljoSg=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=usR2RMSrp0JDuT0EkesNb6h1ZLImIyL+j17ZzVVIpYM3YEm2HsnGKTNJyLqADVH6XKQr3MVKupiH5pIRxbg0vh83kaTjPXajiMGaAVLtSBrnXzehuynBvXQzIKAeFGvvE8wdt3+7Ut4+7Y2Krxodn0P9hbdXe7kWhZJI/3vRWYY= 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=Mr6bsXSG; 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 lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43OD58If026252; Wed, 24 Apr 2024 08:05:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1713963908; bh=n6Gm8aFsB7jXyyx0SKj7OlRHLpLiF56JlQ+Nni+T9QQ=; h=From:To:CC:Subject:Date; b=Mr6bsXSGSIsScvlmsCMTJc0QBys+RMSj4c8Pc66Wen2EAVQvt/bsxJQQWQxxmS09W 3KcRX6+Zo1Mf2KYiy/8usYqQKGckKGfAvV7j6MpKQkAY+2XTS11SDUOgFykoqOJuVy zhqveFwlu9rJ9ovbD/Dp2Pcw5MepIoi4tzX3+VMg= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43OD58pW063776 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 24 Apr 2024 08:05:08 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 24 Apr 2024 08:05:07 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE103.ent.ti.com (157.170.170.33) 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; Wed, 24 Apr 2024 08:05:07 -0500 Received: from uda0510294.dhcp.ti.com (uda0510294.dhcp.ti.com [10.24.69.66]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43OD54bP029300; Wed, 24 Apr 2024 08:05:05 -0500 From: Beleswar Padhi To: CC: , , , , , , , Subject: [PATCH v2 0/2] remoteproc: k3-r5: Wait for core0 power-up before powering up core1 Date: Wed, 24 Apr 2024 18:35:02 +0530 Message-ID: <20240424130504.494916-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. 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 | 51 +++++++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) -- 2.34.1