linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] clk: shmobile: mstp: Fix the is_enabled() operation
@ 2014-05-22 18:02 Geert Uytterhoeven
  2014-05-27  1:02 ` Magnus Damm
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-05-22 18:02 UTC (permalink / raw)
  To: Mike Turquette
  Cc: linux-sh, linux-kernel, Laurent Pinchart, Geert Uytterhoeven

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

The MSTP[SC]R registers have clock stop bits, not clock enable bits. The
bit value should thus be inverted in the is_enabled() operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Mike Turquette <mturquette@linaro.org>
---
v3:
  - This depends on commit 3c90c55dcde745bed81f6447f24ba96bda43d984
    ("drivers: sh: compile drivers/sh/pm_runtime.c if
    ARCH_SHMOBILE_MULTI"), which has entered mainline in v3.15-rc6.

v2:
  - New
---
 drivers/clk/shmobile/clk-mstp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c
index 1f6324e29a80..2d2fe773ac81 100644
--- a/drivers/clk/shmobile/clk-mstp.c
+++ b/drivers/clk/shmobile/clk-mstp.c
@@ -112,7 +112,7 @@ static int cpg_mstp_clock_is_enabled(struct clk_hw *hw)
 	else
 		value = clk_readl(group->smstpcr);
 
-	return !!(value & BIT(clock->bit_index));
+	return !(value & BIT(clock->bit_index));
 }
 
 static const struct clk_ops cpg_mstp_clock_ops = {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] clk: shmobile: mstp: Fix the is_enabled() operation
  2014-05-22 18:02 [PATCH v3] clk: shmobile: mstp: Fix the is_enabled() operation Geert Uytterhoeven
@ 2014-05-27  1:02 ` Magnus Damm
  2014-05-27  8:04   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Magnus Damm @ 2014-05-27  1:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mike Turquette, SH-Linux, linux-kernel, Laurent Pinchart

On Fri, May 23, 2014 at 3:02 AM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
> The MSTP[SC]R registers have clock stop bits, not clock enable bits. The
> bit value should thus be inverted in the is_enabled() operation.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Mike Turquette <mturquette@linaro.org>
> ---
> v3:
>   - This depends on commit 3c90c55dcde745bed81f6447f24ba96bda43d984
>     ("drivers: sh: compile drivers/sh/pm_runtime.c if
>     ARCH_SHMOBILE_MULTI"), which has entered mainline in v3.15-rc6.

Hi Geert,

Thanks for resubmitting this fix. Do you intend to get this included
in v3.15 (seems unlikely) or is your target v3.16?

Cheers,

/ magnus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] clk: shmobile: mstp: Fix the is_enabled() operation
  2014-05-27  1:02 ` Magnus Damm
@ 2014-05-27  8:04   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-05-27  8:04 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Geert Uytterhoeven, Mike Turquette, SH-Linux, linux-kernel,
	Laurent Pinchart

Hi Magnus,

On Tue, May 27, 2014 at 3:02 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Fri, May 23, 2014 at 3:02 AM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
>> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>>
>> The MSTP[SC]R registers have clock stop bits, not clock enable bits. The
>> bit value should thus be inverted in the is_enabled() operation.
>>
>> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> Cc: Mike Turquette <mturquette@linaro.org>
>> ---
>> v3:
>>   - This depends on commit 3c90c55dcde745bed81f6447f24ba96bda43d984
>>     ("drivers: sh: compile drivers/sh/pm_runtime.c if
>>     ARCH_SHMOBILE_MULTI"), which has entered mainline in v3.15-rc6.
>
> Thanks for resubmitting this fix. Do you intend to get this included
> in v3.15 (seems unlikely) or is your target v3.16?

3.16 is OK. The only ill effect is that some clocks may be enabled,
while they're
not needed.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-27  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-22 18:02 [PATCH v3] clk: shmobile: mstp: Fix the is_enabled() operation Geert Uytterhoeven
2014-05-27  1:02 ` Magnus Damm
2014-05-27  8:04   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).