Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755432AbbLDRts (ORCPT ); Fri, 4 Dec 2015 12:49:48 -0500 Received: from mail2.asahi-net.or.jp ([202.224.39.198]:17956 "EHLO mail2.asahi-net.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753745AbbLDRsg (ORCPT ); Fri, 4 Dec 2015 12:48:36 -0500 From: Yoshinori Sato To: Daniel Lezcano , Thomas Gleixner Cc: Yoshinori Sato , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] clocksource: h8300: Change to overflow interrupt Date: Sat, 5 Dec 2015 02:48:14 +0900 Message-Id: <1449251298-29933-2-git-send-email-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1449251298-29933-1-git-send-email-ysato@users.sourceforge.jp> References: <1449251298-29933-1-git-send-email-ysato@users.sourceforge.jp> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2096 Lines: 69 Counter overflow detection use for overflow interrupt Signed-off-by: Yoshinori Sato --- drivers/clocksource/h8300_timer16.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c index fc14a3f..b14a8da 100644 --- a/drivers/clocksource/h8300_timer16.c +++ b/drivers/clocksource/h8300_timer16.c @@ -14,7 +14,6 @@ #include #define TSTR 0 -#define TISRA 4 #define TISRC 6 #define TCR 0 @@ -27,9 +26,8 @@ struct timer16_priv { void __iomem *mapcommon; unsigned short cs_enabled; unsigned char enb; - unsigned char imfa; - unsigned char imiea; unsigned char ovf; + unsigned char ovie; struct clk *clk; }; @@ -59,8 +57,8 @@ static irqreturn_t timer16_interrupt(int irq, void *dev_id) { struct timer16_priv *p = (struct timer16_priv *)dev_id; - writeb(readb(p->mapcommon + TISRA) & ~p->imfa, - p->mapcommon + TISRA); + writeb(readb(p->mapcommon + TISRC) & ~p->ovf, + p->mapcommon + TISRC); p->total_cycles += 0x10000; return IRQ_HANDLED; @@ -93,6 +91,8 @@ static int timer16_enable(struct clocksource *cs) writeb(0x83, p->mapbase + TCR); writeb(readb(p->mapcommon + TSTR) | p->enb, p->mapcommon + TSTR); + writeb(readb(p->mapcommon + TISRC) | p->ovie, + p->mapcommon + TSTR); p->cs_enabled = true; return 0; @@ -161,8 +161,8 @@ static void __init h8300_16timer_init(struct device_node *node) timer16_priv.mapbase = base[REG_CH]; timer16_priv.mapcommon = base[REG_COMM]; timer16_priv.enb = 1 << ch; - timer16_priv.imfa = 1 << ch; - timer16_priv.imiea = 1 << (4 + ch); + timer16_priv.ovf = 1 << ch; + timer16_priv.ovie = 1 << (4 + ch); ret = request_irq(irq, timer16_interrupt, IRQF_TIMER, timer16_priv.cs.name, &timer16_priv); -- 2.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/