* [PATCH 1/2] ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs
2019-08-27 0:14 [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes Suman Anna via iommu
@ 2019-08-27 0:14 ` Suman Anna via iommu
2019-08-27 10:07 ` kbuild test robot
2019-08-27 0:14 ` [PATCH 2/2] ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU Suman Anna via iommu
2019-10-17 22:59 ` [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes Suman Anna via iommu
2 siblings, 1 reply; 7+ messages in thread
From: Suman Anna via iommu @ 2019-08-27 0:14 UTC (permalink / raw)
To: Tony Lindgren
Cc: Tero Kristo, iommu, Sakari Ailus, Laurent Pinchart, linux-omap
The OMAP IOMMU driver requires the device_enable/idle platform
data ops on all the IOMMU devices to be able to enable and disable
the clocks after commit db8918f61d51 ("iommu/omap: streamline
enable/disable through runtime pm callbacks"). Plug in these
pdata ops for all the existing IOMMUs through pdata quirks to
maintain functionality.
Signed-off-by: Suman Anna <s-anna@ti.com>
---
arch/arm/mach-omap2/pdata-quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 6c6f8fce854e..dbe8d9718f70 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -89,6 +89,8 @@ static struct iommu_platform_data omap3_iommu_pdata = {
.reset_name = "mmu",
.assert_reset = omap_device_assert_hardreset,
.deassert_reset = omap_device_deassert_hardreset,
+ .device_enable = omap_device_enable,
+ .device_idle = omap_device_idle,
};
static int omap3_sbc_t3730_twl_callback(struct device *dev,
@@ -424,6 +426,8 @@ static struct iommu_platform_data omap4_iommu_pdata = {
.reset_name = "mmu_cache",
.assert_reset = omap_device_assert_hardreset,
.deassert_reset = omap_device_deassert_hardreset,
+ .device_enable = omap_device_enable,
+ .device_idle = omap_device_idle,
};
#endif
--
2.22.0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs
2019-08-27 0:14 ` [PATCH 1/2] ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs Suman Anna via iommu
@ 2019-08-27 10:07 ` kbuild test robot
0 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2019-08-27 10:07 UTC (permalink / raw)
To: Suman Anna
Cc: Tony Lindgren, Tero Kristo, iommu, Sakari Ailus, kbuild-all,
linux-omap, Laurent Pinchart
[-- Attachment #1: Type: text/plain, Size: 3217 bytes --]
Hi Suman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on arm/for-next]
[cannot apply to v5.3-rc6 next-20190826]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Suman-Anna/OMAP-IOMMU-fixes-to-go-with-5-4-OMAP-IOMMU-changes/20190827-121217
base: git://git.armlinux.org.uk/~rmk/linux-arm.git for-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> arch/arm/mach-omap2/pdata-quirks.c:92:3: error: 'struct iommu_platform_data' has no member named 'device_enable'
.device_enable = omap_device_enable,
^~~~~~~~~~~~~
>> arch/arm/mach-omap2/pdata-quirks.c:92:19: warning: excess elements in struct initializer
.device_enable = omap_device_enable,
^~~~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:92:19: note: (near initialization for 'omap3_iommu_pdata')
>> arch/arm/mach-omap2/pdata-quirks.c:93:3: error: 'struct iommu_platform_data' has no member named 'device_idle'
.device_idle = omap_device_idle,
^~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:93:17: warning: excess elements in struct initializer
.device_idle = omap_device_idle,
^~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:93:17: note: (near initialization for 'omap3_iommu_pdata')
arch/arm/mach-omap2/pdata-quirks.c:429:3: error: 'struct iommu_platform_data' has no member named 'device_enable'
.device_enable = omap_device_enable,
^~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:429:19: warning: excess elements in struct initializer
.device_enable = omap_device_enable,
^~~~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:429:19: note: (near initialization for 'omap4_iommu_pdata')
arch/arm/mach-omap2/pdata-quirks.c:430:3: error: 'struct iommu_platform_data' has no member named 'device_idle'
.device_idle = omap_device_idle,
^~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:430:17: warning: excess elements in struct initializer
.device_idle = omap_device_idle,
^~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:430:17: note: (near initialization for 'omap4_iommu_pdata')
vim +92 arch/arm/mach-omap2/pdata-quirks.c
87
88 static struct iommu_platform_data omap3_iommu_pdata = {
89 .reset_name = "mmu",
90 .assert_reset = omap_device_assert_hardreset,
91 .deassert_reset = omap_device_deassert_hardreset,
> 92 .device_enable = omap_device_enable,
> 93 .device_idle = omap_device_idle,
94 };
95
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 71385 bytes --]
[-- Attachment #3: Type: text/plain, Size: 156 bytes --]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU
2019-08-27 0:14 [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes Suman Anna via iommu
2019-08-27 0:14 ` [PATCH 1/2] ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs Suman Anna via iommu
@ 2019-08-27 0:14 ` Suman Anna via iommu
2019-08-27 14:06 ` kbuild test robot
2019-10-17 22:59 ` [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes Suman Anna via iommu
2 siblings, 1 reply; 7+ messages in thread
From: Suman Anna via iommu @ 2019-08-27 0:14 UTC (permalink / raw)
To: Tony Lindgren
Cc: Tero Kristo, iommu, Sakari Ailus, Laurent Pinchart, linux-omap
The OMAP3 ISP IOMMU does not have any reset lines, so it didn't
need any pdata previously. The OMAP IOMMU driver now requires the
platform data ops for device_enable/idle on all the IOMMU devices
after commit db8918f61d51 ("iommu/omap: streamline enable/disable
through runtime pm callbacks") to enable/disable the clocks properly
and maintain the reference count and the omap_hwmod state machine.
So, add these callbacks through iommu pdata quirks for the OMAP3
ISP IOMMU.
Signed-off-by: Suman Anna <s-anna@ti.com>
---
arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index dbe8d9718f70..3d597fb962e9 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -93,6 +93,11 @@ static struct iommu_platform_data omap3_iommu_pdata = {
.device_idle = omap_device_idle,
};
+static struct iommu_platform_data omap3_iommu_isp_pdata = {
+ .device_enable = omap_device_enable,
+ .device_idle = omap_device_idle,
+};
+
static int omap3_sbc_t3730_twl_callback(struct device *dev,
unsigned gpio,
unsigned ngpio)
@@ -621,6 +626,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
#ifdef CONFIG_ARCH_OMAP3
OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
&omap3_iommu_pdata),
+ OF_DEV_AUXDATA("ti,omap2-iommu", 0x480bd400, "480bd400.mmu",
+ &omap3_iommu_isp_pdata),
OF_DEV_AUXDATA("ti,omap3-smartreflex-core", 0x480cb000,
"480cb000.smartreflex", &omap_sr_pdata[OMAP_SR_CORE]),
OF_DEV_AUXDATA("ti,omap3-smartreflex-mpu-iva", 0x480c9000,
--
2.22.0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU
2019-08-27 0:14 ` [PATCH 2/2] ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU Suman Anna via iommu
@ 2019-08-27 14:06 ` kbuild test robot
0 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2019-08-27 14:06 UTC (permalink / raw)
To: Suman Anna
Cc: Tony Lindgren, Tero Kristo, iommu, Sakari Ailus, kbuild-all,
linux-omap, Laurent Pinchart
[-- Attachment #1: Type: text/plain, Size: 4428 bytes --]
Hi Suman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on arm/for-next]
[cannot apply to v5.3-rc6 next-20190827]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Suman-Anna/OMAP-IOMMU-fixes-to-go-with-5-4-OMAP-IOMMU-changes/20190827-121217
base: git://git.armlinux.org.uk/~rmk/linux-arm.git for-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/arm/mach-omap2/pdata-quirks.c:92:3: error: 'struct iommu_platform_data' has no member named 'device_enable'
.device_enable = omap_device_enable,
^~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:92:19: warning: excess elements in struct initializer
.device_enable = omap_device_enable,
^~~~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:92:19: note: (near initialization for 'omap3_iommu_pdata')
arch/arm/mach-omap2/pdata-quirks.c:93:3: error: 'struct iommu_platform_data' has no member named 'device_idle'
.device_idle = omap_device_idle,
^~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:93:17: warning: excess elements in struct initializer
.device_idle = omap_device_idle,
^~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:93:17: note: (near initialization for 'omap3_iommu_pdata')
arch/arm/mach-omap2/pdata-quirks.c:97:3: error: 'struct iommu_platform_data' has no member named 'device_enable'
.device_enable = omap_device_enable,
^~~~~~~~~~~~~
>> arch/arm/mach-omap2/pdata-quirks.c:97:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.device_enable = omap_device_enable,
^~~~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:97:19: note: (near initialization for 'omap3_iommu_isp_pdata.reset_name')
arch/arm/mach-omap2/pdata-quirks.c:98:3: error: 'struct iommu_platform_data' has no member named 'device_idle'
.device_idle = omap_device_idle,
^~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:98:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.device_idle = omap_device_idle,
^~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:98:17: note: (near initialization for 'omap3_iommu_isp_pdata.assert_reset')
arch/arm/mach-omap2/pdata-quirks.c:434:3: error: 'struct iommu_platform_data' has no member named 'device_enable'
.device_enable = omap_device_enable,
^~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:434:19: warning: excess elements in struct initializer
.device_enable = omap_device_enable,
^~~~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:434:19: note: (near initialization for 'omap4_iommu_pdata')
arch/arm/mach-omap2/pdata-quirks.c:435:3: error: 'struct iommu_platform_data' has no member named 'device_idle'
.device_idle = omap_device_idle,
^~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:435:17: warning: excess elements in struct initializer
.device_idle = omap_device_idle,
^~~~~~~~~~~~~~~~
arch/arm/mach-omap2/pdata-quirks.c:435:17: note: (near initialization for 'omap4_iommu_pdata')
cc1: some warnings being treated as errors
vim +97 arch/arm/mach-omap2/pdata-quirks.c
87
88 static struct iommu_platform_data omap3_iommu_pdata = {
89 .reset_name = "mmu",
90 .assert_reset = omap_device_assert_hardreset,
91 .deassert_reset = omap_device_deassert_hardreset,
92 .device_enable = omap_device_enable,
> 93 .device_idle = omap_device_idle,
94 };
95
96 static struct iommu_platform_data omap3_iommu_isp_pdata = {
> 97 .device_enable = omap_device_enable,
98 .device_idle = omap_device_idle,
99 };
100
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 71385 bytes --]
[-- Attachment #3: Type: text/plain, Size: 156 bytes --]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes
2019-08-27 0:14 [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes Suman Anna via iommu
2019-08-27 0:14 ` [PATCH 1/2] ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs Suman Anna via iommu
2019-08-27 0:14 ` [PATCH 2/2] ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU Suman Anna via iommu
@ 2019-10-17 22:59 ` Suman Anna via iommu
2019-10-18 15:41 ` Tony Lindgren
2 siblings, 1 reply; 7+ messages in thread
From: Suman Anna via iommu @ 2019-10-17 22:59 UTC (permalink / raw)
To: Tony Lindgren
Cc: Tero Kristo, iommu, Sakari Ailus, Laurent Pinchart, linux-omap
Hi Tony,
On 8/26/19 7:14 PM, Suman Anna wrote:
> Hi Tony,
>
> The following 2 patches need to go along with the recent "iommu/omap: misc
> fixes" series [1] that is currently staged [2] for a 5.4 merge and available
> in linux-next. That series added runtime pm callbacks in preparation for
> the ti-sysc migration, but without adding the necessary platform data
> callbacks for the existing functional MMUs on OMAP3, OMAP4 and OMAP5 SoCs.
> These 2 patches add the same to maintain the functionality (l3_noc errors
> are the visible symptom while enabling the MMUs without these patches).
>
> OMAP4 and OMAP5 would also need another set of fixes related to the
> breakage caused by the switch to clkctrl clocks as seen in [3].
>
> These patches do have a dependency on the staged patches, so either you
> submit a pull-request towards 5.4-rc2 using 5.4-rc1 baseline, or let
> Joerg pick these through the arm/omap IOMMU branch for 5.4-rc1 itself.
>
> Sakari/Laurent,
> Appreciate it if you can check the OMAP3 ISP functionality on latest
> linux-next with the second patch. I have verified the ISP MMU programming
> only through an unit-test.
>
> Tero,
> I will be submitting another patch against OMAP IOMMU driver to skip the
> pdata callbacks for ti-sysc in the next couple of days.
>
> regards
> Suman
>
> [1] https://lore.kernel.org/linux-iommu/20190809153730.GF12930@8bytes.org/T/#mec99f8e8ed351689f4fcc76f4f000f9144a02b51
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/log/?h=arm/omap
> [3] https://patchwork.kernel.org/patch/11082125/#22829477
>
> Suman Anna (2):
> ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs
> ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU
Can you please pick these patches up for 5.4-rc cycle? The OMAP IOMMU
changes that went in for 5.4-rc1 need the pdata to be plugged in.
regards
Suman
>
> arch/arm/mach-omap2/pdata-quirks.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes
2019-10-17 22:59 ` [PATCH 0/2] OMAP IOMMU fixes to go with 5.4 OMAP IOMMU changes Suman Anna via iommu
@ 2019-10-18 15:41 ` Tony Lindgren
0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2019-10-18 15:41 UTC (permalink / raw)
To: Suman Anna; +Cc: Tero Kristo, iommu, Sakari Ailus, Laurent Pinchart, linux-omap
* Suman Anna <s-anna@ti.com> [191017 23:00]:
> Hi Tony,
>
> On 8/26/19 7:14 PM, Suman Anna wrote:
> > Hi Tony,
> >
> > The following 2 patches need to go along with the recent "iommu/omap: misc
> > fixes" series [1] that is currently staged [2] for a 5.4 merge and available
> > in linux-next. That series added runtime pm callbacks in preparation for
> > the ti-sysc migration, but without adding the necessary platform data
> > callbacks for the existing functional MMUs on OMAP3, OMAP4 and OMAP5 SoCs.
> > These 2 patches add the same to maintain the functionality (l3_noc errors
> > are the visible symptom while enabling the MMUs without these patches).
> >
> > OMAP4 and OMAP5 would also need another set of fixes related to the
> > breakage caused by the switch to clkctrl clocks as seen in [3].
> >
> > These patches do have a dependency on the staged patches, so either you
> > submit a pull-request towards 5.4-rc2 using 5.4-rc1 baseline, or let
> > Joerg pick these through the arm/omap IOMMU branch for 5.4-rc1 itself.
> >
> > Sakari/Laurent,
> > Appreciate it if you can check the OMAP3 ISP functionality on latest
> > linux-next with the second patch. I have verified the ISP MMU programming
> > only through an unit-test.
> >
> > Tero,
> > I will be submitting another patch against OMAP IOMMU driver to skip the
> > pdata callbacks for ti-sysc in the next couple of days.
> >
> > regards
> > Suman
> >
> > [1] https://lore.kernel.org/linux-iommu/20190809153730.GF12930@8bytes.org/T/#mec99f8e8ed351689f4fcc76f4f000f9144a02b51
> > [2] https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/log/?h=arm/omap
> > [3] https://patchwork.kernel.org/patch/11082125/#22829477
> >
> > Suman Anna (2):
> > ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs
> > ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU
>
> Can you please pick these patches up for 5.4-rc cycle? The OMAP IOMMU
> changes that went in for 5.4-rc1 need the pdata to be plugged in.
Oh OK. Sorry for missing these, I untagged them earlier as they
produced kbuilder test failures as the dependencies were
missing earlier.
Applying both into fixes.
Regards,
Tony
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread