Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Nicolin Chen
On Mon, Oct 05, 2020 at 12:56:38PM +0200, Thierry Reding wrote: > On Mon, Oct 05, 2020 at 11:41:08AM +0300, Dmitry Osipenko wrote: > > 05.10.2020 00:57, Nicolin Chen пишет: > > > On Sat, Oct 03, 2020 at 05:06:42PM +0300, Dmitry Osipenko wrote: > > >> 03.10.2020 09:59, Nicolin Chen пишет: > > >>> s

Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Thierry Reding
On Mon, Oct 05, 2020 at 11:41:08AM +0300, Dmitry Osipenko wrote: > 05.10.2020 00:57, Nicolin Chen пишет: > > On Sat, Oct 03, 2020 at 05:06:42PM +0300, Dmitry Osipenko wrote: > >> 03.10.2020 09:59, Nicolin Chen пишет: > >>> static int tegra_smmu_of_xlate(struct device *dev, > >>>

Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Dmitry Osipenko
05.10.2020 00:57, Nicolin Chen пишет: > On Sat, Oct 03, 2020 at 05:06:42PM +0300, Dmitry Osipenko wrote: >> 03.10.2020 09:59, Nicolin Chen пишет: >>> static int tegra_smmu_of_xlate(struct device *dev, >>>struct of_phandle_args *args) >>> { >>> + struct platform_devic

Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-04 Thread Nicolin Chen
On Sat, Oct 03, 2020 at 05:05:52PM +0300, Dmitry Osipenko wrote: > 03.10.2020 09:59, Nicolin Chen пишет: > > ubuntu@jetson:~$ dmesg | grep iommu > > iommu: Default domain type: Translated > > tegra-i2c 7000c400.i2c: Adding to iommu group 0 > > tegra-i2c 7000c500.i2c: Adding to iomm

Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-04 Thread Nicolin Chen
On Sat, Oct 03, 2020 at 05:06:42PM +0300, Dmitry Osipenko wrote: > 03.10.2020 09:59, Nicolin Chen пишет: > > static int tegra_smmu_of_xlate(struct device *dev, > >struct of_phandle_args *args) > > { > > + struct platform_device *iommu_pdev = of_find_device_by_node(ar

Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-03 Thread Dmitry Osipenko
03.10.2020 09:59, Nicolin Chen пишет: > The bus_set_iommu() in tegra_smmu_probe() enumerates all clients > to call in tegra_smmu_probe_device() where each client searches > its DT node for smmu pointer and swgroup ID, so as to configure > an fwspec. But this requires a valid smmu pointer even befor

Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-03 Thread Dmitry Osipenko
03.10.2020 09:59, Nicolin Chen пишет: > ubuntu@jetson:~$ dmesg | grep iommu > iommu: Default domain type: Translated > tegra-i2c 7000c400.i2c: Adding to iommu group 0 > tegra-i2c 7000c500.i2c: Adding to iommu group 0 > tegra-i2c 7000d000.i2c: Adding to iommu group 0 > tegra

Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-03 Thread Dmitry Osipenko
03.10.2020 09:59, Nicolin Chen пишет: > static int tegra_smmu_of_xlate(struct device *dev, > struct of_phandle_args *args) > { > + struct platform_device *iommu_pdev = of_find_device_by_node(args->np); > + struct tegra_mc *mc = platform_get_drvdata(iommu_pdev)

[PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-03 Thread Nicolin Chen
The bus_set_iommu() in tegra_smmu_probe() enumerates all clients to call in tegra_smmu_probe_device() where each client searches its DT node for smmu pointer and swgroup ID, so as to configure an fwspec. But this requires a valid smmu pointer even before mc and smmu drivers are probed. So in tegra_