Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp312606lqp; Thu, 21 Mar 2024 01:47:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVYec19tJ+Rd9hqBE7XhcU/kCwF5OGUaLjrP3AW7K55BDlZZI+NA3UVbndzV5vUcYIJ3bR7MoNlY7V82SU4vWfC6ZTN4kV4KYKey2BLNA== X-Google-Smtp-Source: AGHT+IEfdfBqgL7RNxtPZPviL+skJuJjkuCHsDpStsDssFU+WrVx01MRCD05r+Ny2r2Qwt67VMpr X-Received: by 2002:ae9:f709:0:b0:789:e8e8:f674 with SMTP id s9-20020ae9f709000000b00789e8e8f674mr4063724qkg.30.1711010821021; Thu, 21 Mar 2024 01:47:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711010821; cv=pass; d=google.com; s=arc-20160816; b=rCBndjHzj6VdoljvrTbnVXeS1GajmBlAjPL0QSzCQp1whuAr6qC87z1d9ri/SJE6id Tngd6pfAeowu1HS/lSPSCuFKxvDIRpzygqVs3h3SOE6wlMf2bPKcEswM2OROzgWJ7QAu DSvmScjPGPiw3Ih5tLIKRoFxx5d1HcuEWKMLghp+7q9FyUDbk9tTB3OBQ/TgsHMjbNhA PU+TaqD2Qs3fV++Xy1yMq6NpDmJbua8VDVdVCsJ0zwF7WTxZARuSXQPnKWebEWaaLmUF LMMVbn7BOex0hETG9kUzJ8VPJHPfu/NcF9CDm4giPDXvzGEmS1p2+VSo9HLulwsa6TaO RyEw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gDp2D9scNMMlwfsQ/PQjXgT61q5jrRPqVd3sWj+u5E4=; fh=paRSa/Rd7IxtF+5+pZI2G+TKlQUEk4rWEuOAHek/xn4=; b=ibkLEaDckVk3oiBTbfwabQVULWYDlrJGUKMLDtJZ1yVIJfkgjYyZaPEVbVT6LZwL1X ATO0x2Dvv286m0twagpSPt+56WQdYdPA4PYSsTwVZ9qowTkqkwTQjZ6GOsd3XhndXR84 JL5+M1uXfBQgI41Eea/KoQPbXHaO36mofowN/NVhaGdOfmQXXeJ8W82kPLZ08RgJIOWa YqLUHL8XADmIUIV6qjkNtSoXz7gEg9tow0Qi4PIugLdQaeZB14xP1tuJ5mI9n4NQ7iyN rFTT2Ffi+VfBFHMnyYjfQoCZNILjtiqgTRzyj+pWXGvSIZ/A+M3c/26AmSqgd2WBNZEd aVsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=G9kLjqC+; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-109811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v17-20020a05620a441100b0078a230f46bfsi3108011qkp.375.2024.03.21.01.47.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 01:47:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=G9kLjqC+; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-109811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 991831C20B3B for ; Thu, 21 Mar 2024 08:47:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A70B743AC1; Thu, 21 Mar 2024 08:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="G9kLjqC+" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 61BA3200C8; Thu, 21 Mar 2024 08:46:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711010796; cv=none; b=JCEe19VyxiwYzgDiK6MARvZpGTMVQq8AO5kmLBixnoQlJH7lwuojOyRh2AT/FNIGy9WezTwhgyg8Wn+oFYQiF/55JYzfPoXC0dGPif3LH5zsEJuehQRAkyu0zfxRtuRBhKsshycNi5UXbsqmZZWl5NOIIE7a5HYPPuQr/Pxk3Lo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711010796; c=relaxed/simple; bh=jle9wMiDny+kxaOKZOmL2FIJ6vWyfkstyQhgaqAXszI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X576TwbYB+Jqg6T4VxFkAV+cVRpIZlP0rznri43nV4Nc21NRYtGvcxe3xdwIfPb6vhDXq/y7nv1b/7S9RJfS18NMJCTKx6S22mY89fLQ4NaFRhOwmcRlJBdJ16KayJfpEW6apSeyH5JRcGLXWxiDkUFf15FVwtPeOpyYUPDWwCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=G9kLjqC+; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1711010793; bh=jle9wMiDny+kxaOKZOmL2FIJ6vWyfkstyQhgaqAXszI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G9kLjqC+Z1Ox2AHUeOc1P1V361SzTc0eAb1d9ikwoX2FSIHLxZM85G3Ic6oBKsIio T0+x8pxeKEE9SqryU9yqj8ELIlJ6GQ8+OJxxQD3O5HFzki7u/e9oGCXCixDxlhqK0e 5ajkBPRllQd1cGjJ67F588DWgopV920Ha7qAP0VbOSpJO0VraGOkrbdm3PYj7gZsYT SNv1g63cRleafGYEDABs4AW2fcGKE+rIxRDNYvs5fhcDWlo7Rc1jnRxyExqmLhHxpG s67saseBC/QDK+pcgskH/4o0wRB4vm2VXhwz/TVJPB5+kXQp71a9K+enbqA3qMpWO5 LWMy36n0OV56Q== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id B34DD3782114; Thu, 21 Mar 2024 08:46:32 +0000 (UTC) From: AngeloGioacchino Del Regno To: mathieu.poirier@linaro.org Cc: andersson@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, tzungbi@kernel.org, tinghan.shen@mediatek.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wenst@chromium.org, kernel@collabora.com Subject: [PATCH 2/2] remoteproc: mediatek: Don't parse extraneous subnodes for multi-core Date: Thu, 21 Mar 2024 09:46:14 +0100 Message-ID: <20240321084614.45253-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321084614.45253-1-angelogioacchino.delregno@collabora.com> References: <20240321084614.45253-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When probing multi-core SCP, this driver is parsing all sub-nodes of the scp-cluster node, but one of those could be not an actual SCP core and that would make the entire SCP cluster to fail probing for no good reason. To fix that, in scp_add_multi_core() treat a subnode as a SCP Core by parsing only available subnodes having compatible "mediatek,scp-core". Fixes: 1fdbf0cdde98 ("remoteproc: mediatek: Probe SCP cluster on multi-core SCP") Signed-off-by: AngeloGioacchino Del Regno --- drivers/remoteproc/mtk_scp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 67518291a8ad..fbe1c232dae7 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -1096,6 +1096,9 @@ static int scp_add_multi_core(struct platform_device *pdev, cluster_of_data = (const struct mtk_scp_of_data **)of_device_get_match_data(dev); for_each_available_child_of_node(np, child) { + if (!of_device_is_compatible(child, "mediatek,scp-core")) + continue; + if (!cluster_of_data[core_id]) { ret = -EINVAL; dev_err(dev, "Not support core %d\n", core_id); -- 2.44.0