All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Gupta <sumitg@nvidia.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <rafael@kernel.org>, <robh+dt@kernel.org>, <krzk+dt@kernel.org>,
	<treding@nvidia.com>, <jonathanh@nvidia.com>,
	<linux-pm@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<ksitaraman@nvidia.com>, <sanjayc@nvidia.com>, <bbasu@nvidia.com>,
	Sumit Gupta <sumitg@nvidia.com>
Subject: Re: [Patch v1 3/3] cpufreq: tegra194: Add support for Tegra234
Date: Tue, 22 Mar 2022 17:36:04 +0530	[thread overview]
Message-ID: <bf4eccf5-6db5-c837-a29d-b75ab1ded607@nvidia.com> (raw)
In-Reply-To: <20220322055012.oewlqykxb4dlkhbr@vireshk-i7>



On 22/03/22 11:20, Viresh Kumar wrote:
> External email: Use caution opening links or attachments
> 
> 
> On 16-03-22, 19:28, Sumit Gupta wrote:
>> @@ -442,6 +538,13 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev)
>>        if (!data->tables)
>>                return -ENOMEM;
>>
>> +     if (of_device_is_compatible(pdev->dev.of_node, "nvidia,tegra234-ccplex-cluster")) {
> 
> Since you have soc specific data, that should be used here to know if you need
> to map registers or not. You shouldn't use device-compatible here again.
SoC data struct has 'actmon_cntr_base' field which will be populated for 
SoC's using MMIO. Will use this to check before doing ioremap and add 
the change in v2.

struct tegra_cpufreq_soc {
         struct tegra_cpufreq_ops *ops;
         int maxcpus_per_cluster;
         phys_addr_t actmon_cntr_base;
};

if (soc->actmon_cntr_base) {
  /* mmio registers are used for frequency request and re-construction */
         data->regs = devm_platform_ioremap_resource(pdev, 0);
         if (IS_ERR(data->regs))
                 return PTR_ERR(data->regs);
}

> 
>> +             /* mmio registers are used for frequency request and re-construction */
>> +             data->regs = devm_platform_ioremap_resource(pdev, 0);
>> +             if (IS_ERR(data->regs))
>> +                     return PTR_ERR(data->regs);
>> +     }
>> +
>>        platform_set_drvdata(pdev, data);
>>
>>        bpmp = tegra_bpmp_get(&pdev->dev);
>> @@ -486,6 +589,7 @@ static int tegra194_cpufreq_remove(struct platform_device *pdev)
>>
>>   static const struct of_device_id tegra194_cpufreq_of_match[] = {
>>        { .compatible = "nvidia,tegra194-ccplex", .data = &tegra194_cpufreq_soc },
>> +     { .compatible = "nvidia,tegra234-ccplex-cluster", .data = &tegra234_cpufreq_soc },
>>        { /* sentinel */ }
>>   };
>>
>> --
>> 2.17.1
> 
> --
> viresh

      reply	other threads:[~2022-03-22 12:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 13:58 [Patch v1 0/3] Tegra234 cpufreq driver support Sumit Gupta
2022-03-16 13:58 ` [Patch v1 1/3] cpufreq: tegra194: add soc data to support multiple soc Sumit Gupta
2022-03-16 13:58 ` [Patch v1 2/3] arm64: tegra: add node for tegra234 cpufreq Sumit Gupta
2022-03-18  8:39   ` Jon Hunter
2022-03-21 12:54     ` Sumit Gupta
2022-03-21 15:48       ` Thierry Reding
2022-03-16 13:58 ` [Patch v1 3/3] cpufreq: tegra194: Add support for Tegra234 Sumit Gupta
2022-03-22  5:50   ` Viresh Kumar
2022-03-22 12:06     ` Sumit Gupta [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf4eccf5-6db5-c837-a29d-b75ab1ded607@nvidia.com \
    --to=sumitg@nvidia.com \
    --cc=bbasu@nvidia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=ksitaraman@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sanjayc@nvidia.com \
    --cc=treding@nvidia.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.