diff mbox series

[2/3] interconnect: qcom: sdm845: Init BCMs before creating the nodes

Message ID 20201013135913.29059-2-georgi.djakov@linaro.org
State Accepted
Commit 0f221a729049ab727c87b0fe47e309b952d879ce
Headers show
Series [1/3] interconnect: Aggregate before setting initial bandwidth | expand

Commit Message

Georgi Djakov Oct. 13, 2020, 1:59 p.m. UTC
Currently if we use sync_state, by default the bandwidth is maxed out,
but in order to set this in hardware, the BCMs (Bus Clock Managers) need
to be initialized first. Move the BCM initialization before creating the
nodes to fix this.

Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state")
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
---
 drivers/interconnect/qcom/sdm845.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Saravana Kannan Oct. 13, 2020, 6:06 p.m. UTC | #1
On Tue, Oct 13, 2020 at 6:59 AM Georgi Djakov <georgi.djakov@linaro.org> wrote:
>
> Currently if we use sync_state, by default the bandwidth is maxed out,
> but in order to set this in hardware, the BCMs (Bus Clock Managers) need
> to be initialized first. Move the BCM initialization before creating the
> nodes to fix this.
>
> Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state")
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
> ---
>  drivers/interconnect/qcom/sdm845.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/interconnect/qcom/sdm845.c b/drivers/interconnect/qcom/sdm845.c
> index d79e3163e2c3..47556dc12ec0 100644
> --- a/drivers/interconnect/qcom/sdm845.c
> +++ b/drivers/interconnect/qcom/sdm845.c
> @@ -489,6 +489,9 @@ static int qnoc_probe(struct platform_device *pdev)
>                 return ret;
>         }
>
> +       for (i = 0; i < qp->num_bcms; i++)
> +               qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
> +
>         for (i = 0; i < num_nodes; i++) {
>                 size_t j;
>
> @@ -512,9 +515,6 @@ static int qnoc_probe(struct platform_device *pdev)
>         }
>         data->num_nodes = num_nodes;
>
> -       for (i = 0; i < qp->num_bcms; i++)
> -               qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
> -
>         platform_set_drvdata(pdev, qp);
>
>         return 0;

Acked-by: Saravana Kannan <saravanak@google.com>

-Saravana
diff mbox series

Patch

diff --git a/drivers/interconnect/qcom/sdm845.c b/drivers/interconnect/qcom/sdm845.c
index d79e3163e2c3..47556dc12ec0 100644
--- a/drivers/interconnect/qcom/sdm845.c
+++ b/drivers/interconnect/qcom/sdm845.c
@@ -489,6 +489,9 @@  static int qnoc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
+	for (i = 0; i < qp->num_bcms; i++)
+		qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
+
 	for (i = 0; i < num_nodes; i++) {
 		size_t j;
 
@@ -512,9 +515,6 @@  static int qnoc_probe(struct platform_device *pdev)
 	}
 	data->num_nodes = num_nodes;
 
-	for (i = 0; i < qp->num_bcms; i++)
-		qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
-
 	platform_set_drvdata(pdev, qp);
 
 	return 0;