* [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver.
[not found] ` <1422379260-10139-2-git-send-email-stripathi@apm.com>
@ 2015-01-27 20:12 ` Arnd Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:12 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 27 January 2015 22:50:59 Suman Tripathi wrote:
> @@ -174,6 +176,13 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
> pltfm_host->priv = sdhci_arasan;
> pltfm_host->clk = clk_xin;
>
> + ret = xgene_ahbc_iommu_attach_device(&pdev->dev);
> + if (ret < 0 && IS_ENABLED(CONFIG_XGENE_AHBC_IOMMU)) {
> + dev_err(&pdev->dev,
> + "unable to attach device to iommu %x\n", ret);
> + goto clk_disable_all;
> + }
> +
> ret = sdhci_add_host(host);
> if (ret) {
> dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
>
This looks wrong: the iommu should be automatically configured for devices
that need it, without any interaction from the driver.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
[not found] ` <1422379260-10139-3-git-send-email-stripathi@apm.com>
@ 2015-01-27 20:13 ` Arnd Bergmann
[not found] ` <CAOHikRB4tSkJsMccqHRS8XYULaP+dS7KujeSLh+ZpTxDDOF5xQ@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:13 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>
> + sdhc0: sdhc at 1c000000 {
> + device_type = "sdhc";
> + compatible = "arasan,sdhci-8.9a";
> + reg = <0x0 0x1c000000 0x0 0x100>;
> + interrupts = <0x0 0x49 0x4>;
> + clock-names = "clk_xin", "clk_ahb";
> + clocks = <&sdioclk 0>, <&ahbclk 0>;
> + };
> +
Here you don't provide an 'iommus' property, which means that the
device is unable to use the iommu.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
[not found] ` <CAOHikRB4tSkJsMccqHRS8XYULaP+dS7KujeSLh+ZpTxDDOF5xQ@mail.gmail.com>
@ 2015-01-28 4:23 ` Suman Tripathi
2015-01-28 12:46 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Suman Tripathi @ 2015-01-28 4:23 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
In the next version Also I will remove the IOMMU hacks from arasan
driver
On Wed, Jan 28, 2015 at 9:48 AM, Suman Tripathi <stripathi@apm.com> wrote:
> Hi Arnd,
>
> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>>
>> + sdhc0: sdhc at 1c000000 {
>> + device_type = "sdhc";
>> + compatible = "arasan,sdhci-8.9a";
>> + reg = <0x0 0x1c000000 0x0 0x100>;
>> + interrupts = <0x0 0x49 0x4>;
>> + clock-names = "clk_xin", "clk_ahb";
>> + clocks = <&sdioclk 0>, <&ahbclk 0>;
>> + };
>> +
>
> Here you don't provide an 'iommus' property, which means that the
> device is unable to use the iommu.
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ? In the
> next version Also I will remove the IOMMU hacks from arasan driver
>
>
> On Wed, Jan 28, 2015 at 1:43 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>> >
>> > + sdhc0: sdhc at 1c000000 {
>> > + device_type = "sdhc";
>> > + compatible = "arasan,sdhci-8.9a";
>> > + reg = <0x0 0x1c000000 0x0 0x100>;
>> > + interrupts = <0x0 0x49 0x4>;
>> > + clock-names = "clk_xin", "clk_ahb";
>> > + clocks = <&sdioclk 0>, <&ahbclk 0>;
>> > + };
>> > +
>>
>> Here you don't provide an 'iommus' property, which means that the
>> device is unable to use the iommu.
>>
>> Arnd
>
>
>
>
> --
> Thanks,
> with regards,
> Suman Tripathi
--
Thanks,
with regards,
Suman Tripathi
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
2015-01-28 4:23 ` Suman Tripathi
@ 2015-01-28 12:46 ` Arnd Bergmann
2015-01-28 13:22 ` Suman Tripathi
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-01-28 12:46 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
> In the next version Also I will remove the IOMMU hacks from arasan
> driver
Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.
You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.
Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
2015-01-28 12:46 ` Arnd Bergmann
@ 2015-01-28 13:22 ` Suman Tripathi
0 siblings, 0 replies; 5+ messages in thread
From: Suman Tripathi @ 2015-01-28 13:22 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
> In the next version Also I will remove the IOMMU hacks from arasan
> driver
Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.
You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.
One more point is the binding for IOMMU needs to be in the same patch
in which the IOMMU support is added. So to provide the binding info of
the master node we require the sdhc nodes to be merged first.
Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.
On Wed, Jan 28, 2015 at 6:16 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>>
>> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
>> In the next version Also I will remove the IOMMU hacks from arasan
>> driver
>
> Hmm, I guess you have a required ordering between the patches either
> way, which makes it hard to merge in a way that is bisectable.
>
> You are correct that you should not merge a patch with the iommu
> reference before adding the iommu device node, because it would
> otherwise break building the mmc tree.
>
> Usually, the right answer is to merged the dts changes through the
> arm-soc tree, and then you can just add the node for the sdhc device
> after the one for the iommu device.
>
> Arnd
--
Thanks,
with regards,
Suman Tripathi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-28 13:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1422379260-10139-1-git-send-email-stripathi@apm.com>
[not found] ` <1422379260-10139-2-git-send-email-stripathi@apm.com>
2015-01-27 20:12 ` [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver Arnd Bergmann
[not found] ` <1422379260-10139-3-git-send-email-stripathi@apm.com>
2015-01-27 20:13 ` [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi Arnd Bergmann
[not found] ` <CAOHikRB4tSkJsMccqHRS8XYULaP+dS7KujeSLh+ZpTxDDOF5xQ@mail.gmail.com>
2015-01-28 4:23 ` Suman Tripathi
2015-01-28 12:46 ` Arnd Bergmann
2015-01-28 13:22 ` Suman Tripathi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox