public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: James Liao <jamesjj.liao@mediatek.com>
Cc: devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	Kevin Hilman <khilman@kernel.org>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Sascha Hauer <kernel@pengutronix.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/4] soc: mediatek: Init MT8173 scpsys driver earlier
Date: Thu, 31 Dec 2015 15:45:22 +0100	[thread overview]
Message-ID: <4141203.8f3N9nOLLy@wuerfel> (raw)
In-Reply-To: <1451553394.10610.14.camel@mtksdaap41>

On Thursday 31 December 2015 17:16:34 James Liao wrote:
> 
> """
> Take a example for our IOMMU(M4U) and SMI.  The IOMMU which is
> subsys_init defaultly will depend on SMI. 
> The SMI is a bridge between m4u and the Multimedia HW.  About the HW
> block diagram and more other information please help check  [1].
> SMI is responsible to enable/disable iommu and help transfer data for
> each Multimedia HW,  Both have to wait until the power and the clocks is
> enabled.  
> 
> So our iommu should probe done after smi, smi should be after
> power-domain, and all the iommu consumer(display/vdec/venc/camera etc.)
> should be after the iommu.
> Then all the multimedia module will be delayed by power-domain who is
> module_init currently.
> 
> After grep, we get some example whose  pm is not module_init:
> core_initcall(exynos4_pm_init_power_domain);
> subsys_initcall(imx_pgc_init);
> 
> So we expect move the power-domain initial more earlier too.  The
> power-domain seems to be a basic module like ccf.
> Is there some special reason about we should use module_init,  or do you
> have any concern if we change it?
> Thanks.

Ok, got it. Generally, we should try to avoid using the earlier initcall
levels, but a few things like clock controllers, iommus etc are special
enough that we need to make sure their dependencies are there by the
time those are probed.

Please put your explanation above into the patch changelog and add a code
comment about the IOMMU next to the subsys_initcall() so it doesn't
accidentally get changed when someone tries to do a code cleanup.

	Arnd

  reply	other threads:[~2015-12-31 14:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  6:41 [PATCH 0/4] Mediatek MT2701 SCPSYS power domain support James Liao
     [not found] ` <1451457706-14798-1-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-12-30  6:41   ` [PATCH 1/4] soc: mediatek: Separate scpsys driver common code James Liao
2015-12-30  8:52     ` Arnd Bergmann
2015-12-30 10:08       ` James Liao
2015-12-30  6:41   ` [PATCH 2/4] soc: mediatek: Init MT8173 scpsys driver earlier James Liao
     [not found]     ` <1451457706-14798-3-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-12-30  8:52       ` Arnd Bergmann
2015-12-30 10:12         ` James Liao
2015-12-30 10:35           ` Arnd Bergmann
2015-12-31  5:59             ` James Liao
2015-12-31  9:16               ` James Liao
2015-12-31 14:45                 ` Arnd Bergmann [this message]
2016-01-04  2:52                   ` James Liao
2015-12-30  6:41   ` [PATCH 3/4] soc: mediatek: Add MT2701 power dt-bindings James Liao
2015-12-30  6:41   ` [PATCH 4/4] soc: mediatek: Add MT2701/MT7623 scpsys driver James Liao
     [not found]     ` <1451457706-14798-5-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-12-30  9:01       ` Daniel Kurtz
2015-12-30 10:18         ` James Liao
2015-12-30 17:49           ` Matthias Brugger
2016-01-05  5:23             ` James Liao
2016-01-08 11:26               ` Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4141203.8f3N9nOLLy@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=jamesjj.liao@mediatek.com \
    --cc=kernel@pengutronix.de \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=srv_heupstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox