From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: olof@lixom.net, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/5] [POWERPC] powermac: Use machine_*_initcall() hooks in platform code
Date: Thu, 03 Jan 2008 07:20:23 +1100 [thread overview]
Message-ID: <1199305223.6751.28.camel@pasglop> (raw)
In-Reply-To: <20080102191424.24178.41726.stgit@trillian.secretlab.ca>
On Wed, 2008-01-02 at 12:14 -0700, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Ack.
>
> arch/powerpc/platforms/powermac/low_i2c.c | 7 ++-----
> arch/powerpc/platforms/powermac/pfunc_base.c | 3 +--
> arch/powerpc/platforms/powermac/pic.c | 3 +--
> arch/powerpc/platforms/powermac/setup.c | 12 ++----------
> 4 files changed, 6 insertions(+), 19 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
> index da2007e..9c9299c 100644
> --- a/arch/powerpc/platforms/powermac/low_i2c.c
> +++ b/arch/powerpc/platforms/powermac/low_i2c.c
> @@ -1462,9 +1462,6 @@ int __init pmac_i2c_init(void)
> return 0;
> i2c_inited = 1;
>
> - if (!machine_is(powermac))
> - return 0;
> -
> /* Probe keywest-i2c busses */
> kw_i2c_probe();
>
> @@ -1483,7 +1480,7 @@ int __init pmac_i2c_init(void)
>
> return 0;
> }
> -arch_initcall(pmac_i2c_init);
> +machine_arch_initcall(powermac, pmac_i2c_init);
>
> /* Since pmac_i2c_init can be called too early for the platform device
> * registration, we need to do it at a later time. In our case, subsys
> @@ -1515,4 +1512,4 @@ static int __init pmac_i2c_create_platform_devices(void)
>
> return 0;
> }
> -subsys_initcall(pmac_i2c_create_platform_devices);
> +machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
> diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
> index 45d54b9..db20de5 100644
> --- a/arch/powerpc/platforms/powermac/pfunc_base.c
> +++ b/arch/powerpc/platforms/powermac/pfunc_base.c
> @@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void)
>
> return 0;
> }
> -
> -arch_initcall(pmac_pfunc_base_install);
> +machine_arch_initcall(powermac, pmac_pfunc_base_install);
>
> #ifdef CONFIG_PM
>
> diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
> index 999f5e1..cd72164 100644
> --- a/arch/powerpc/platforms/powermac/pic.c
> +++ b/arch/powerpc/platforms/powermac/pic.c
> @@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void)
> sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
> return 0;
> }
> -
> -subsys_initcall(init_pmacpic_sysfs);
> +machine_subsys_initcall(powermac, init_pmacpic_sysfs);
>
> diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
> index adad4e9..36ff1b6 100644
> --- a/arch/powerpc/platforms/powermac/setup.c
> +++ b/arch/powerpc/platforms/powermac/setup.c
> @@ -397,17 +397,13 @@ static int initializing = 1;
>
> static int pmac_late_init(void)
> {
> - if (!machine_is(powermac))
> - return -ENODEV;
> -
> initializing = 0;
> /* this is udbg (which is __init) and we can later use it during
> * cpu hotplug (in smp_core99_kick_cpu) */
> ppc_md.progress = NULL;
> return 0;
> }
> -
> -late_initcall(pmac_late_init);
> +machine_late_initcall(powermac, pmac_late_init);
>
> /*
> * This is __init_refok because we check for "initializing" before
> @@ -534,9 +530,6 @@ static int __init pmac_declare_of_platform_devices(void)
> if (machine_is(chrp))
> return -1;
>
> - if (!machine_is(powermac))
> - return 0;
> -
> np = of_find_node_by_name(NULL, "valkyrie");
> if (np)
> of_platform_device_create(np, "valkyrie", NULL);
> @@ -551,8 +544,7 @@ static int __init pmac_declare_of_platform_devices(void)
>
> return 0;
> }
> -
> -device_initcall(pmac_declare_of_platform_devices);
> +machine_device_initcall(powermac, pmac_declare_of_platform_devices);
>
> /*
> * Called very early, MMU is off, device-tree isn't unflattened
next prev parent reply other threads:[~2008-01-02 20:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 19:14 [PATCH 0/5] Make platform code use machine_*_initcall() macros Grant Likely
2008-01-02 19:14 ` [PATCH 1/5] [POWERPC] powermac: Use machine_*_initcall() hooks in platform code Grant Likely
2008-01-02 20:20 ` Benjamin Herrenschmidt [this message]
2008-01-02 19:14 ` [PATCH 2/5] [POWERPC] cell: " Grant Likely
2008-01-02 19:25 ` Arnd Bergmann
2008-01-02 19:32 ` [PATCH 3/5] [POWERPC] pasemi: " Grant Likely
2008-01-02 20:30 ` Olof Johansson
2008-01-02 19:32 ` [PATCH 4/5] [POWERPC] 8xx: " Grant Likely
2008-01-03 17:37 ` Scott Wood
2008-01-03 17:52 ` Grant Likely
2008-01-02 19:33 ` [PATCH 5/5] [POWERPC] 8xxx and embedded6xx: " Grant Likely
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=1199305223.6751.28.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
/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.