lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bf4eccf5-6db5-c837-a29d-b75ab1ded607@nvidia.com>
Date:   Tue, 22 Mar 2022 17:36:04 +0530
From:   Sumit Gupta <sumitg@...dia.com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
CC:     <rafael@...nel.org>, <robh+dt@...nel.org>, <krzk+dt@...nel.org>,
        <treding@...dia.com>, <jonathanh@...dia.com>,
        <linux-pm@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <ksitaraman@...dia.com>, <sanjayc@...dia.com>, <bbasu@...dia.com>,
        Sumit Gupta <sumitg@...dia.com>
Subject: Re: [Patch v1 3/3] cpufreq: tegra194: Add support for Tegra234



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ