linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* imx6q restart is broken
@ 2012-08-08 10:18 Shawn Guo
  2012-08-08 10:53 ` Dirk Behme
  0 siblings, 1 reply; 26+ messages in thread
From: Shawn Guo @ 2012-08-08 10:18 UTC (permalink / raw)
  To: linux-arm-kernel

Thanks Dirk for reporting that imx6q restart (reboot command) is broken.

I tracked down the issue a little bit and found imx6q_restart hangs
on the of_iomap/ioremap call.  The following change, moving the call
somewhere else than imx6q_restart, will just fix the problem.

Does that mean ioremap call is not allowed in platform restart hook?
I'm not sure about that, because I found it works just fine if I build
imx_v6_v7_defconfig with V6 (imx3) platforms excluded (IOW, build a V7
only kernel - imx5 and imx6), which is the case how I tested imx6q
restart feature when I was adding it.

To summarize, the imx6q_restart hangs at ioremap call on a V6 + V7
kernel, while it works fine on a V7 only image.  I need some help to
understand that.

Regards,
Shawn

--8<---

diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 5ec0608..01e7489 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -37,14 +37,10 @@
 #include <mach/cpuidle.h>
 #include <mach/hardware.h>

+static void __iomem *wdog_base;

 void imx6q_restart(char mode, const char *cmd)
 {
-       struct device_node *np;
-       void __iomem *wdog_base;
-
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-wdt");
-       wdog_base = of_iomap(np, 0);
        if (!wdog_base)
                goto soft;

@@ -159,6 +155,11 @@ static void __init imx6q_usb_init(void)

 static void __init imx6q_init_machine(void)
 {
+       struct device_node *np;
+
+       np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-wdt");
+       wdog_base = of_iomap(np, 0);
+
        /*
         * This should be removed when all imx6q boards have pinctrl
         * states for devices defined in device tree.

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2012-08-19 15:26 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-08 10:18 imx6q restart is broken Shawn Guo
2012-08-08 10:53 ` Dirk Behme
2012-08-09  3:18   ` Hui Wang
2012-08-09  4:41     ` Shawn Guo
2012-08-09  6:32       ` Sascha Hauer
2012-08-09  8:06       ` Catalin Marinas
2012-08-09  8:18         ` Shawn Guo
2012-08-09  9:20     ` Russell King - ARM Linux
2012-08-09 12:01       ` Shawn Guo
2012-08-09 12:22         ` Shawn Guo
2012-08-09 13:57           ` Russell King - ARM Linux
2012-08-09 14:01             ` Russell King - ARM Linux
2012-08-09 14:24               ` Shawn Guo
2012-08-09 19:03       ` Matt Sealey
2012-08-09 21:07         ` Russell King - ARM Linux
2012-08-10 13:33           ` Matt Sealey
2012-08-10 13:53             ` Russell King - ARM Linux
2012-08-15 15:07       ` Rob Herring
2012-08-15 21:44         ` Russell King - ARM Linux
2012-08-16  2:31           ` Shawn Guo
2012-08-16 17:21             ` Matt Sealey
2012-08-16 22:34             ` Russell King - ARM Linux
2012-08-17  3:48               ` Shawn Guo
2012-08-17  8:11                 ` Hui Wang
2012-08-19 15:26                 ` Shawn Guo
2012-08-16  8:41           ` Catalin Marinas

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).