From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0183CDF59; Wed, 5 Feb 2025 15:05:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738767905; cv=none; b=tMobffLOh2NeqhAbHY45Nv3ccX9djGoBqoq9lOLL+NOJjLgumRmobzOtIbXvtVFR1hJ0zj2wPwThV0IypSvE/cNDl7spLxczeArc9o73U9CFaJ0L99kH7KNaBqP5k8QpiDKILaiHVeP1x/YhXCNVV89D3FMVNuEFLQ5aXhnprbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738767905; c=relaxed/simple; bh=v6menpFq9RjI1i8Cxg8vzwR4OClKczGZsUTaTam1l24=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cwONHtX5/ABQvQ82p60JUwwXWcioquGowddSAPo0PONotxZqst8Q6aMkAb4iPdKOm/h3/Nun73Me0UuOJBFNzDsjxMv0YIRS020dtygcFAYZzIORBWP2/9GpAmQsMXvSnCrH0KqaCCMCgHrGdjia0Bxv1OSftSt2chy22YhQ6tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mk/ej62S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mk/ej62S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 608CFC4CED1; Wed, 5 Feb 2025 15:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1738767904; bh=v6menpFq9RjI1i8Cxg8vzwR4OClKczGZsUTaTam1l24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mk/ej62S1dhsD9ZFKOG5oXwTK7Fj8I7g/Lo45hNe3c3UNN8lk3N9wpLCBjAO/axeQ C6AcLCqmjGqKRljahblwfrU5muu6lPTilTqIOXKZrNsQEPWEiuYZ7XGhYxm51FrFUf lwxmKAV9aO2IMQCc80cMR5Fj/b+b6D3GGcTB1b/g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tinghan Shen , Chen-Yu Tsai , Mathieu Poirier , Sasha Levin Subject: [PATCH 6.13 446/623] remoteproc: mtk_scp: Only populate devices for SCP cores Date: Wed, 5 Feb 2025 14:43:08 +0100 Message-ID: <20250205134513.280491545@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250205134456.221272033@linuxfoundation.org> References: <20250205134456.221272033@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chen-Yu Tsai [ Upstream commit dbb9c372555c0b2a5a9264418bfba6d017752808 ] When multi-core SCP support was added, the driver was made to populate platform devices for all the sub-nodes. This ended up adding platform devices for the rpmsg sub-nodes as well, which never actually get used, since rpmsg devices are registered through the rpmsg interface. Limit of_platform_populate() to just populating the SCP cores with a compatible string match list. Fixes: 1fdbf0cdde98 ("remoteproc: mediatek: Probe SCP cluster on multi-core SCP") Cc: Tinghan Shen Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20241211072009.120511-1-wenst@chromium.org Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin --- drivers/remoteproc/mtk_scp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 0f4a7065d0bd9..8206a17664818 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -1326,6 +1326,11 @@ static int scp_cluster_init(struct platform_device *pdev, struct mtk_scp_of_clus return ret; } +static const struct of_device_id scp_core_match[] = { + { .compatible = "mediatek,scp-core" }, + {} +}; + static int scp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1357,13 +1362,15 @@ static int scp_probe(struct platform_device *pdev) INIT_LIST_HEAD(&scp_cluster->mtk_scp_list); mutex_init(&scp_cluster->cluster_lock); - ret = devm_of_platform_populate(dev); + ret = of_platform_populate(dev_of_node(dev), scp_core_match, NULL, dev); if (ret) return dev_err_probe(dev, ret, "Failed to populate platform devices\n"); ret = scp_cluster_init(pdev, scp_cluster); - if (ret) + if (ret) { + of_platform_depopulate(dev); return ret; + } return 0; } @@ -1379,6 +1386,7 @@ static void scp_remove(struct platform_device *pdev) rproc_del(scp->rproc); scp_free(scp); } + of_platform_depopulate(&pdev->dev); mutex_destroy(&scp_cluster->cluster_lock); } -- 2.39.5