From: Arnd Bergmann <arnd@arndb.de>
To: Domenico Andreoli <cavokz@gmail.com>
Cc: Domenico Andreoli <domenico.andreoli@linux.com>,
Olof Johansson <olof@lixom.net>, Wim Van Sebroeck <wim@iguana.be>,
"Russell King - ARM Linux" <linux@arm.linux.org.uk>,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 4/4] ARM: bcm4760: Add restart hook
Date: Mon, 16 Sep 2013 10:45:16 +0200 [thread overview]
Message-ID: <201309161045.17069.arnd@arndb.de> (raw)
In-Reply-To: <20130916071821.GA18210@glitch>
On Monday 16 September 2013, Domenico Andreoli wrote:
> On Sun, Sep 15, 2013 at 10:10:36PM +0200, Arnd Bergmann wrote:
> > On Sunday 15 September 2013, Domenico Andreoli wrote:
> > > issue here is that there is already a proper watchdog driver, the sp805.
> > >
> > > so I guess now the task shifts to adding restart hook support to it, right?
> >
> > Yes, correct.
> >
> > There is an interesting question however: we have to deal with the same driver
> > being used in some machines that need to use it as the only way to reset the
> > system, as well as the case where you actually want to use some other method.
>
> in a certain sense, there is space for a generic watchdog based restart
> hook mechanism but the current watchdog ops do not provide the necessary
> guarantees in atomic context.
It sounds like a good idea. I see another problem there, which is that registering
a restart hook is architecture specific at the moment, so it would also require
generalizing that, or alternatively keeping watchdog based restart specific to
ARM and any architecture that adds support in a similar way.
> > An easy way to handle this would be a boolean device tree property that
> > tells the driver whether or not to register, but we might want to
> > come up with a more sophisticated way to have multiple reset handlers
> > registered an prioritized so we try the "best" one first. Maybe someone
> > else has an opinion on this. If not, just do the property.
>
> the simplest solution I see is adding a DT option to the sp805 driver so
> that it registers the restart hook when asked to do so.
>
> need to investigate whether the sp805 DT support is provided by some generic
> AMBA mechanism or is completely missing.
I think it should just work if you put the right properties into DT: it only
uses one memory resource (from "reg" property) and one clk (from "clocks"
property), and those are automatically there for AMBA devices. If the hardware
does not fill the correct primecell ID, you may have to add a
"arm,primecell-periphid=<0x00141805>" property.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 4/4] ARM: bcm4760: Add restart hook
Date: Mon, 16 Sep 2013 10:45:16 +0200 [thread overview]
Message-ID: <201309161045.17069.arnd@arndb.de> (raw)
In-Reply-To: <20130916071821.GA18210@glitch>
On Monday 16 September 2013, Domenico Andreoli wrote:
> On Sun, Sep 15, 2013 at 10:10:36PM +0200, Arnd Bergmann wrote:
> > On Sunday 15 September 2013, Domenico Andreoli wrote:
> > > issue here is that there is already a proper watchdog driver, the sp805.
> > >
> > > so I guess now the task shifts to adding restart hook support to it, right?
> >
> > Yes, correct.
> >
> > There is an interesting question however: we have to deal with the same driver
> > being used in some machines that need to use it as the only way to reset the
> > system, as well as the case where you actually want to use some other method.
>
> in a certain sense, there is space for a generic watchdog based restart
> hook mechanism but the current watchdog ops do not provide the necessary
> guarantees in atomic context.
It sounds like a good idea. I see another problem there, which is that registering
a restart hook is architecture specific at the moment, so it would also require
generalizing that, or alternatively keeping watchdog based restart specific to
ARM and any architecture that adds support in a similar way.
> > An easy way to handle this would be a boolean device tree property that
> > tells the driver whether or not to register, but we might want to
> > come up with a more sophisticated way to have multiple reset handlers
> > registered an prioritized so we try the "best" one first. Maybe someone
> > else has an opinion on this. If not, just do the property.
>
> the simplest solution I see is adding a DT option to the sp805 driver so
> that it registers the restart hook when asked to do so.
>
> need to investigate whether the sp805 DT support is provided by some generic
> AMBA mechanism or is completely missing.
I think it should just work if you put the right properties into DT: it only
uses one memory resource (from "reg" property) and one clk (from "clocks"
property), and those are automatically there for AMBA devices. If the hardware
does not fill the correct primecell ID, you may have to add a
"arm,primecell-periphid=<0x00141805>" property.
Arnd
next prev parent reply other threads:[~2013-09-16 8:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-14 15:20 [PATCH v4 0/4] ARM: Broadcom BCM4760 support Domenico Andreoli
2013-09-14 15:20 ` [PATCH v4 1/4] ARM: bcm4760: Add platform infrastructure Domenico Andreoli
2013-09-15 18:03 ` Arnd Bergmann
2013-09-14 15:20 ` [PATCH v4 2/4] ARM: bcm4760: Add system timer Domenico Andreoli
2013-09-14 15:20 ` [PATCH v4 3/4] ARM: bcm4760: Add ripple counter Domenico Andreoli
2013-09-14 15:20 ` [PATCH v4 4/4] ARM: bcm4760: Add restart hook Domenico Andreoli
2013-09-15 18:09 ` Arnd Bergmann
2013-09-15 18:09 ` Arnd Bergmann
2013-09-15 18:52 ` Domenico Andreoli
2013-09-15 18:52 ` Domenico Andreoli
2013-09-15 20:10 ` Arnd Bergmann
2013-09-15 20:10 ` Arnd Bergmann
2013-09-16 7:18 ` Domenico Andreoli
2013-09-16 7:18 ` Domenico Andreoli
2013-09-16 8:45 ` Arnd Bergmann [this message]
2013-09-16 8:45 ` Arnd Bergmann
2013-09-16 12:00 ` Wim Van Sebroeck
2013-09-16 20:01 ` Arnd Bergmann
2013-09-16 20:01 ` Arnd Bergmann
2013-09-30 14:02 ` Domenico Andreoli
2013-09-30 14:02 ` Domenico Andreoli
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=201309161045.17069.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=cavokz@gmail.com \
--cc=domenico.andreoli@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
--cc=wim@iguana.be \
/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.