From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [RFC part3 PATCH 2/2] ARM64 / clocksource: Use arch_timer_acpi_init() Date: Thu, 05 Dec 2013 21:09:29 +0800 Message-ID: <52A07B09.9010007@linaro.org> References: <1386088891-2917-1-git-send-email-hanjun.guo@linaro.org> <1386088891-2917-3-git-send-email-hanjun.guo@linaro.org> <20131203170815.GB16025@e106331-lin.cambridge.arm.com> <529F3BCA.1020908@linaro.org> <20131204150709.GF29200@e106331-lin.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-pd0-f177.google.com ([209.85.192.177]:62122 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756604Ab3LENJt (ORCPT ); Thu, 5 Dec 2013 08:09:49 -0500 Received: by mail-pd0-f177.google.com with SMTP id q10so24564440pdj.36 for ; Thu, 05 Dec 2013 05:09:49 -0800 (PST) In-Reply-To: <20131204150709.GF29200@e106331-lin.cambridge.arm.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Mark Rutland Cc: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux , Daniel Lezcano , "linux-acpi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "grant.likely@linaro.org" , Matthew Garrett , Olof Johansson , Linus Walleij , Bjorn Helgaas , "rob.herring@calxeda.com" , Jon Masters , "patches@linaro.org" , "linux-kernel@vger.kernel.org" , "linaro-kernel@lists.linaro.org" , "linaro-acpi@lists.linaro.org" On 2013=E5=B9=B412=E6=9C=8804=E6=97=A5 23:07, Mark Rutland wrote: > On Wed, Dec 04, 2013 at 02:27:22PM +0000, Hanjun Guo wrote: >> On 2013=E5=B9=B412=E6=9C=8804=E6=97=A5 01:08, Mark Rutland wrote: >>> On Tue, Dec 03, 2013 at 04:41:31PM +0000, Hanjun Guo wrote: >>>> Use arch_timer_acpi_init() on ARM64 to initialise arch timer >>>> in ACPI way when DT is not available. >>>> >>>> Signed-off-by: Hanjun Guo >>>> --- >>>> arch/arm64/kernel/time.c | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c >>>> index 29c39d5..fb009da 100644 >>>> --- a/arch/arm64/kernel/time.c >>>> +++ b/arch/arm64/kernel/time.c >>>> @@ -67,6 +67,10 @@ void __init time_init(void) >>>> =20 >>>> clocksource_of_init(); >>>> =20 >>>> + /* if can't be initialised from DT, try ACPI way */ >>>> + if (!arch_timer_get_rate()) >>>> + arch_timer_acpi_init(); >>>> + >>> As mentioned on the previous patch, I think for the timebeing we sh= ould >>> rely on CNTFREQ. >>> >>> Additionally, if you need to do this we should have an analagous >>> mechanism to clocksource_of_init() that performs this initialisatio= n for >>> ACPI, and here we can call a clocksource_*_init function that does = the >>> right thing. >>> >>> There's no need for this file to know anything about ACPI. >> Oh, Amit already have some patches to introduce clocksource_acpi_ini= t() >> like clocksource_of_init() did, please refer to the link below. >> >> http://marc.info/?l=3Dlinaro-acpi&m=3D138131929721943&w=3D2 >> >> is this the idea you mentioned in your comments? > Something along those lines is far better than hardcoding > arch_timer_acpi_init here. Thanks for the suggestion, will update it. Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html