Received: by 10.223.185.116 with SMTP id b49csp1069770wrg; Wed, 21 Feb 2018 11:33:08 -0800 (PST) X-Google-Smtp-Source: AH8x22715XSRlYAbGdHjC/wRxeGdt82yg52g1ezaUzP1lXBwgu7YJSXYUemsDrx9YZqUBAUr1QHg X-Received: by 2002:a17:902:bd04:: with SMTP id p4-v6mr4034815pls.253.1519241588326; Wed, 21 Feb 2018 11:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519241588; cv=none; d=google.com; s=arc-20160816; b=i32JjGjLaRFwOM3+mLufsm1gZOikNhKKNc5orWzuOuj5tYxY5dyXP1hyJwLzmfE+rs SZrcjnpeee2nZ+5RZYnW3Ot7IuUIlWKIQs3d0ad7y3O7Rqvi6vWm0zb9fr3sF/JaxGag KPF7TtSvWyd9Mhaka7CwVmkCJOlvou4Jdk9+p/RiRgemkY1PLswnYJIVAHBUdUeOVxnL h/6J5N8ieK9M8kCJ+N4q+1l8IBzq2EdSoBak0WmWs0OnMAiVnaJ3M4pojna4W8E+Acjg MmthcFdOjI6Uffc786i9yWnsv4J8WyJZFZ3xAPX8gMuAoOLK6UB99TD78FBwyFnY0GRj imxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=nVXqg/souW5fB/CAq3QyOZ4MJlLZtdpMZMDxspdN3eE=; b=yBpf+MaI13HT6FTVRzgN9s9g8A1GB/lfQRXQ+mkI4/EuEk+8KW2pv9nyaDhbqWP2k1 DRjGADDy2nqzDbVXZRAS2ec5QwZ/WWWbcXlLh2w7EFA8UkC7lTs8Emv1sqDKDxT/+WYq sdDz4zhFgMBCSPKsGUzzhM6e6EvblKZkkYcKrgWkv7JUCIWFxU7pzp/gWTBG76uzk4wW zOFBReTsifnpsjr2fxHQztmW99oqc4WfM1nYaTSM+AcvAYe1pyIUb3RvRZ+2+kkrpZta dydpSrjMYcA+ph5knY/ZWxH5OK41/gh+Oj1PZx5jGJReghGSe2n6v49aSiiWUjFlhaoN Ul7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si3316449pfi.199.2018.02.21.11.32.53; Wed, 21 Feb 2018 11:33:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbeBUTbr (ORCPT + 99 others); Wed, 21 Feb 2018 14:31:47 -0500 Received: from smtprelay4.synopsys.com ([198.182.47.9]:51808 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbeBUTbp (ORCPT ); Wed, 21 Feb 2018 14:31:45 -0500 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 1892324E0582; Wed, 21 Feb 2018 11:31:44 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id DAD7C3FC2; Wed, 21 Feb 2018 11:31:44 -0800 (PST) Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id C718A3FBC; Wed, 21 Feb 2018 11:31:44 -0800 (PST) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.266.1; Wed, 21 Feb 2018 11:31:44 -0800 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.266.1; Thu, 22 Feb 2018 01:01:43 +0530 Received: from vineetg-Latitude-E7450.internal.synopsys.com (10.10.161.84) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.266.1; Thu, 22 Feb 2018 01:01:42 +0530 From: Vineet Gupta To: , CC: Thomas Gleixner , Daniel Lezcano , Vineet Gupta Subject: [PATCH] clocksource: arc_timer: update some comments Date: Wed, 21 Feb 2018 11:31:31 -0800 Message-ID: <1519241491-12570-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.10.161.84] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TIMER0 interrupt ACK is different for ARC700 and HS3x cores. This came to light in some internal discussions and it is nice to have this documented rather than digging up the PRM (Prog Ref Manual) again Signed-off-by: Vineet Gupta --- drivers/clocksource/arc_timer.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/arc_timer.c b/drivers/clocksource/arc_timer.c index 4927355f9cbe..471b428d8034 100644 --- a/drivers/clocksource/arc_timer.c +++ b/drivers/clocksource/arc_timer.c @@ -251,9 +251,14 @@ static irqreturn_t timer_irq_handler(int irq, void *dev_id) int irq_reenable = clockevent_state_periodic(evt); /* - * Any write to CTRL reg ACks the interrupt, we rewrite the - * Count when [N]ot [H]alted bit. - * And re-arm it if perioid by [I]nterrupt [E]nable bit + * 1. ACK the interrupt + * - For ARC700, any write to CTRL reg ACKs it, so just rewrite + * Count when [N]ot [H]alted bit. + * - For HS3x, it is a bit subtle. On taken count-down interrupt, + * IP bit [3] is set, which needs to be cleared for ACK'ing. + * The write below can only update the other two bits, hence + * explicitly clears IP bit + * 2. Re-arm interrupt if periodic by writing to IE bit [0] */ write_aux_reg(ARC_REG_TIMER0_CTRL, irq_reenable | TIMER_CTRL_NH); -- 2.7.4