From: Rob Herring <robh@kernel.org>
To: Chris Zankel <chris@zankel.net>
Cc: linux-kernel@vger.kernel.org, linux-xtensa@linux-xtensa.org,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Guenter Roeck <linux@roeck-us.net>,
Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH] xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table"
Date: Tue, 26 Jul 2016 13:01:32 -0500 [thread overview]
Message-ID: <20160726180132.12764-1-robh@kernel.org> (raw)
This partially reverts commit 69d99e6c0d62 keeping only the main
purpose of the original commit which is the removal of
of_platform_populate() call. The moving of of_clk_init() caused changes
in the initialization order breaking booting.
Fixes: 69d99e6c0d621f ("xtensa: Remove unnecessary of_platform_populate with default match table")
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
This is on top of Guenter's build fix. Please test and I'll apply. I
tried briefly running under QEMU, but didn't have success. If anyone has
up to date instructions that would be helpful as using these[1] didn't
seem to work.
Rob
[1] http://wiki.linux-xtensa.org/index.php/Xtensa_on_QEMU
arch/xtensa/kernel/setup.c | 9 +++++++++
arch/xtensa/kernel/time.c | 2 --
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 6f68c60..143251e 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -22,6 +22,7 @@
#include <linux/bootmem.h>
#include <linux/kernel.h>
#include <linux/percpu.h>
+#include <linux/clk-provider.h>
#include <linux/cpu.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
@@ -251,6 +252,14 @@ void __init early_init_devtree(void *params)
strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
}
+static int __init xtensa_device_probe(void)
+{
+ of_clk_init(NULL);
+ return 0;
+}
+
+device_initcall(xtensa_device_probe);
+
#endif /* CONFIG_OF */
/*
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index 6ec73c9..b9ad9fe 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -15,7 +15,6 @@
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/time.h>
-#include <linux/clk-provider.h>
#include <linux/clocksource.h>
#include <linux/clockchips.h>
#include <linux/interrupt.h>
@@ -149,7 +148,6 @@ void __init time_init(void)
local_timer_setup(0);
setup_irq(this_cpu_ptr(&ccount_timer)->evt.irq, &timer_irqaction);
sched_clock_register(ccount_sched_clock_read, 32, ccount_freq);
- of_clk_init(NULL);
clocksource_probe();
}
--
2.9.2
next reply other threads:[~2016-07-26 18:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 18:01 Rob Herring [this message]
2016-07-26 18:50 ` [PATCH] xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table" Max Filippov
2016-07-26 19:13 ` Rob Herring
2016-07-26 19:49 ` Max Filippov
2016-07-27 6:56 ` Kefeng Wang
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=20160726180132.12764-1-robh@kernel.org \
--to=robh@kernel.org \
--cc=chris@zankel.net \
--cc=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linux@roeck-us.net \
--cc=wangkefeng.wang@huawei.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