From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel.lezcano@linaro.org (Daniel Lezcano) Date: Wed, 17 Aug 2016 11:48:43 +0200 Subject: [PATCH v2 1/4] clocksource: timer-atmel-pit: enable mck In-Reply-To: <1470663233-15118-2-git-send-email-alexandre.belloni@free-electrons.com> References: <1470663233-15118-1-git-send-email-alexandre.belloni@free-electrons.com> <1470663233-15118-2-git-send-email-alexandre.belloni@free-electrons.com> Message-ID: <57B432FB.90607@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 08/08/2016 03:33 PM, Alexandre Belloni wrote: > 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 > --- > 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 1ffac0cb0cb7..db839fc99a8e 100644 > --- a/drivers/clocksource/timer-atmel-pit.c > +++ b/drivers/clocksource/timer-atmel-pit.c > @@ -261,6 +261,9 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node) > return PTR_ERR(data->mck); > } > > + if (clk_prepare_enable(data->mck)) > + panic(pr_fmt("Unable to enable mck\n")); > + Replace the panic by a proper error handling please. Thanks ! -- Daniel -- Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbcHQJss (ORCPT ); Wed, 17 Aug 2016 05:48:48 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35324 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910AbcHQJsr (ORCPT ); Wed, 17 Aug 2016 05:48:47 -0400 Subject: Re: [PATCH v2 1/4] clocksource: timer-atmel-pit: enable mck To: Alexandre Belloni References: <1470663233-15118-1-git-send-email-alexandre.belloni@free-electrons.com> <1470663233-15118-2-git-send-email-alexandre.belloni@free-electrons.com> Cc: Thomas Gleixner , Boris Brezillon , Nicolas Ferre , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Daniel Lezcano Message-ID: <57B432FB.90607@linaro.org> Date: Wed, 17 Aug 2016 11:48:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1470663233-15118-2-git-send-email-alexandre.belloni@free-electrons.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/08/2016 03:33 PM, Alexandre Belloni wrote: > 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 > --- > 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 1ffac0cb0cb7..db839fc99a8e 100644 > --- a/drivers/clocksource/timer-atmel-pit.c > +++ b/drivers/clocksource/timer-atmel-pit.c > @@ -261,6 +261,9 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node) > return PTR_ERR(data->mck); > } > > + if (clk_prepare_enable(data->mck)) > + panic(pr_fmt("Unable to enable mck\n")); > + Replace the panic by a proper error handling please. Thanks ! -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog