From: Pratyush Anand <pratyush.anand@st.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Mohit KUMAR DCG <Mohit.KUMAR@st.com>,
"arnd@arndb.de" <arnd@arndb.de>,
spear-devel <spear-devel@list.st.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH V3 4/8] phy: Initialize phy core with subsys_initcall
Date: Thu, 30 Jan 2014 17:45:14 +0530 [thread overview]
Message-ID: <20140130121514.GA1857@pratyush-vbox> (raw)
In-Reply-To: <20140130115212.GA1171@pratyush-vbox>
On Thu, Jan 30, 2014 at 07:52:12PM +0800, Pratyush ANAND wrote:
> On Thu, Jan 30, 2014 at 07:43:37PM +0800, Kishon Vijay Abraham I wrote:
> > Hi,
> >
> > On Thursday 30 January 2014 04:18 PM, Mohit Kumar wrote:
> > > From: Pratyush Anand <pratyush.anand@st.com>
> > >
> > > PCIe RC drivers are initialized with subsys_initcall. Few PCIe drivers
> > > like SPEAr13xx needs phy drivers to be initialized.
> >
> > Instead change PCIe RC drivers to module init. Phy drivers should be loaded
> > very early otherwise. (Hint: drivers/Makefile).
>From hint, you mean that if makefile has pci entry (and hence RC
driver entry) before card drivers entry, then it insures that rc
driver's probe is called before card driver's probe?
I think, yes.
And if yes, then what you say is acceptable :)
Regards
Pratyush
>
> I think PCIe RC driver can not be made module init. Bjorn can comment
> better.
>
> All PCIe card drivers are initialized with module init. RC driver must
> have been initialized before any card driver initialization.
> Currently, card drivers does not have deferred probe concept, so I am
> not sure if keeping RC driver as module init will work always.
>
> By the way, is there any side effect of loading phy driver very early?
>
> Regards
> Pratyush
> >
> > Thanks
> > Kishon
> > >
> > > Therefore initialize phy core driver with subsys_initcall to avoid
> > > calling of phy_get before phy_class is created.
> > >
> > > Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
> > > Cc: Mohit Kumar <mohit.kumar@st.com>
> > > Cc: Kishon Vijay Abraham I <kishon@ti.com>
> > > Cc: Arnd Bergmann <arnd@arndb.de>
> > > Cc: spear-devel@list.st.com
> > > Cc: linux-kernel@vger.kernel.org
> > > ---
> > > drivers/phy/phy-core.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> > > index 03cf8fb..fa73101 100644
> > > --- a/drivers/phy/phy-core.c
> > > +++ b/drivers/phy/phy-core.c
> > > @@ -685,7 +685,7 @@ static int __init phy_core_init(void)
> > >
> > > return 0;
> > > }
> > > -module_init(phy_core_init);
> > > +subsys_initcall(phy_core_init);
> > >
> > > static void __exit phy_core_exit(void)
> > > {
> > >
> >
next prev parent reply other threads:[~2014-01-30 12:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 10:48 [PATCH V3 0/8] PCI:Add SPEAr13xx PCie support Mohit Kumar
2014-01-30 10:48 ` Mohit Kumar
2014-01-30 10:48 ` Mohit Kumar
2014-01-30 10:48 ` [PATCH V3 1/8] clk: SPEAr13xx: Fix pcie clock name Mohit Kumar
2014-01-30 10:48 ` [PATCH V3 2/8] SPEAr13xx: Fix static mapping table Mohit Kumar
2014-01-30 10:48 ` [PATCH V3 3/8] SPEAr13xx: defconfig: Update Mohit Kumar
2014-01-30 13:02 ` Arnd Bergmann
2014-01-31 8:50 ` Mohit KUMAR DCG
2014-01-30 10:48 ` [PATCH V3 4/8] phy: Initialize phy core with subsys_initcall Mohit Kumar
2014-01-30 11:43 ` Kishon Vijay Abraham I
2014-01-30 11:52 ` Pratyush Anand
2014-01-30 12:10 ` Kishon Vijay Abraham I
2014-01-30 12:15 ` Pratyush Anand [this message]
2014-01-30 12:25 ` Kishon Vijay Abraham I
2014-01-30 12:44 ` Arnd Bergmann
2014-01-31 3:48 ` Pratyush Anand
2014-01-31 15:25 ` Arnd Bergmann
2014-01-30 10:48 ` [PATCH V3 5/8] ata: ahci platform: Add phy hooks to make it more generic Mohit Kumar
2014-01-30 13:06 ` Arnd Bergmann
2014-01-31 3:52 ` Pratyush Anand
[not found] ` <cover.1391077731.git.mohit.kumar-qxv4g6HH51o@public.gmane.org>
2014-01-30 10:48 ` [PATCH V3 6/8] SPEAr13xx: Fixup: Move SPEAr1340 SATA platform code to phy driver Mohit Kumar
2014-01-30 10:48 ` Mohit Kumar
2014-01-30 13:21 ` Arnd Bergmann
2014-01-30 13:21 ` Arnd Bergmann
2014-01-31 4:12 ` Pratyush Anand
2014-01-31 4:12 ` Pratyush Anand
2014-01-31 15:27 ` Arnd Bergmann
2014-01-31 15:27 ` Arnd Bergmann
2014-01-30 10:48 ` [PATCH V3 7/8] pcie: SPEAr13xx: Add designware pcie support Mohit Kumar
2014-01-30 13:34 ` Arnd Bergmann
2014-01-30 13:44 ` Arnd Bergmann
2014-01-31 4:44 ` Pratyush Anand
2014-01-31 19:01 ` Arnd Bergmann
2014-02-01 6:32 ` Pratyush Anand
2014-02-03 0:06 ` Jingoo Han
2014-01-31 4:24 ` Pratyush Anand
2014-01-31 15:29 ` Arnd Bergmann
2014-01-30 10:48 ` [PATCH V3 8/8] MAINTAINERS: Add ST SPEAr13xx PCIe driver maintainer Mohit Kumar
2014-02-03 0:08 ` Jingoo Han
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=20140130121514.GA1857@pratyush-vbox \
--to=pratyush.anand@st.com \
--cc=Mohit.KUMAR@st.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spear-devel@list.st.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.