[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b2712ff-d4d3-3a7a-aebf-6b56774fc0fc@nvidia.com>
Date: Fri, 13 Jan 2023 17:55:44 +0530
From: Sumit Gupta <sumitg@...dia.com>
To: Dmitry Osipenko <digetx@...il.com>, <treding@...dia.com>,
<krzysztof.kozlowski@...aro.org>, <dmitry.osipenko@...labora.com>,
<viresh.kumar@...aro.org>, <rafael@...nel.org>,
<jonathanh@...dia.com>, <robh+dt@...nel.org>,
<linux-kernel@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <devicetree@...r.kernel.org>
CC: <sanjayc@...dia.com>, <ksitaraman@...dia.com>, <ishah@...dia.com>,
<bbasu@...dia.com>, Sumit Gupta <sumitg@...dia.com>
Subject: Re: [Patch v1 01/10] memory: tegra: add interconnect support for DRAM
scaling in Tegra234
On 21/12/22 22:24, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> 20.12.2022 19:02, Sumit Gupta пишет:
>> static int tegra186_emc_probe(struct platform_device *pdev)
>> {
>> struct mrq_emc_dvfs_latency_response response;
>> struct tegra_bpmp_message msg;
>> struct tegra186_emc *emc;
>> + struct tegra_mc *mc;
>> unsigned int i;
>> int err;
>>
>> @@ -158,6 +307,9 @@ static int tegra186_emc_probe(struct platform_device *pdev)
>> if (!emc)
>> return -ENOMEM;
>>
>> + platform_set_drvdata(pdev, emc);
>> + emc->dev = &pdev->dev;
>> +
>> emc->bpmp = tegra_bpmp_get(&pdev->dev);
>> if (IS_ERR(emc->bpmp))
>> return dev_err_probe(&pdev->dev, PTR_ERR(emc->bpmp), "failed to get BPMP\n");
>> @@ -236,6 +388,19 @@ static int tegra186_emc_probe(struct platform_device *pdev)
>> debugfs_create_file("max_rate", S_IRUGO | S_IWUSR, emc->debugfs.root,
>> emc, &tegra186_emc_debug_max_rate_fops);
>>
>> + mc = dev_get_drvdata(emc->dev->parent);
>> + if (mc && mc->soc->icc_ops) {
>> + if (tegra_bpmp_mrq_is_supported(emc->bpmp, MRQ_BWMGR_INT)) {
>> + err = tegra_emc_interconnect_init(emc);
>> + if (!err)
>> + return err;
>> + dev_err(&pdev->dev, "tegra_emc_interconnect_init failed:%d\n", err);
>> + goto put_bpmp;
>> + } else {
>> + dev_info(&pdev->dev, "MRQ_BWMGR_INT not present\n");
>> + }
>
> If there is no MRQ_BWMGR_INT, then device drivers using ICC won't probe.
> This is either a error condition, or ICC should inited and then ICC
> changes should be skipped.
>
If the MRQ_BW_MGR is not supported by a BPMP-FW binary, then the MC &
EMC drivers will still probe successfully and scaling will be disabled.
Powered by blists - more mailing lists