linux-mips
[Top] [All Lists]

Re: [MIPS] PNX8550: Fix system timer support

To: linux-mips@linux-mips.org
Subject: Re: [MIPS] PNX8550: Fix system timer support
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 09 Jan 2007 10:23:00 +0900 (JST)
Cc: ralf@linux-mips.org, danieljlaird@hotmail.com
In-reply-to: <S28574475AbXAHSAL/20070108180011Z+188138@ftp.linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <S28574475AbXAHSAL/20070108180011Z+188138@ftp.linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 08 Jan 2007 18:00:06 +0000, linux-mips@linux-mips.org wrote:
> Author: Vitaly Wool <vitalywool@gmail.com> Thu Dec 28 17:14:05 2006 +0300
> Comitter: Ralf Baechle <ralf@linux-mips.org> Mon Jan 8 17:48:25 2007 +0000
> Commit: 390964852cbd7d5c589de60223d7cf73e9cbcdb9
> Gitweb: http://www.linux-mips.org/g/linux/39096485
> Branch: master
> 
> the patch inlined below restores proper time accounting for PNX8550-based
> boards. It also gets rid of #ifdef in the generic code which becomes
> unnecessary then.
> 
> It's functionally identical to the previous patch with the same name but
> it has minor comments from Atsushi and Sergei taken into account.

Please apply this patch too.  Daniel confirmed this patch fixes a long
hang on boot.

Subject: PNX8550: Fix system timer initialization

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/philips/pnx8550/common/time.c 
b/arch/mips/philips/pnx8550/common/time.c
index 08ebc3d..9d9fc71 100644
--- a/arch/mips/philips/pnx8550/common/time.c
+++ b/arch/mips/philips/pnx8550/common/time.c
@@ -80,6 +80,7 @@ void pnx8550_time_init(void)
         */
        mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p));
        cpj = (mips_hpt_frequency + HZ / 2) / HZ;
+       write_c0_count(0);
        timer_ack();
 
        /* Setup Timer 2 */


<Prev in Thread] Current Thread [Next in Thread>