From patchwork Fri Aug 26 14:20:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 9301367 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 ABED260757 for ; Fri, 26 Aug 2016 14:23:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E2492954A for ; Fri, 26 Aug 2016 14:23:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92D4D295EB; Fri, 26 Aug 2016 14:23:56 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 43B0B2954A for ; Fri, 26 Aug 2016 14:23:56 +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 1bdI1Z-0006oq-62; Fri, 26 Aug 2016 14:22:25 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bdI1R-0006Xd-FS for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2016 14:22:21 +0000 Received: by mail-wm0-x236.google.com with SMTP id f65so280499209wmi.0 for ; Fri, 26 Aug 2016 07:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PKTLs+0j80xre7aCux/tdrcxluZOweJWSfo6FwDeIks=; b=CgPQxO6J/aNH6t3SM0YlwwM1b+yuMJGpsipijIfD9RPW6bgsjYlXsRL8ght/58jfs7 PcF7t0hyubiaxE3SRsD7b3IGMcmpb/M+w59x/Fnb2u5d08rRGjje5rSf6PAe+jAm7cDO ab+GETpu4kiu927IsJzYPklJWfwBvHSgFZKn0= 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=PKTLs+0j80xre7aCux/tdrcxluZOweJWSfo6FwDeIks=; b=KvjITfkQTqG3vlXVx6c36UJ8818CZDjxDe/FwYSMomX7xibKJ0cwT1QW1O4P140HsO o2NREIP4U66O/JleDo1IWW/gDhGTe0HyOH8YwM3ghPGXeFSHMc7Ytb7+OuOW7N8wj39U ZmY1XGXXwKem/4qiy6gJDS/fk46LG8ADAilrVwDEDu2lo4h83B4+BmnnVU2Fle4Wwne0 iVkVPO8/rX6l0qH+236ZD251tWhLzPBfrEzrcTsBqlTvJl9l1jyF3ewLrLb9dg3pK1lk NyERuLYFb5BpKjBN280aqd1AdTCMLOiO54074jJrSkMVQp/zZZuurZpcVFvoga5XU35e iXXg== X-Gm-Message-State: AE9vXwPuSKCIrjfsyne6QTdMbF31saEGp76UfutRHvajJDQbS3SzpmmUMqmIPIEXotphA8PK X-Received: by 10.194.60.2 with SMTP id d2mr4513923wjr.179.1472221315726; Fri, 26 Aug 2016 07:21:55 -0700 (PDT) Received: from localhost.localdomain (lft31-1-88-121-166-205.fbx.proxad.net. [88.121.166.205]) by smtp.gmail.com with ESMTPSA id m5sm3168940wmd.1.2016.08.26.07.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Aug 2016 07:21:54 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Subject: [PATCH 1/3] clocksource/drivers/timer-atmel-pit: Enable mck clock Date: Fri, 26 Aug 2016 16:20:43 +0200 Message-Id: <1472221245-14265-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <57C05026.7010905@linaro.org> References: <57C05026.7010905@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160826_072217_727269_3F41390D X-CRM114-Status: GOOD ( 12.94 ) 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: Nicolas Ferre , Olivier Schonken , Alexandre Belloni , linux-kernel@vger.kernel.org, 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 From: Alexandre Belloni mck is needed to get the PIT working. Explicitly prepare_enable it instead of assuming it is enabled. This solves an issue where the system is freezing when the ETM/ETB drivers are enabled. Reported-by: Olivier Schonken Reviewed-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano --- drivers/clocksource/timer-atmel-pit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c index 1ffac0c..3494bc5 100644 --- a/drivers/clocksource/timer-atmel-pit.c +++ b/drivers/clocksource/timer-atmel-pit.c @@ -261,6 +261,12 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node) return PTR_ERR(data->mck); } + ret = clk_prepare_enable(data->mck); + if (ret) { + pr_err("Unable to enable mck\n"); + return ret; + } + /* Get the interrupts property */ data->irq = irq_of_parse_and_map(node, 0); if (!data->irq) {