linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memory: RENESAS_RPCIF should select RESET_CONTROLLER
@ 2021-10-05 15:23 Geert Uytterhoeven
  2021-10-05 15:28 ` Geert Uytterhoeven
  2021-10-05 15:56 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-10-05 15:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Lad Prabhakar, Wolfram Sang, Sergey Shtylyov
  Cc: Philipp Zabel, linux-renesas-soc, linux-kernel, Geert Uytterhoeven

The Renesas RPC-IF driver calls devm_reset_control_get_exclusive(),
which returns -ENOTSUPP if CONFIG_RESET_CONTROLLER is not enabled.
Even if this error is ignored, later calls to reset_control_reset() will
fail with a scary WARN_ON() backtrace.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/memory/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 72c0df129d5c5065..547f956f6c29e9bd 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -210,6 +210,7 @@ config RENESAS_RPCIF
 	tristate "Renesas RPC-IF driver"
 	depends on ARCH_RENESAS || COMPILE_TEST
 	select REGMAP_MMIO
+	select RESET_CONTROLLER
 	help
 	  This supports Renesas R-Car Gen3 or RZ/G2 RPC-IF which provides
 	  either SPI host or HyperFlash. You'll have to select individual
-- 
2.25.1


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

* Re: [PATCH] memory: RENESAS_RPCIF should select RESET_CONTROLLER
  2021-10-05 15:23 [PATCH] memory: RENESAS_RPCIF should select RESET_CONTROLLER Geert Uytterhoeven
@ 2021-10-05 15:28 ` Geert Uytterhoeven
  2021-10-05 15:56 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-10-05 15:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lad Prabhakar, Wolfram Sang, Sergey Shtylyov, Philipp Zabel,
	Linux-Renesas, Linux Kernel Mailing List

On Tue, Oct 5, 2021 at 5:23 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> The Renesas RPC-IF driver calls devm_reset_control_get_exclusive(),
> which returns -ENOTSUPP if CONFIG_RESET_CONTROLLER is not enabled.
> Even if this error is ignored, later calls to reset_control_reset() will
> fail with a scary WARN_ON() backtrace.

Oops, the latter is not true.
reset_control_reset() returns 0 if CONFIG_RESET_CONTROLLER=n.

>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/memory/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 72c0df129d5c5065..547f956f6c29e9bd 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -210,6 +210,7 @@ config RENESAS_RPCIF
>         tristate "Renesas RPC-IF driver"
>         depends on ARCH_RENESAS || COMPILE_TEST
>         select REGMAP_MMIO
> +       select RESET_CONTROLLER
>         help
>           This supports Renesas R-Car Gen3 or RZ/G2 RPC-IF which provides
>           either SPI host or HyperFlash. You'll have to select individual
> --
> 2.25.1
>


-- 
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

* Re: [PATCH] memory: RENESAS_RPCIF should select RESET_CONTROLLER
  2021-10-05 15:23 [PATCH] memory: RENESAS_RPCIF should select RESET_CONTROLLER Geert Uytterhoeven
  2021-10-05 15:28 ` Geert Uytterhoeven
@ 2021-10-05 15:56 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2021-10-05 15:56 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Krzysztof Kozlowski, Lad Prabhakar, Sergey Shtylyov,
	Philipp Zabel, linux-renesas-soc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

On Tue, Oct 05, 2021 at 05:23:02PM +0200, Geert Uytterhoeven wrote:
> The Renesas RPC-IF driver calls devm_reset_control_get_exclusive(),
> which returns -ENOTSUPP if CONFIG_RESET_CONTROLLER is not enabled.
> Even if this error is ignored, later calls to reset_control_reset() will
> fail with a scary WARN_ON() backtrace.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Yes, it is required. With the latter paragraph in the commit message
removed:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-10-05 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 15:23 [PATCH] memory: RENESAS_RPCIF should select RESET_CONTROLLER Geert Uytterhoeven
2021-10-05 15:28 ` Geert Uytterhoeven
2021-10-05 15:56 ` Wolfram Sang

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).