From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"balbi-l0cyMroinI0@public.gmane.org"
<balbi-l0cyMroinI0@public.gmane.org>,
"arnd-r2nGTMty4D4@public.gmane.org"
<arnd-r2nGTMty4D4@public.gmane.org>,
"ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org"
<ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org"
<olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
"linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org"
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
"grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org"
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
"gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org"
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
"ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org"
<ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>,
"linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org"
<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
"myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
<myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: [PATCHv3 1/4] ARM: tegra: Add Tegra AHB driver
Date: Fri, 04 May 2012 10:48:56 -0600 [thread overview]
Message-ID: <4FA40878.7070709@wwwdotorg.org> (raw)
In-Reply-To: <20120504.091736.839941449020176796.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 05/04/2012 12:17 AM, Hiroshi Doyu wrote:
> Stephen Warren wrote at Thu, 3 May 2012 19:41:35 +0200:
>> On 05/03/2012 10:05 AM, Hiroshi DOYU wrote:
>>> Tegra AHB Bus conforms to the AMBA Specification (Rev 2.0) Advanced
>>> High-performance Bus (AHB) architecture.
...
>>> +static int __init tegra_ahb_module_init(void)
>>> +{
>>> + return platform_driver_register(&tegra_ahb_driver);
>>> +}
>>> +postcore_initcall(tegra_ahb_module_init);
>>
>> Can this be a module_init() instead of postcore_initcall()?
>
> Since this driver configures prefetch size from AHB client devices,
> it's better to make this driver available before other AHB client
> drivers get ready. So "postcore_initcall()" seems to make sense if
> there's no other better initcall.
I believe this only affects when the driver is registered and has no
influence over when the device itself is probed.
When booting with board files rather than DT, it was possible to
register drivers and platform devices early using various initcalls to
control the order. However, with DT, I believe all the devices are
instantiated from DT at the same time (well, one by one in whatever
order as the DT is parsed), so the time when the driver is registered
isn't relevant.
So, if the other AHB devices really need this AHB driver to initialize
first, you'd better move all the AHB devices inside the AHB node in DT,
so that the AHB driver can influence when the children get probed.
Still, I'd suggest leaving that to a later patch, since everything
clearly works fine right now without this driver even existing.
>>> +
>>> +static void __exit tegra_ahb_module_exit(void)
>>> +{
>>> + platform_driver_unregister(&tegra_ahb_driver);
>>> +}
>>> +module_exit(tegra_ahb_module_exit);
>>
>> If so, all of the previous two quoted chunks can be replaced with just:
>>
>> module_platform_driver(tegra_ahb_module_init);
next prev parent reply other threads:[~2012-05-04 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 16:05 [PATCHv3 1/4] ARM: tegra: Add Tegra AHB driver Hiroshi DOYU
[not found] ` <1336061147-10245-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-03 17:41 ` Stephen Warren
[not found] ` <4FA2C34F.5060406-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-04 6:17 ` Hiroshi Doyu
[not found] ` <20120504.091736.839941449020176796.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-04 16:48 ` Stephen Warren [this message]
[not found] ` <4FA40878.7070709-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-07 6:06 ` Hiroshi Doyu
2012-05-03 17:59 ` Stephen Warren
[not found] ` <4FA2C785.2080703-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-04 6:40 ` Hiroshi Doyu
[not found] ` <20120504.094030.1816474762821188264.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-04 8:40 ` Arnd Bergmann
2012-05-04 16:50 ` Stephen Warren
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=4FA40878.7070709@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).