linux-mips
[Top] [All Lists]

Re: [patch] pnx8xxx clocksource cleanups

To: Vitaly Wool <vitalywool@gmail.com>
Subject: Re: [patch] pnx8xxx clocksource cleanups
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date: Sat, 12 Jan 2008 20:21:02 +0300
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
In-reply-to: <4788BAAC.3020908@gmail.com>
Organization: MontaVista Software Inc.
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4788BAAC.3020908@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.2) Gecko/20040803
Hello.

Vitaly Wool wrote:

This patch does some PNX8XXX clocksource cleanups.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>

Index: linux-mips.git/arch/mips/philips/pnx8550/common/time.c
===================================================================
--- linux-mips.git.orig/arch/mips/philips/pnx8550/common/time.c
+++ linux-mips.git/arch/mips/philips/pnx8550/common/time.c
@@ -47,11 +47,6 @@ static struct clocksource pnx_clocksourc
    .flags        = CLOCK_SOURCE_IS_CONTINUOUS,
};

-static void timer_ack(void)
-{
-    write_c0_compare(cpj);
-}
-
static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id)
{
    struct clock_event_device *c = dev_id;
@@ -94,30 +89,22 @@ static struct clock_event_device pnx8xxx
    .set_next_event = pnx8xxx_set_next_event,
};

-/*
- * plat_time_init() - it does the following things:
- *
- * 1) plat_time_init() -
- *     a) (optional) set up RTC routines,
- *      b) (optional) calibrate and set the mips_hpt_frequency
- * (only needed if you intended to use cpu counter as timer interrupt
- *         source)
- */
+static inline void timer_ack(void)
+{
+    write_c0_compare(cpj);
+}

I still don't understand why you need this function at all, and the 'cpj' variable as well -- clockevents core will set the comparator to a needed value. Also, I don't see much value in moving that function...

WBR, Sergei

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