Re: [PATCH 5/8] remoteproc: qcom: pas: Track HPASS ADSP cluster membership

Konrad Dybcio <[email protected]>
Newsgroups org.kernel.vger.linux-remoteproc,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/15/26 3:25 PM, Shawn Guo wrote:
> On Nord, ADSP0/1/2 share HPASS-domain resources (PLLs, AG_NOC, RSCp,
> CESTA, THROTTLE, QTMR) owned by ADSP0, and their firmware cannot
> tolerate one member being started or stopped independently of the
> others. Modeling that requires each PAS instance to know which other
> instances it is grouped with.

[...]

> +static struct qcom_pas_cluster *qcom_pas_cluster_get(struct device_node *node)
> +{
> +	struct qcom_pas_cluster *cluster;
> +
> +	mutex_lock(&qcom_pas_cluster_list_lock);

Use scoped mutex guards

[...]

> +static int qcom_pas_cluster_init(struct qcom_pas *pas, struct device_node *np)
> +{
> +	struct device_node *root_node;
> +	bool is_root;
> +
> +	root_node = of_parse_phandle(np, "qcom,cluster-root", 0);
> +	if (!root_node)
> +		return 0;
> +
> +	is_root = root_node == np;
> +
> +	/*
> +	 * A non-root member is useless without its root: it can never be
> +	 * booted, since its boot has to be sequenced after the root's. Reject
> +	 * it here rather than at first boot, so that a DT enabling a dependent
> +	 * DSP but not the one owning the shared resources fails loudly and
> +	 * early.
> +	 */
> +	if (!is_root && !of_device_is_available(root_node)) {

Let's use fwnode_device_is_available() instead, even though there's
megatons of OF-specific calls across the framework

Konrad
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.