Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp610421ybi; Fri, 24 May 2019 08:38:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTPAYpQb7S0pa5Hn/2uc6wdBA9KDspSB+NJdWy/0m2uwBY+MQk8ysTvOU10/xU+MdqYgDG X-Received: by 2002:a17:90a:8902:: with SMTP id u2mr10094503pjn.96.1558712312061; Fri, 24 May 2019 08:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558712312; cv=none; d=google.com; s=arc-20160816; b=n+X11pRrfCZ5Be8fuH03oOIZezBOpjCm+yEEZmVT01go7UDRgWUBgZMA8HFb0rpy6u 8Dn1GEsSWBeOPmFCG1dBWRjUTtRaI16P6qJ0BjwaX0GIUnFPV0Gn0Gq2MXBuKBkRz/aL tBYHJMUDqKBnUhWJ7OALOMkirXgyyU3/mWwoGhZSRxKO9eRoIZ6KaVQpS9pB62t5pZ9M 4F4wU1g2roZCcP8kXHFgWiM7yzRRzgOwG5pjusKfQExurjHtrrIeYq8lTSl1a9cByuCp dke0Vho5SNlvrGov60OpZlIJivbtC751USvcq7wJOM+yn9RaMnz4ZMe2lBXq0SIcPJvS TvCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ETNkw8fFUbaK1GsH9w3HEMnksKyWiZUE22AHo7ajX+U=; b=ox7X24EaTBZosSbIAs5Xhn7wzp/YpVpR8lfBWypLRdOQ22FVUpjoVZhlJUnlLl7smc CJFHaBlqNyO5O7UuSbxavdN2Sqg9cYpYecbpei72nroxlU/OfSj1UqKghGHxnSkYcV41 oH353U55E1S1QXavQDIbSabVXdGua9guePpFBFcRn9UswX0Kvb6bgIJ4XJ1rAOqIiRQn /jfXUSWUbbOktGwxj/MWANA5JP1S5oaQy9jld0ifKwK41PZpDWGLex/CJvWHDXzVACbZ +tRQgZNxyXsjqfiO0CmJdpxXojlyLP0efc12A7sTZCbfVHRWqjmQsWO/XeIuHDPImFMl WDNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M8SbDGA6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si4730858pgh.162.2019.05.24.08.38.15; Fri, 24 May 2019 08:38:32 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M8SbDGA6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390529AbfEXPgF (ORCPT + 99 others); Fri, 24 May 2019 11:36:05 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42620 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389812AbfEXPfb (ORCPT ); Fri, 24 May 2019 11:35:31 -0400 Received: by mail-lj1-f196.google.com with SMTP id 188so9022869ljf.9; Fri, 24 May 2019 08:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ETNkw8fFUbaK1GsH9w3HEMnksKyWiZUE22AHo7ajX+U=; b=M8SbDGA6wwIJlmM9rMvcJz72o9PQH/mhr5Xd3uiGXyBk3T8rXuFqMzmQd1cUm4L7uz O8g0B/IKq/fbBcj9Op6t9h+Tj3P/7f4l6s6Y/kykIekuFqFQtzCpZykezYT+pHepTeZ+ bOheDeNGW9I5ivbvwtIYGTSNsIEoykhfE8kH3oCAVtF0m52WEiUVbZUimsetAKMRiu41 Yn9IKtQeZbrDv1lK3RNuw/zCVfaCb9hAHINcnIo1j+Vl4QIor3zjvJqHUGR0w6t7dtT7 KgESQJZpOY6LOO+cey8d9kQtcIcMGebmgB/gZHKp5P14yD7S0JOPGK5uKkC8FSHbvy8Z qWRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ETNkw8fFUbaK1GsH9w3HEMnksKyWiZUE22AHo7ajX+U=; b=RH4OTt3/intpEDRm7LZoGxTFXmcnVjyFz9kg/ERmQBX9w9hWj6rQ1gPUzYzpo9L2XO aPlbdXQUH+R7W6X28BDGhbRmxgwRgSeM3+xH7SkTSGU4v/V4MA8OvskdBg2uZ0xMGxOC V36nC71iRrGJDNKTwLdrf3qI9NBhB/7eL8nfx9cnMDEU46lVjVyBz7W1TewfeseXv/aq zJ4pnkGILkXqMP7sfRbKM9aLI19+gjYjPevTCUlf2REnZqK1xNKWmcadtXMcC6Cg2YuR 7ORblUqmwPpyes1XlMS33SWmHnjVScPedppr0oM3wrTJweu9EdmZohVAC5O0mMsPvvWU ni1w== X-Gm-Message-State: APjAAAXEfcJtqcZt8cWQeIubULOnP0GxBjMpGBF5m+gh+WLtfNv6Jwpn +6fyEUsgsCgcqgpSccrdZ+w= X-Received: by 2002:a2e:b0d0:: with SMTP id g16mr27106796ljl.132.1558712129183; Fri, 24 May 2019 08:35:29 -0700 (PDT) Received: from localhost.localdomain ([94.29.35.141]) by smtp.gmail.com with ESMTPSA id y14sm572316ljh.60.2019.05.24.08.35.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 08:35:28 -0700 (PDT) From: Dmitry Osipenko To: Daniel Lezcano , Thomas Gleixner , Joseph Lo , Thierry Reding , Jonathan Hunter , Peter De Schrijver Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Chauvet Subject: [PATCH v3 3/8] clocksource/drivers/tegra: Reset hardware state on init Date: Fri, 24 May 2019 18:32:48 +0300 Message-Id: <20190524153253.28564-4-digetx@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190524153253.28564-1-digetx@gmail.com> References: <20190524153253.28564-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reset timer's hardware state to ensure that initially it is in a predictable state. Signed-off-by: Dmitry Osipenko --- drivers/clocksource/timer-tegra20.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clocksource/timer-tegra20.c b/drivers/clocksource/timer-tegra20.c index 57e7aa2b80a3..739f83fdb318 100644 --- a/drivers/clocksource/timer-tegra20.c +++ b/drivers/clocksource/timer-tegra20.c @@ -132,6 +132,9 @@ static int tegra_timer_setup(unsigned int cpu) { struct timer_of *to = per_cpu_ptr(&tegra_to, cpu); + writel(0, timer_of_base(to) + TIMER_PTV); + writel(TIMER_PCR_INTR_CLR, timer_of_base(to) + TIMER_PCR); + irq_force_affinity(to->clkevt.irq, cpumask_of(cpu)); enable_irq(to->clkevt.irq); -- 2.21.0