linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Kirkwood: Fix crash when neither NAND nor SPI
Date: Fri,  8 Jun 2012 16:09:42 +0200	[thread overview]
Message-ID: <1339164583-11596-1-git-send-email-andrew@lunn.ch> (raw)

Both NAND and SPI make use of the RUNIT clk. However, if neither NAND
nor SPI is used in the system, RUNIT clock gets turned off, and the
SoC hard locks. It appears something else in the SoC, which is not
documented, is also using RUNIT. So prepare and enable RUNIT clock in
kirkwood_clk_init().

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/mach-kirkwood/common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 25fb3fd..97f7d36 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -238,6 +238,10 @@ void __init kirkwood_clk_init(void)
 	orion_clkdev_add("0", "pcie", pex0);
 	orion_clkdev_add("1", "pcie", pex1);
 	orion_clkdev_add(NULL, "kirkwood-i2s", audio);
+
+	/* Something other than SPI and NAND needs runit, so make sure
+	   it never gets turned off. */
+	clk_prepare_enable(runit);
 }
 
 /*****************************************************************************
-- 
1.7.10

             reply	other threads:[~2012-06-08 14:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 14:09 Andrew Lunn [this message]
2012-06-08 15:34 ` [PATCH] ARM: Kirkwood: Fix crash when neither NAND nor SPI Arnd Bergmann
2012-06-08 16:42   ` Andrew Lunn
2012-06-08 17:42     ` Jon Medhurst (Tixy)
2012-06-08 18:43       ` Andrew Lunn
2012-06-10 18:09 ` Simon Baatz
2012-06-10 20:13   ` Andrew Lunn
2012-06-10 20:33     ` Simon Baatz
2012-06-11 12:17   ` Andrew Lunn

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=1339164583-11596-1-git-send-email-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.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).