Re: [PATCH] iommu/omap: Add registration for DT fwnode pointer

2020-05-18 Thread Tero Kristo via iommu
On 24/04/2020 17:58, Tero Kristo via iommu wrote: The fwnode pointer must be passed to the iommu core, so that the core can map the IOMMU towards device requests properly. Without this, some IOMMU clients like OMAP remoteproc will fail the iommu configuration multiple times with -EPROBE_DEFER

[PATCH -next] iommu/omap: Add check for iommu group when no IOMMU in use

2020-05-18 Thread Tero Kristo via iommu
Most of the devices in OMAP family of SoCs are not using IOMMU. The patch for converting the OMAP IOMMU to use generic IOMMU bus probe functionality failed to add a check for this, so add it here. Fixes: c822b37cac48 ("iommu/omap: Remove orphan_dev tracking") Reported-by: Tomi Valkeinen Signed-of

[PATCH] iommu/omap: Add registration for DT fwnode pointer

2020-04-24 Thread Tero Kristo via iommu
The fwnode pointer must be passed to the iommu core, so that the core can map the IOMMU towards device requests properly. Without this, some IOMMU clients like OMAP remoteproc will fail the iommu configuration multiple times with -EPROBE_DEFER, which will eventually be ignored with a kernel warning

[PATCH 6/8] iommu/omap: introduce new API for runtime suspend/resume control

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna This patch adds the support for the OMAP IOMMUs to be suspended during the auto suspend/resume of the OMAP remoteproc devices. The remote processors are auto suspended after a certain time of idle or inactivity period. This is done by introducing two new API, omap_iommu_domain_de

[PATCH 8/8] iommu/omap: remove pm_runtime_irq_safe flag for OMAP IOMMUs

2019-08-07 Thread Tero Kristo via iommu
This is not needed for anything, and prevents proper PM transitions for parent devices which is bad in case of ti-sysc; this effectively kills PM completely. Thus, remove the flag. Signed-off-by: Tero Kristo --- drivers/iommu/omap-iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/driver

[PATCH 7/8] iommu/omap: add support for late attachment of iommu devices

2019-08-07 Thread Tero Kristo via iommu
Current implementation of OMAP IOMMU enforces strict ordering of device probe, initiated by iommu and followed by remoteproc later. This doesn't work too well with the new setup done with ti-sysc changes which may have the devices probed at pretty much any order. To overcome this limitation, if iom

[PATCH 3/8] iommu/omap: streamline enable/disable through runtime pm callbacks

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna The OMAP IOMMU devices are typically present within the respective client processor subsystem and have their own dedicated hard-reset line. Enabling an IOMMU requires the reset line to be deasserted and the clocks to be enabled before programming the necessary IOMMU registers. Th

[PATCH 1/8] iommu/omap: fix boot issue on remoteprocs with AMMU/Unicache

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna Support has been added to the OMAP IOMMU driver to fix a boot hang issue on OMAP remoteprocs with AMMU/Unicache, caused by an improper AMMU/Unicache state upon initial deassertion of the processor reset. The issue is described in detail in the next three paragraphs. All the Cort

[PATCH 0/8] iommu/omap: misc fixes

2019-08-07 Thread Tero Kristo via iommu
Hi Joerg, Here are a few fixes for OMAP IOMMU. These are mostly towards getting runtime PM support functional again for the IOMMU. -Tero -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

[PATCH 5/8] iommu/omap: Add system suspend/resume support

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna The MMU registers for the remote processors lose their context in Open Switch Retention (OSWR) or device OFF modes. Hence, the context of the IOMMU needs to be saved before it is put into any of these lower power state (OSWR/OFF) and restored before it is powered up to ON again.

[PATCH 2/8] iommu/omap: add pdata ops for omap_device_enable/idle

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna Add two new platform data ops to allow the OMAP iommu driver to be able to invoke the omap_device_enable and omap_device_idle from within the driver. These are being added to streamline the sequence between managing the hard reset lines and the clocks during the suspend path, as

[PATCH 4/8] iommu/omap: add logic to save/restore locked TLBs

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna The MMUs provide a mechanism to lock TLB entries to avoid eviction and fetching of frequently used page table entries. These TLBs lose context when the MMUs are turned OFF. Add the logic to save and restore these locked TLBS during suspend and resume respectively. There are no lo

Re: [RFC PATCH 2/2] soc: ti: Add Support for the TI Page-based Address Translator (PAT)

2019-06-18 Thread Tero Kristo via iommu
On 07/06/2019 22:35, Andrew F. Davis wrote: This patch adds a driver for the Page-based Address Translator (PAT) present on various TI SoCs. A PAT device performs address translation using tables stored in an internal SRAM. Each PAT supports a set number of pages, each occupying a programmable 4K