From: Kevin Hao <haokexin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Scott Wood <scottwood@freescale.com>,
Mike Turquette <mturquette@linaro.org>,
Jingchang Lu <jingchang.lu@freescale.com>
Subject: [PATCH 1/2] powerpc: move ppc_init() to common place
Date: Thu, 16 Oct 2014 19:18:40 +0800 [thread overview]
Message-ID: <1413458321-23880-2-git-send-email-haokexin@gmail.com> (raw)
In-Reply-To: <1413458321-23880-1-git-send-email-haokexin@gmail.com>
So they can be used by ppc64 board. Also remove the unneeded {} to
make checkpatch happy.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
arch/powerpc/include/asm/machdep.h | 2 +-
arch/powerpc/kernel/setup-common.c | 15 +++++++++++++++
arch/powerpc/kernel/setup_32.c | 15 ---------------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 307347f8ddbd..4b913d53333b 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -213,11 +213,11 @@ struct machdep_calls {
int (*set_dawr)(unsigned long dawr,
unsigned long dawrx);
-#ifdef CONFIG_PPC32 /* XXX for now */
/* A general init function, called by ppc_init in init/main.c.
May be NULL. */
void (*init)(void);
+#ifdef CONFIG_PPC32 /* XXX for now */
void (*kgdb_map_scc)(void);
/*
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 1362cd62b3fa..f76d4a1dbe73 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -750,3 +750,18 @@ void arch_setup_pdev_archdata(struct platform_device *pdev)
pdev->dev.dma_mask = &pdev->archdata.dma_mask;
set_dma_ops(&pdev->dev, &dma_direct_ops);
}
+
+int __init ppc_init(void)
+{
+ /* clear the progress line */
+ if (ppc_md.progress)
+ ppc_md.progress(" ", 0xffff);
+
+ /* call platform init */
+ if (ppc_md.init != NULL)
+ ppc_md.init();
+
+ return 0;
+}
+
+arch_initcall(ppc_init);
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 07831ed0d9ef..59d8c6e15782 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -208,21 +208,6 @@ EXPORT_SYMBOL(nvram_sync);
#endif /* CONFIG_NVRAM */
-int __init ppc_init(void)
-{
- /* clear the progress line */
- if (ppc_md.progress)
- ppc_md.progress(" ", 0xffff);
-
- /* call platform init */
- if (ppc_md.init != NULL) {
- ppc_md.init();
- }
- return 0;
-}
-
-arch_initcall(ppc_init);
-
static void __init irqstack_early_init(void)
{
unsigned int i;
--
1.9.3
next prev parent reply other threads:[~2014-10-16 11:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 11:18 [PATCH 0/2] fix a kernel panic on fsl corenet board when CONFIG_CLK_PPC_CORENET is enabled Kevin Hao
2014-10-16 11:18 ` Kevin Hao [this message]
2014-10-16 21:54 ` [PATCH 1/2] powerpc: move ppc_init() to common place Scott Wood
2014-10-16 22:34 ` Kevin Hao
2014-10-16 11:18 ` [PATCH 2/2] clk: ppc-corenet: don't use platform_driver to init the clock device Kevin Hao
2014-10-16 21:55 ` Scott Wood
2014-10-16 22:55 ` Kevin Hao
2014-10-17 5:58 ` Scott Wood
2014-10-19 5:52 ` Kevin Hao
2014-10-16 21:49 ` [PATCH 0/2] fix a kernel panic on fsl corenet board when CONFIG_CLK_PPC_CORENET is enabled Scott Wood
2014-10-16 22:31 ` Kevin Hao
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=1413458321-23880-2-git-send-email-haokexin@gmail.com \
--to=haokexin@gmail.com \
--cc=jingchang.lu@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mturquette@linaro.org \
--cc=scottwood@freescale.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 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).