Hi Geert, On Wed, Mar 8, 2017 at 10:52 PM, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > Hi Magnus, > > On Wed, Mar 8, 2017 at 12:02 PM, Magnus Damm <magnus.damm@xxxxxxxxx> wrote: >> From: Magnus Damm <damm+renesas@xxxxxxxxxxxxx> >> >> Hook up IOMMU_OF_DECLARE() support in case CONFIG_IOMMU_DMA >> is enabled. The only current supported case for 32-bit ARM >> is disabled, however for 64-bit ARM usage of OF is required. >> >> Signed-off-by: Magnus Damm <damm+renesas@xxxxxxxxxxxxx > > While I'm not such a big fan of *_OF_DECLARE() (it doesn't support deferred > probing, which is needed for any device with dependencies, like clocks and > power domains), what's the rationale for not using IOMMU_OF_DECLARE() > on arm32, and thus the need for setup_done? ARM32 could (and should) be converted over to IOMMU_OF_DECLARE(), but it is just a matter of timing. If we try to do it before ARM32 is converted over to CONFIG_IOMMU_DMA=y then we have to handle all the hairy legacy implementation details of IOMMU support in case of CONFIG_IOMMU_DMA=n _and_ deal with just moving over the init order bits to OF. Testing and keeping all the combinations working is a lot of work. I prefer to kill two birds with one stone and do a larger feature jump and move over ARM32 to same state of ARM64 (with OF init) once CONFIG_IOMMU_DMA=y is ready for 32-bit ARM. Just changing the init order bits to OF while keeping legacy CONFIG_IOMMU_DMA=n code is introducing potential errors with not much upside. Unless there is some other reason to do it that I can't see that is. =) Cheers, / magnus