From patchwork Mon Feb 10 19:07:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3621941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 79D1BBF418 for ; Mon, 10 Feb 2014 19:14:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3143201CE for ; Mon, 10 Feb 2014 19:14:22 +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 AFC1D20103 for ; Mon, 10 Feb 2014 19:14:21 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCwIU-00028Y-Vx; Mon, 10 Feb 2014 19:13:39 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCwDc-0000xX-Og; Mon, 10 Feb 2014 19:08:36 +0000 Received: from top.free-electrons.com ([176.31.233.9] helo=mail.free-electrons.com) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCwDS-0000uy-2f for linux-arm-kernel@lists.infradead.org; Mon, 10 Feb 2014 19:08:27 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 5F6FB845; Mon, 10 Feb 2014 20:08:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from localhost.localdomain (unknown [190.2.98.212]) by mail.free-electrons.com (Postfix) with ESMTPA id DED587BE; Mon, 10 Feb 2014 20:08:10 +0100 (CET) From: Ezequiel Garcia To: Daniel Lezcano , tglx@linutronix.de, Subject: [PATCH 1/2] clocksource: armada-370-xp: Add support for Armada 375 Date: Mon, 10 Feb 2014 16:07:53 -0300 Message-Id: <1392059274-26965-2-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1392059274-26965-1-git-send-email-ezequiel.garcia@free-electrons.com> References: <1392059274-26965-1-git-send-email-ezequiel.garcia@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140210_140826_372627_BE838B6A X-CRM114-Status: GOOD ( 11.63 ) X-Spam-Score: 1.2 (+) Cc: Thomas Petazzoni , Lior Amsalem , Jason Cooper , Tawfik Bayouk , Andrew Lunn , Ezequiel Garcia , Gregory CLEMENT , Sebastian Hesselbarth 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-Virus-Scanned: ClamAV using ClamSMTP From: Gregory CLEMENT The Armada 375 has a 25 Mhz fixed clock, but it is non-functional. Therefore, let's use the A370 initialization for now, using the provided parent clock. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Signed-off-by: Ezequiel Garcia --- .../bindings/timer/marvell,armada-370-xp-timer.txt | 13 +++++++++---- drivers/clocksource/time-armada-370-xp.c | 13 ++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt index f455182..59894fb 100644 --- a/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt +++ b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt @@ -1,9 +1,11 @@ -Marvell Armada 370 and Armada XP Timers ---------------------------------------- +Marvell Armada 370, 375 and XP Timers +------------------------------------- Required properties: -- compatible: Should be either "marvell,armada-370-timer" or - "marvell,armada-xp-timer" as appropriate. +- compatible: Should be either: + - "marvell,armada-370-timer" + - "marvell,armada-375-timer" + - "marvell,armada-xp-timer" - interrupts: Should contain the list of Global Timer interrupts and then local timer interrupts - reg: Should contain location and length for timers register. First @@ -13,6 +15,9 @@ Required properties: Clocks required for compatible = "marvell,armada-370-timer": - clocks : Must contain a single entry describing the clock input +Clocks required for compatible = "marvell,armada-375-timer": +- clocks : Must contain a single entry describing the clock input + Clocks required for compatible = "marvell,armada-xp-timer": - clocks : Must contain an entry for each entry in clock-names. - clock-names : Must include the following entries: diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c index ee8691b..87eda6d 100644 --- a/drivers/clocksource/time-armada-370-xp.c +++ b/drivers/clocksource/time-armada-370-xp.c @@ -15,12 +15,15 @@ * used as clock_event_device. * * --- - * Clocksource driver for Armada 370 and Armada XP SoC. + * Clocksource driver for Armada 370, Armada 375 and Armada XP SoC. * This driver implements one compatible string for each SoC, given * each has its own characteristics: * * * Armada 370 has no 25 MHz fixed timer. * + * * Armada 375 has a non-usable 25 Mhz fixed timer, due to hardware + * issues. + * * * Armada XP cannot work properly without such 25 MHz fixed timer as * doing otherwise leads to using a clocksource whose frequency varies * when doing cpufreq frequency changes. @@ -316,3 +319,11 @@ static void __init armada_370_timer_init(struct device_node *np) } CLOCKSOURCE_OF_DECLARE(armada_370, "marvell,armada-370-timer", armada_370_timer_init); + +/* + * Currently support the Armada 375 timer as identical to the Armada 370. + * However, let's keep a SoC-specific compatible string to allow to change + * this in the future. + */ +CLOCKSOURCE_OF_DECLARE(armada_375, "marvell,armada-375-timer", + armada_370_timer_init);