All of lore.kernel.org
 help / color / mirror / Atom feed
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] clocksource: timer-atmel-pit: enable mck
Date: Wed, 17 Aug 2016 11:48:43 +0200	[thread overview]
Message-ID: <57B432FB.90607@linaro.org> (raw)
In-Reply-To: <1470663233-15118-2-git-send-email-alexandre.belloni@free-electrons.com>

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 <olivier.schonken@gmail.com>
> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  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



-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] clocksource: timer-atmel-pit: enable mck
Date: Wed, 17 Aug 2016 11:48:43 +0200	[thread overview]
Message-ID: <57B432FB.90607@linaro.org> (raw)
In-Reply-To: <1470663233-15118-2-git-send-email-alexandre.belloni@free-electrons.com>

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 <olivier.schonken@gmail.com>
> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  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



-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2016-08-17  9:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 13:33 [PATCH v2 0/4] clocksource: timer-atmel-pit: driver fix and cleanups Alexandre Belloni
2016-08-08 13:33 ` Alexandre Belloni
2016-08-08 13:33 ` [PATCH v2 1/4] clocksource: timer-atmel-pit: enable mck Alexandre Belloni
2016-08-08 13:33   ` Alexandre Belloni
2016-08-17  9:48   ` Daniel Lezcano [this message]
2016-08-17  9:48     ` Daniel Lezcano
2016-08-08 13:33 ` [PATCH v2 2/4] clocksource: timer-atmel-pit: drop at91sam926x_pit_common_init Alexandre Belloni
2016-08-08 13:33   ` Alexandre Belloni
2016-08-08 13:33 ` [PATCH v2 3/4] clocksource: timer-atmel-pit: remove uselesss WARN_ON_ONCE Alexandre Belloni
2016-08-08 13:33   ` Alexandre Belloni
2016-08-08 13:33 ` [PATCH v2 4/4] clocksource: timer-atmel-pit: simplify IRQ handler Alexandre Belloni
2016-08-08 13:33   ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57B432FB.90607@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.