From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755572AbcGZH7W (ORCPT ); Tue, 26 Jul 2016 03:59:22 -0400 Received: from host.buserror.net ([209.198.135.123]:42042 "EHLO host.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753285AbcGZH7V (ORCPT ); Tue, 26 Jul 2016 03:59:21 -0400 Message-ID: <1469519945.25630.105.camel@buserror.net> From: Scott Wood To: Andrey Smirnov , linuxppc-dev@lists.ozlabs.org Cc: Kumar Gala , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Alessio Igor Bogani , Daniel Axtens , linux-kernel@vger.kernel.org Date: Tue, 26 Jul 2016 02:59:05 -0500 In-Reply-To: <1469507114-5788-3-git-send-email-andrew.smirnov@gmail.com> References: <1469507114-5788-1-git-send-email-andrew.smirnov@gmail.com> <1469507114-5788-3-git-send-email-andrew.smirnov@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 75.72.173.242 X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Subject: Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on host.buserror.net) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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