From: Chris Brandt <Chris.Brandt@renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Wolfram Sang <wsa@the-dreams.de>,
Simon Horman <horms@verge.net.au>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH] ARM: shmobile: r7s72100: add restart handler
Date: Fri, 10 Feb 2017 19:46:17 +0000 [thread overview]
Message-ID: <SG2PR06MB11654A11A81D46A70DB1D1BF8A440@SG2PR06MB1165.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdXp-V393uR_-vhDSZyiXTD-+WxeNuchAK89YNKz+yPWdg@mail.gmail.com>
Hi Geert,
On Friday, February 10, 2017, Geert Uytterhoeven wrote:
> Alternatively, you can write a restart driver (cfr.
> drivers/power/reset/rmobile-reset.c) that binds against a
> "renesas,r7s72100-wdt" device node, but doesn't implement watchdog
> functionality.
> You're gonna need DT bindings anyway.
I like that idea. That should take me no time at all.
Thank you.
Do you think I can still keep my 'weak function' idea in there??
extern void __attribute__ ((weak)) prepare_for_restart(void)
{
/* override to do board specific stuff */
}
static int renesas_wdt_reset_handler(struct notifier_block *this,
unsigned long mode, void *cmd)
{
pr_debug("%s %lu\n", __func__, mode);
prepare_for_restart();
/* set WDT for reset */
. . .
return NOTIFY_DONE;
}
Or...do you think I can just use the rmobile-reset.c driver and
just add WDT to it?
Honestly, the only thing different will be rmobile_reset_handler().
I could make a rmobile_wdt_reset_handler() and I could just pass in
a different notifier_block depending on the DT.
What do you think?
static const struct of_device_id rmobile_reset_of_match[] = {
{ .compatible = "renesas,sysc-rmobile", },
{ .compatible = "renesas,wdt-rmobile", },
{ /* sentinel */ }
};
Chris
next prev parent reply other threads:[~2017-02-10 19:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 19:12 [PATCH] ARM: shmobile: r7s72100: add restart handler Chris Brandt
2017-02-10 7:09 ` Geert Uytterhoeven
2017-02-10 14:59 ` Chris Brandt
2017-02-10 15:32 ` Geert Uytterhoeven
2017-02-10 15:38 ` Wolfram Sang
2017-02-10 19:46 ` Chris Brandt [this message]
2017-02-13 10:41 ` Geert Uytterhoeven
2017-02-13 11:50 ` Chris Brandt
2017-02-13 13:36 ` Chris Brandt
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=SG2PR06MB11654A11A81D46A70DB1D1BF8A440@SG2PR06MB1165.apcprd06.prod.outlook.com \
--to=chris.brandt@renesas.com \
--cc=geert@linux-m68k.org \
--cc=horms@verge.net.au \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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.