From patchwork Mon Jul 4 16:00:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 9212903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F1E1D60752 for ; Mon, 4 Jul 2016 16:01:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E32A828669 for ; Mon, 4 Jul 2016 16:01:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D836B286FC; Mon, 4 Jul 2016 16:01:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC97828669 for ; Mon, 4 Jul 2016 16:01:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bK6IV-0002CT-7m; Mon, 04 Jul 2016 16:00:35 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bK6IS-0002A6-A9 for linux-arm-kernel@lists.infradead.org; Mon, 04 Jul 2016 16:00:32 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id B495E1C3; Mon, 4 Jul 2016 18:00:10 +0200 (CEST) Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id 85C7F12E; Mon, 4 Jul 2016 18:00:10 +0200 (CEST) From: Alexandre Belloni To: Daniel Lezcano Subject: [PATCH] clocksource: timer-atmel-pit: enable mck Date: Mon, 4 Jul 2016 18:00:09 +0200 Message-Id: <1467648009-24269-1-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.8.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160704_090032_515756_C534B637 X-CRM114-Status: GOOD ( 11.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Nicolas Ferre , linux-kernel@vger.kernel.org, Alexandre Belloni , Thomas Gleixner , Olivier Schonken , linux-arm-kernel@lists.infradead.org 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 mck is needed to get the PIT working. Explicitly prepare_enable it instead of assuming it is enabled. This solves an issue were the system is freezing when the ETM/ETB drivers are enabled. Reported-by: Olivier Schonken Signed-off-by: Alexandre Belloni Reviewed-by: Boris Brezillon Acked-by: Nicolas Ferre --- drivers/clocksource/timer-atmel-pit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c index d911c5dca8f1..fcc97711cd79 100644 --- a/drivers/clocksource/timer-atmel-pit.c +++ b/drivers/clocksource/timer-atmel-pit.c @@ -248,6 +248,9 @@ static void __init at91sam926x_pit_dt_init(struct device_node *node) if (IS_ERR(data->mck)) panic(pr_fmt("Unable to get mck clk\n")); + if (clk_prepare_enable(data->mck)) + panic(pr_fmt("Unable to enable mck\n")); + /* Get the interrupts property */ data->irq = irq_of_parse_and_map(node, 0); if (!data->irq)