All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: viresh kumar <viresh.kumar@st.com>
Cc: "Koul, Vinod" <vinod.koul@intel.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	Armando VISCONTI <armando.visconti@st.com>,
	Shiraz HASHIM <shiraz.hashim@st.com>,
	"viresh.linux@gmail.com" <viresh.linux@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dw_dmac: Replace subsys_init() with arch_initcall()
Date: Wed, 18 May 2011 14:21:00 +0200	[thread overview]
Message-ID: <BANLkTi=zrr4==Uatq3zbdE1K+1_9ELOBZQ@mail.gmail.com> (raw)
In-Reply-To: <4DD20D89.9020402@st.com>

2011/5/17 viresh kumar <viresh.kumar@st.com>:

> SPI bus is required for regulators and so probably he can't have
> module_init() for amba-pl022.

Nope. Regulators have to be at subsystem_init() because lots
of  drivers called in module_init() == driver_init() will need
to enable them to even be able to talk to the hardware they
are regulating.

e.g. an externally powered I2C device. If you cannot put power
to it you cannot probe it.

Then you end up in a dependency: we need to have SPI
to enble the regulators - the SPI device containing the
regulators is a device that is self-powered.

So then of course the SPI bus controller has to be
available, so it has to be subsys_initcall() as well.
Luckily as it happens it is earlier in the linkfile than
regulators, so using the same initlevel as regulators
will work (else we would be in hell).

But since the PL022 uses DMA, we have to have DMA
before SPI, and it is currently linked *after* SPI in the
Makefile.

> @Linus: What do you say? Can we get back to module_init() for amba-pl022?
> And subsys_initcall() for DMA.

No, but I sent a patch that will make it possible to have both
as subsys_init(), check it out, it seems to work for me.

Can you test it? (Sorry forgot to add you on CC, title is
"[PATCH] dmaengine: move link order".

Yours,
Linus Walleij

  reply	other threads:[~2011-05-18 12:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16  4:50 [PATCH] dw_dmac: Replace subsys_init() with arch_initcall() Viresh Kumar
2011-05-16 16:06 ` Koul, Vinod
2011-05-17  4:06   ` viresh kumar
2011-05-17  3:43     ` Koul, Vinod
2011-05-17  5:54       ` viresh kumar
2011-05-18 12:21         ` Linus Walleij [this message]
2011-05-19  5:21           ` viresh kumar
2011-05-19 11:23             ` Koul, Vinod
2011-05-20  3:44               ` viresh kumar

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='BANLkTi=zrr4==Uatq3zbdE1K+1_9ELOBZQ@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=armando.visconti@st.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shiraz.hashim@st.com \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@st.com \
    --cc=viresh.linux@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.