From: tsoni@codeaurora.org (Trilok Soni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] msm: iommu: Rework clock logic and add IOMMU bus clock control
Date: Mon, 28 Feb 2011 17:43:37 +0530 [thread overview]
Message-ID: <4D6B9171.60600@codeaurora.org> (raw)
In-Reply-To: <4D6828B5.6050608@codeaurora.org>
Hi Steve,
On 2/26/2011 3:39 AM, Stepan Moskovchenko wrote:
> On 2/24/2011 11:29 PM, Trilok Soni wrote:
>> Hi Steve,
>
> Hello
>
>>> @@ -130,117 +131,134 @@ static int msm_iommu_probe(struct platform_device *pdev)
>>> {
>>> struct resource *r, *r2;
>>> struct clk *iommu_clk;
>>> + struct clk *iommu_pclk;
>>> struct msm_iommu_drvdata *drvdata;
>>> struct msm_iommu_dev *iommu_dev = pdev->dev.platform_data;
>> const please.
>>
>
> I am not clear on what you mean. Please be more specific here.
I mean
const struct msm_iommu_dev *iommu_dev = pdev->dev.platform_data;
Now I see that this change is not part of this patch so you can ignore my comment.
>
>>> + iommu_pclk = clk_get(NULL, "smmu_pclk");
>>> + if (IS_ERR(iommu_pclk)) {
>>> + ret = -ENODEV;
>>> + goto fail;
>>> + }
>> I am not a big fan of this when you have the "device" around. You should just do
>>
>> iommu_pclk = clk_get(&pdev->dev, NULL);
>>
>> ...error logic...
>>
>> iommu_clk = clk_get(&pdev->dev, "iommu_clk");
>>
>> ...error logic...
>>
>
> The pclk is a "special" bus clock and does not have a specific device instance associated with it, so passing a device would not be appropriate in this case. I pass the device for other clocks that are indeed associated with devices, but this is not one of them. I suppose we could create 11 or 12 aliases for the pclk and associate it with all the IOMMU devices, but I would prefer to avoid doing that as I believe the current approach is cleaner.
ok.
>
>>> - ret = -EBUSY;
>>> - goto fail;
>>> - }
>>> + len = r->end - r->start + 1;
>>
>> resource_size please.
>>
>
> Ok
Thanks.
---Trilok Soni
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-02-28 12:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 2:00 [PATCH 1/4] msm: iommu: Clock control for the IOMMU driver Stepan Moskovchenko
2011-02-25 2:00 ` [PATCH 2/4] msm: iommu: Rework clock logic and add IOMMU bus clock control Stepan Moskovchenko
2011-02-25 7:29 ` Trilok Soni
2011-02-25 22:09 ` Stepan Moskovchenko
2011-02-28 12:13 ` Trilok Soni [this message]
2011-03-01 0:03 ` [PATCH v2 " Stepan Moskovchenko
2011-03-01 7:15 ` Trilok Soni
2011-02-25 2:00 ` [PATCH 3/4] msm: iommu: Use ASID tagging instead of VMID tagging Stepan Moskovchenko
2011-02-25 2:00 ` [PATCH 4/4] msm: iommu: Remove dependency on IDR Stepan Moskovchenko
2011-03-08 23:43 ` [PATCH 1/4] msm: iommu: Clock control for the IOMMU driver David Brown
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=4D6B9171.60600@codeaurora.org \
--to=tsoni@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).