From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v5 21/29] nios2: Time keeping Date: Tue, 28 Oct 2014 10:23:37 +0100 Message-ID: <1806277.3CF96bVORX@wuerfel> References: <1414139071-3818-1-git-send-email-lftan@altera.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: Sender: linux-doc-owner@vger.kernel.org To: Ley Foon Tan Cc: Thomas Gleixner , Linux-Arch , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , Chung-Lin Tang List-Id: linux-arch.vger.kernel.org On Tuesday 28 October 2014 10:46:29 Ley Foon Tan wrote: > On Sun, Oct 26, 2014 at 5:10 AM, Thomas Gleixner wrote: > > On Fri, 24 Oct 2014, Ley Foon Tan wrote: > >> +#ifndef _ASM_NIOS2_TIMEX_H > >> +#define _ASM_NIOS2_TIMEX_H > >> + > >> +typedef unsigned long cycles_t; > >> + > >> +extern cycles_t get_cycles(void); > >> + > >> +#define ARCH_HAS_READ_CURRENT_TIMER > > > > Why does NIOS need that? Does it have a hardware implementation > > dependent clock frequency which needs to be calibrated at boot time? > This is suggestion from Arnd to use read_current_timer instead of using > expensive delay loop calibration during boot. My mistake, sorry. I think the right way is to define calibrate_delay_is_known() rather than read_current_timer(), I was getting confused by the ARM implementation that does both. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de ([212.227.126.187]:58683 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbaJ1JXn (ORCPT ); Tue, 28 Oct 2014 05:23:43 -0400 From: Arnd Bergmann Subject: Re: [PATCH v5 21/29] nios2: Time keeping Date: Tue, 28 Oct 2014 10:23:37 +0100 Message-ID: <1806277.3CF96bVORX@wuerfel> In-Reply-To: References: <1414139071-3818-1-git-send-email-lftan@altera.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ley Foon Tan Cc: Thomas Gleixner , Linux-Arch , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , Chung-Lin Tang Message-ID: <20141028092337.hDm-h6TPu97Ewv0RgRLTKQOD2-CCmrX0jur-pcOgcfU@z> On Tuesday 28 October 2014 10:46:29 Ley Foon Tan wrote: > On Sun, Oct 26, 2014 at 5:10 AM, Thomas Gleixner wrote: > > On Fri, 24 Oct 2014, Ley Foon Tan wrote: > >> +#ifndef _ASM_NIOS2_TIMEX_H > >> +#define _ASM_NIOS2_TIMEX_H > >> + > >> +typedef unsigned long cycles_t; > >> + > >> +extern cycles_t get_cycles(void); > >> + > >> +#define ARCH_HAS_READ_CURRENT_TIMER > > > > Why does NIOS need that? Does it have a hardware implementation > > dependent clock frequency which needs to be calibrated at boot time? > This is suggestion from Arnd to use read_current_timer instead of using > expensive delay loop calibration during boot. My mistake, sorry. I think the right way is to define calibrate_delay_is_known() rather than read_current_timer(), I was getting confused by the ARM implementation that does both. Arnd