Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1450458

Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

From Scott Wood <oss@buserror.net>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler
Date 2016-07-26 10:00 +0200
Message-ID <rZ5rr-7Gb-9@gated-at.bofh.it> (permalink)
References <rZ2ad-5NX-3@gated-at.bofh.it> <rZ2ae-5NX-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2016-07-25 at 21:25 -0700, Andrey Smirnov wrote:
> Convert fsl_rstcr_restart into a function to be registered with
> register_reset_handler() API and introduce fls_rstcr_restart_register()
> function that can be added as an initcall that would do aforementioned
> registration.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>

Is there a particular motivation for this (e.g. new handlers you plan to
register elsewhere)?

> diff --git a/arch/powerpc/platforms/85xx/bsc913x_qds.c
> b/arch/powerpc/platforms/85xx/bsc913x_qds.c
> index 07dd6ae..14ea7a0 100644
> --- a/arch/powerpc/platforms/85xx/bsc913x_qds.c
> +++ b/arch/powerpc/platforms/85xx/bsc913x_qds.c
> @@ -53,6 +53,7 @@ static void __init bsc913x_qds_setup_arch(void)
>  }
>  
>  machine_arch_initcall(bsc9132_qds, mpc85xx_common_publish_devices);
> +machine_arch_initcall(bsc9133_qds, fsl_rstcr_restart_register);

Do we really still need to call the registration on a per-board basis, now
that boards have a way of registering a higher-priority notifier?  Can't we
just have setup_rstcr() do the registration when it finds the appropriate
device tree node?

> +int fsl_rstcr_restart_register(void)
> +{
> +	static struct notifier_block restart_handler;
> +
> +	restart_handler.notifier_call = fsl_rstcr_restart;
> +	restart_handler.priority = 128;
> +
> +	return register_restart_handler(&restart_handler);
> +}
> +EXPORT_SYMBOL(fsl_rstcr_restart_register);

When would this ever get called from a module?

-Scott

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] powerpc: Factor out common code in setup-common.c Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-07-26 06:30 +0200
  [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-07-26 06:30 +0200
    Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset  handler Scott Wood <oss@buserror.net> - 2016-07-26 10:00 +0200
      Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset  handler Scott Wood <oss@buserror.net> - 2016-07-26 23:30 +0200
      Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-07-26 23:30 +0200

csiph-web