From patchwork Sat Jul 20 00:04:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2830746 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E2E59F3EB for ; Sat, 20 Jul 2013 00:06:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 830D5201E3 for ; Sat, 20 Jul 2013 00:06:42 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28143200DE for ; Sat, 20 Jul 2013 00:06:41 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V0KgK-00048d-F2; Sat, 20 Jul 2013 00:05:52 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V0KgB-0005d8-6A; Sat, 20 Jul 2013 00:05:43 +0000 Received: from mail-ee0-x22f.google.com ([2a00:1450:4013:c00::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V0Kfg-0005Vd-Sc for linux-arm-kernel@lists.infradead.org; Sat, 20 Jul 2013 00:05:14 +0000 Received: by mail-ee0-f47.google.com with SMTP id e49so2659432eek.34 for ; Fri, 19 Jul 2013 17:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=MClYIT6Ne/56cXCjPT+DANKb/UXM72OmansIuBiZWlE=; b=TgJulihi9/ZXXY6exqJeC9llpSJ9CnyexG8RrS/V+4CxmkTVTqW/e2K0tUNFzq2Ii1 Pk3QOp5Un6dwYDHwduWcSJGUfGPvU0jvcnwQ9zy50wklhOstq8mErmI01i6iHbydAHH7 RYmjeqBP9iJelMcR08rlVeXi6yz1W0PMRURFwOHS7iyZqxlj4SqkIHuoxpddGWkobN6Y XPCwB1PXA9QrjbBh7xSgVkCnEuycmnzK3QvQ10kxsQyDibut0V8YvxJvrBwcXU35HHUj iZX4XmcFFEYEAxZlmg/I2NUqO/2FetsmiPO5oqkSx3F5fcWKiUC9RxLFQDw5nriF863K V4yQ== X-Received: by 10.14.119.136 with SMTP id n8mr18229933eeh.1.1374278690990; Fri, 19 Jul 2013 17:04:50 -0700 (PDT) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPSA id bj46sm31186249eeb.13.2013.07.19.17.04.49 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Jul 2013 17:04:50 -0700 (PDT) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 02/20] clocksource: samsung_pwm_timer: Correct definition of AUTORELOAD bit Date: Sat, 20 Jul 2013 02:04:14 +0200 Message-Id: <1374278673-25615-3-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1374278673-25615-1-git-send-email-tomasz.figa@gmail.com> References: <1374278673-25615-1-git-send-email-tomasz.figa@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130719_200513_106714_FB12FB94 X-CRM114-Status: GOOD ( 10.68 ) X-Spam-Score: -2.0 (--) Cc: linux-pwm@vger.kernel.org, Kukjin Kim , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Arnd Bergmann , Tomasz Figa , Mark Brown , Thierry Reding , Olof Johansson , Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PWM channel 4 has its autoreload bit located at different position. This patch fixes the driver to account for that. This fixes a problem with the clocksource hanging after it overflows because it is not reloaded any more. Signed-off-by: Tomasz Figa Tested-by: Tomasz Figa --- drivers/clocksource/samsung_pwm_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index 3fa5b07..e238fb0 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c @@ -47,7 +47,8 @@ #define TCON_START(chan) (1 << (4 * (chan) + 0)) #define TCON_MANUALUPDATE(chan) (1 << (4 * (chan) + 1)) #define TCON_INVERT(chan) (1 << (4 * (chan) + 2)) -#define TCON_AUTORELOAD(chan) (1 << (4 * (chan) + 3)) +#define TCON_AUTORELOAD(chan) (1 << (4 * (chan) \ + + (((chan) < 5) ? 3 : 2))) DEFINE_SPINLOCK(samsung_pwm_lock); EXPORT_SYMBOL(samsung_pwm_lock);