From: Ashish Mhetre <amhetre@nvidia.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
krzysztof.kozlowski@linaro.org, thierry.reding@gmail.com,
jonathanh@nvidia.com, digetx@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org,
linux-tegra@vger.kernel.org, devicetree@vger.kernel.org
Cc: vdumpa@nvidia.com, Snikam@nvidia.com
Subject: Re: [Patch v9 1/4] memory: tegra: Add memory controller channels support
Date: Fri, 29 Apr 2022 16:17:23 +0530 [thread overview]
Message-ID: <416a37f5-92fb-8b34-3597-32daeda33a24@nvidia.com> (raw)
In-Reply-To: <8fc06781-72a0-9f86-e9cc-6af2425f2077@collabora.com>
On 4/29/2022 2:20 PM, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> On 4/26/22 10:38, Ashish Mhetre wrote:
>> +static int tegra186_mc_map_regs(struct tegra_mc *mc)
>> +{
>> + struct platform_device *pdev = to_platform_device(mc->dev);
>> + unsigned int i;
>> +
>> + mc->bcast_ch_regs = devm_platform_ioremap_resource_byname(pdev, "broadcast");
>> + if (IS_ERR(mc->bcast_ch_regs)) {
>> + if (PTR_ERR(mc->bcast_ch_regs) == -EINVAL) {
>> + dev_warn(&pdev->dev, "Broadcast channel is missing, please update your device-tree\n");
>> + mc->bcast_ch_regs = NULL;
>> + return 0;
>> + }
>> + return PTR_ERR(mc->bcast_ch_regs);
>> + }
>> +
>> + mc->ch_regs = devm_kcalloc(mc->dev, mc->soc->num_channels,
>> + sizeof(*mc->ch_regs), GFP_KERNEL);
>> + if (!mc->ch_regs)
>> + return -ENOMEM;
>> +
>> + for (i = 0; i < mc->soc->num_channels; i++) {
>> + char name[5];
>> +
>> + snprintf(name, sizeof(name), "ch%u", i);
>> + mc->ch_regs[i] = devm_platform_ioremap_resource_byname(pdev, name);
>> + if (IS_ERR(mc->ch_regs[i]))
>> + return PTR_ERR(mc->ch_regs[i]);
>> + }
>> +
>> + return 0;
>> +}
>> +
>> const struct tegra_mc_ops tegra186_mc_ops = {
>> .probe = tegra186_mc_probe,
>> .remove = tegra186_mc_remove,
>> .resume = tegra186_mc_resume,
>> .probe_device = tegra186_mc_probe_device,
>> + .map_regs = tegra186_mc_map_regs,
>> };
>
> Do we really need the map_regs() callback? Could you please move it to
> the tegra186_mc_probe()? .. Sorry, I haven't noticed this previously.
Okay, I'll update this.
next prev parent reply other threads:[~2022-04-29 10:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 7:38 [Patch v9 0/4] memory: tegra: Add MC channels and error logging Ashish Mhetre
2022-04-26 7:38 ` [Patch v9 1/4] memory: tegra: Add memory controller channels support Ashish Mhetre
2022-04-29 7:11 ` Krzysztof Kozlowski
2022-04-29 8:30 ` Thierry Reding
2022-04-29 8:50 ` Dmitry Osipenko
2022-04-29 10:47 ` Ashish Mhetre [this message]
2022-04-26 7:38 ` [Patch v9 2/4] memory: tegra: Add MC error logging on tegra186 onward Ashish Mhetre
2022-04-26 7:38 ` [Patch v9 3/4] dt-bindings: memory: tegra: Update validation for reg and reg-names Ashish Mhetre
2022-04-26 7:38 ` [Patch v9 4/4] arm64: tegra: Add memory controller channels Ashish Mhetre
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=416a37f5-92fb-8b34-3597-32daeda33a24@nvidia.com \
--to=amhetre@nvidia.com \
--cc=Snikam@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=digetx@gmail.com \
--cc=dmitry.osipenko@collabora.com \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vdumpa@nvidia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox