From: Kevin Hao <haokexin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Rob Herring <robh+dt@kernel.org>
Subject: [PATCH 2/5] powerpc: introduce arch_enable_default_of_probe()
Date: Tue, 23 Aug 2016 10:06:56 +0800 [thread overview]
Message-ID: <1471918019-19472-3-git-send-email-haokexin@gmail.com> (raw)
In-Reply-To: <1471918019-19472-1-git-send-email-haokexin@gmail.com>
We can use this function to enable the default of probe for one
board.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
arch/powerpc/include/asm/setup.h | 1 +
arch/powerpc/kernel/of_platform.c | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
index 654d64c9f3ac..213719882fe4 100644
--- a/arch/powerpc/include/asm/setup.h
+++ b/arch/powerpc/include/asm/setup.h
@@ -24,6 +24,7 @@ extern void reloc_got2(unsigned long);
void check_for_initrd(void);
void initmem_init(void);
void setup_panic(void);
+extern void arch_enable_default_of_probe(void);
#define ARCH_PANIC_TIMEOUT 180
#ifdef CONFIG_PPC_PSERIES
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index ace7fe132b6f..77402a14e928 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -123,7 +123,14 @@ device_initcall(of_pci_phb_init);
#endif /* CONFIG_PPC_OF_PLATFORM_PCI */
+static bool default_of_probe_enabled;
+
bool __init arch_want_default_of_probe(void)
{
- return false;
+ return default_of_probe_enabled;
+}
+
+void __init arch_enable_default_of_probe(void)
+{
+ default_of_probe_enabled = true;
}
--
2.5.5
next prev parent reply other threads:[~2016-08-23 2:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 2:06 [PATCH 0/5] ppc32: use the default of_platform_default_populate_init() for 83xx boards Kevin Hao
2016-08-23 2:06 ` [PATCH 1/5] of/platform: introduce arch_want_default_of_probe() Kevin Hao
2016-08-23 2:06 ` Kevin Hao [this message]
2016-08-23 2:06 ` [PATCH 3/5] of/platform: introduce a generic way to declare a platform bus Kevin Hao
2016-08-25 13:44 ` Rob Herring
2016-08-27 7:40 ` Kevin Hao
2016-08-23 2:06 ` [PATCH 4/5] powerpc/83xx: factor out the common codes of setup arch functions Kevin Hao
2016-08-23 2:06 ` [PATCH 5/5] powerpc/83xx: enable the default of probe 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=1471918019-19472-3-git-send-email-haokexin@gmail.com \
--to=haokexin@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=robh+dt@kernel.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).