public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: fix mach-versatile booting in qemu
Date: Wed, 14 Jul 2010 17:16:09 +0200	[thread overview]
Message-ID: <201007141716.09384.arnd@arndb.de> (raw)

The versatile platform has not been able to boot in qemu since 2.6.34-rc2,
because e388771 "ARM: Realview/Versatile: separate out common SP804
timer code" changed the behavior of the versatile_set_mode function.

This restores the original way it worked until 2.6.34-rc1.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I found this with git-bisect. I do not know wether the old behavior
that this reverts to is sensible, but it's how both versatile and
realview have been doing it since they first started using clockevents.

I also don't know if the same problem exists on actual versatile
hardware or if it's really a qemu bug.

Please apply in combination with common sense. If it's correct, do
we also want the same change in 2.6.34.x-stable?

--- a/arch/arm/plat-versatile/timer-sp.c
+++ b/arch/arm/plat-versatile/timer-sp.c
@@ -90,8 +90,6 @@ static void sp804_set_mode(enum clock_event_mode mode,
 {
 	unsigned long ctrl = TIMER_CTRL_32BIT | TIMER_CTRL_IE;
 
-	writel(ctrl, clkevt_base + TIMER_CTRL);
-
 	switch (mode) {
 	case CLOCK_EVT_MODE_PERIODIC:
 		writel(TIMER_RELOAD, clkevt_base + TIMER_LOAD);
@@ -106,6 +104,7 @@ static void sp804_set_mode(enum clock_event_mode mode,
 	case CLOCK_EVT_MODE_UNUSED:
 	case CLOCK_EVT_MODE_SHUTDOWN:
 	default:
+		ctrl = 0;
 		break;
 	}
 

             reply	other threads:[~2010-07-14 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 15:16 Arnd Bergmann [this message]
2010-07-14 17:23 ` [PATCH] arm: fix mach-versatile booting in qemu Rabin Vincent
2010-07-14 17:55   ` Arnd Bergmann
2010-07-14 20:03 ` Russell King - ARM Linux

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=201007141716.09384.arnd@arndb.de \
    --to=arnd@arndb.de \
    --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