From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [RFC 10/37] soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2 Date: Fri, 26 Jan 2018 11:30:38 +0300 Message-ID: References: <1516903391-30467-1-git-send-email-fabrizio.castro@bp.renesas.com> <1516903391-30467-11-git-send-email-fabrizio.castro@bp.renesas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1516903391-30467-11-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> Content-Language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Fabrizio Castro , Philipp Zabel , Rob Herring , Mark Rutland , Wim Van Sebroeck , Russell King , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Simon Horman , Magnus Damm , Geert Uytterhoeven Cc: Guenter Roeck , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Chris Paterson , Biju Das , Ramesh Shanmugasundaram List-Id: devicetree@vger.kernel.org Hello! On 1/25/2018 9:02 PM, Fabrizio Castro wrote: > This patch allows for platform specific quirks as some of the SoC need > further customization for the watchdog to work properly, like for R-Car > Gen2 and for RZ/G. > > Signed-off-by: Fabrizio Castro > Signed-off-by: Ramesh Shanmugasundaram > --- > drivers/soc/renesas/rcar-rst.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > > diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c > index f7a0d54..5f52aea 100644 > --- a/drivers/soc/renesas/rcar-rst.c > +++ b/drivers/soc/renesas/rcar-rst.c > @@ -13,8 +13,18 @@ > #include > #include > > +#define WDTRSTCR_RESET 0xA55A0002 > +#define WDTRSTCR 0x0054 > + > +static int gen2_configuration(void __iomem *base) > +{ > + iowrite32(WDTRSTCR_RESET, base + WDTRSTCR); > + return 0; > +} > + > struct rst_config { > - unsigned int modemr; /* Mode Monitoring Register Offset */ > + unsigned int modemr; /* Mode Monitoring Register Offset */ > + int (*configure)(void *base); /* Platform specific configuration */ > }; > > static const struct rst_config rcar_rst_gen1 __initconst = { > @@ -23,6 +33,7 @@ static const struct rst_config rcar_rst_gen1 __initconst = { > > static const struct rst_config rcar_rst_gen2 __initconst = { > .modemr = 0x60, > + .configure = gen2_configuration, Why not call the method gen2_configure() then? [...] MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html