From: Sylvain Munaut <tnt@246tNt.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Linux PPC Dev ML <linuxppc-dev@ozlabs.org>,
Sylvain Munaut <tnt@246tNt.com>
Subject: [PATCH 04/10] powerpc: Use common 52xx of_platform probe code for EFIKA
Date: Mon, 12 Feb 2007 23:13:22 +0100 [thread overview]
Message-ID: <11713184132161-git-send-email-tnt@246tNt.com> (raw)
In-Reply-To: <11713184112187-git-send-email-tnt@246tNt.com>
Now that the device tree has the good properties, we can
remove all the efika_init code by a single call to common code.
While we're modifying that file, a few whitespaces/alignement/typo
fixes are made (nothing significant).
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/platforms/52xx/efika-setup.c | 64 ++++++++---------------------
1 files changed, 18 insertions(+), 46 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c
index 110c980..d61ce84 100644
--- a/arch/powerpc/platforms/52xx/efika-setup.c
+++ b/arch/powerpc/platforms/52xx/efika-setup.c
@@ -2,7 +2,7 @@
*
* Efika 5K2 platform setup
* Some code really inspired from the lite5200b platform.
- *
+ *
* Copyright (C) 2006 bplan GmbH
*
* This file is licensed under the terms of the GNU General Public License
@@ -81,35 +81,7 @@ #endif
efika_pcisetup();
if (ppc_md.progress)
- ppc_md.progress("Linux/PPC " UTS_RELEASE " runnung on Efika ;-)\n", 0x0);
-}
-
-static void __init efika_init(void)
-{
- struct device_node *np;
- struct device_node *cnp = NULL;
- const u32 *base;
-
- /* Find every child of the SOC node and add it to of_platform */
- np = of_find_node_by_name(NULL, "builtin");
- if (np) {
- char name[BUS_ID_SIZE];
- while ((cnp = of_get_next_child(np, cnp))) {
- strcpy(name, cnp->name);
-
- base = get_property(cnp, "reg", NULL);
- if (base == NULL)
- continue;
-
- snprintf(name+strlen(name), BUS_ID_SIZE, "@%x", *base);
- of_platform_device_create(cnp, name, NULL);
-
- printk(KERN_INFO EFIKA_PLATFORM_NAME" : Added %s (type '%s' at '%s') to the known devices\n", name, cnp->type, cnp->full_name);
- }
- }
-
- if (ppc_md.progress)
- ppc_md.progress(" Have fun with your Efika! ", 0x7777);
+ ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
}
static int __init efika_probe(void)
@@ -131,20 +103,20 @@ static int __init efika_probe(void)
define_machine(efika)
{
- .name = EFIKA_PLATFORM_NAME,
- .probe = efika_probe,
- .setup_arch = efika_setup_arch,
- .init = efika_init,
- .show_cpuinfo = efika_show_cpuinfo,
- .init_IRQ = mpc52xx_init_irq,
- .get_irq = mpc52xx_get_irq,
- .restart = rtas_restart,
- .power_off = rtas_power_off,
- .halt = rtas_halt,
- .set_rtc_time = rtas_set_rtc_time,
- .get_rtc_time = rtas_get_rtc_time,
- .progress = rtas_progress,
- .get_boot_time = rtas_get_boot_time,
- .calibrate_decr = generic_calibrate_decr,
- .phys_mem_access_prot = pci_phys_mem_access_prot,
+ .name = EFIKA_PLATFORM_NAME,
+ .probe = efika_probe,
+ .setup_arch = efika_setup_arch,
+ .init = mpc52xx_declare_of_platform_devices,
+ .show_cpuinfo = efika_show_cpuinfo,
+ .init_IRQ = mpc52xx_init_irq,
+ .get_irq = mpc52xx_get_irq,
+ .restart = rtas_restart,
+ .power_off = rtas_power_off,
+ .halt = rtas_halt,
+ .set_rtc_time = rtas_set_rtc_time,
+ .get_rtc_time = rtas_get_rtc_time,
+ .progress = rtas_progress,
+ .get_boot_time = rtas_get_boot_time,
+ .calibrate_decr = generic_calibrate_decr,
+ .phys_mem_access_prot = pci_phys_mem_access_prot,
};
--
1.4.2
next prev parent reply other threads:[~2007-02-12 22:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 22:13 [PATCH 00/10] Mainly 52xx patches for 2.6.21 (but not only) Sylvain Munaut
2007-02-12 22:13 ` [PATCH 01/10] powerpc/serial: Dispose irq mapping when done in mpc52xx_serial.c Sylvain Munaut
2007-02-12 22:13 ` [PATCH 02/10] powerpc: Add device tree fixups for the EFIKA Sylvain Munaut
2007-02-12 22:13 ` [PATCH 03/10] powerpc: Restore 'proper' link order in platform Sylvain Munaut
2007-02-12 22:13 ` Sylvain Munaut [this message]
2007-02-12 22:13 ` [PATCH 05/10] powerpc: Fix unbalanced of_node_{get, put} in efika-setup.c Sylvain Munaut
2007-02-12 22:13 ` [PATCH 06/10] powerpc: Small cleanup of EFIKA platform Sylvain Munaut
2007-02-12 22:13 ` [PATCH 07/10] powerpc: Add a unified uevent handler for bus based on of_device Sylvain Munaut
2007-02-12 22:13 ` [PATCH 08/10] macintosh: Use the new of_device common uevent handler Sylvain Munaut
2007-02-12 22:13 ` [PATCH 09/10] powerpc: Add uevent handler for of_platform_bus Sylvain Munaut
2007-02-12 22:13 ` [PATCH 10/10] powerpc: Add uevent handler for ibmebus Sylvain Munaut
2007-03-29 14:46 ` Olaf Hering
2007-03-30 11:27 ` Hoang-Nam Nguyen
2007-03-30 11:45 ` Sylvain Munaut
2007-03-27 6:30 ` [PATCH 08/10] macintosh: Use the new of_device common uevent handler Benjamin Herrenschmidt
2007-03-27 7:11 ` Sylvain Munaut
2007-03-28 10:29 ` Johannes Berg
2007-03-28 10:58 ` Sylvain Munaut
2007-03-28 11:10 ` Johannes Berg
2007-02-12 23:06 ` [PATCH 02/10] powerpc: Add device tree fixups for the EFIKA Kumar Gala
2007-02-12 23:11 ` Sylvain Munaut
2007-02-12 23:18 ` Benjamin Herrenschmidt
2007-02-12 23:12 ` Benjamin Herrenschmidt
2007-02-12 23:25 ` Sylvain Munaut
2007-02-13 0:20 ` Benjamin Herrenschmidt
2007-02-16 16:44 ` Segher Boessenkool
2007-02-12 23:10 ` [PATCH 01/10] powerpc/serial: Dispose irq mapping when done in mpc52xx_serial.c Benjamin Herrenschmidt
2007-02-15 22:18 ` [PATCH] " Sylvain Munaut
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=11713184132161-git-send-email-tnt@246tNt.com \
--to=tnt@246tnt.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).