From patchwork Tue Dec 3 16:41:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 3277851 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 A1A119F380 for ; Tue, 3 Dec 2013 16:45:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6DCF220173 for ; Tue, 3 Dec 2013 16:45:04 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADBB52015E for ; Tue, 3 Dec 2013 16:44:59 +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 1Vnt41-0007yv-Di; Tue, 03 Dec 2013 16:43:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vnt3a-0001QB-2G; Tue, 03 Dec 2013 16:42:42 +0000 Received: from mail-pb0-f45.google.com ([209.85.160.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vnt3X-0001Lw-O9 for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2013 16:42:40 +0000 Received: by mail-pb0-f45.google.com with SMTP id rp16so21423024pbb.32 for ; Tue, 03 Dec 2013 08:42:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2Pa+DZQz/kArkHs+YmS8JQrnQI43QRfXOU0BRoFbMvk=; b=kd49CT//ZE6AAUcc4kEq9EUYxJkF2HgyzPtXF8V9txEcAck9qlNH2InNi+n+Rs66eT 6e08rpSWnu7t780ak4oKzS3e0xov10cUPxjhZib88HZeIlM1fLmFmopxDGALAufzaqjM Gkrn203cumznspyDI1ZE3hzKhAG1a/TImy6rDtLLgw6f6cRTSuFQyx/JQ9YDu9CH25IY F9imETkZHukGNzfyJgXRUTTpq7OzqvWpV0P+P+VcBbGDKNRYoUeiZ7eKIR2/gzzym0+v Aq3c6m73Zm/VEFtgQyBEOpS0f47vLlrSgU0EVxRDfxDzHf44d9k1OHAEW2/qW+nYtw+j T/IA== X-Gm-Message-State: ALoCoQkk1gaBqRQbx5AXnIV9mHP85ArGU0YyeVHQc9H5AHEyBJPuad9CrKzHOwkEwFHAcxnryBRy X-Received: by 10.66.164.136 with SMTP id yq8mr75264379pab.67.1386088938029; Tue, 03 Dec 2013 08:42:18 -0800 (PST) Received: from localhost ([219.142.3.202]) by mx.google.com with ESMTPSA id rz6sm136460589pab.22.2013.12.03.08.42.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 03 Dec 2013 08:42:17 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux , Daniel Lezcano Subject: [RFC part3 PATCH 2/2] ARM64 / clocksource: Use arch_timer_acpi_init() Date: Wed, 4 Dec 2013 00:41:31 +0800 Message-Id: <1386088891-2917-3-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386088891-2917-1-git-send-email-hanjun.guo@linaro.org> References: <1386088891-2917-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131203_114239_887500_0F577906 X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: -2.6 (--) Cc: Mark Rutland , Matthew Garrett , linaro-kernel@lists.linaro.org, patches@linaro.org, Linus Walleij , Olof Johansson , linux-kernel@vger.kernel.org, Rob Herring , linaro-acpi@lists.linaro.org, linux-acpi@vger.kernel.org, Jon Masters , Grant Likely , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Hanjun Guo 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 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) clocksource_of_init(); + /* if can't be initialised from DT, try ACPI way */ + if (!arch_timer_get_rate()) + arch_timer_acpi_init(); + arch_timer_rate = arch_timer_get_rate(); if (!arch_timer_rate) panic("Unable to initialise architected timer.\n");