From: Heiko Schocher <hs@denx.de>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: Wolfgang Denk <wd@denx.de>, Vitaly Bordug <vbordug@ru.mvista.com>,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH] drivers, char: add U-Boot bootcount driver
Date: Mon, 05 Dec 2011 15:39:46 +0100 [thread overview]
Message-ID: <4EDCD7B2.5030409@denx.de> (raw)
In-Reply-To: <20111204114741.GA5788@pengutronix.de>
Hello Wolfram,
Wolfram Sang wrote:
> On Sun, Dec 04, 2011 at 10:45:21AM +0100, Heiko Schocher wrote:
>> This driver implements the Linux kernel half of the boot count feature -
>> the boot counter can only be reset after it is clear that the
>> application has been started and is running correctly, which usually
>> can only be determined by the application code itself. Thus the reset
>> of the boot counter must be done by application code, which thus needs
>> an appropriate driver.
>
> An appropriate mechanism, not necessarily a driver, see below.
>
>> Required feature by the Carrier Grade Linux Requirements Definition;
>> see for example document "Carrier Grade Linux Requirements Definition
>> Overview V3.0" at
>>
>> http://www.linuxfoundation.org/collaborate/workgroups/cgl/requirements#SMM.6.0_Boot_Cycle_Detection
>>
>> Description: OSDL CGL specifies that carrier grade Linux
>> shall provide support for detecting a repeating reboot cycle
>> due to recurring failures. This detection should happen in
>> user space before system services are started.
>
> So, technically, a flag would be enough, not necessarily a counter? Although a
> counter probably has more advantages...
>
>> This driver provides read/write access to the U-Boot bootcounter
>> through PROC FS and/or sysFS file.
>
> Why ProcFS? Why ProcFS and/or SysFS? Which has priority? Why not /dev?
I drop the ProcFS support for v2.
>> The bootcountregister gets configured via DTS.
>> for example on the enbw_cmc board:
>>
>> bootcount@0x23060 {
>> compatible = "uboot,bootcount";
>
> No. I assume you are not the vendor of what is at 0x23060, the actual device.
> Only the device must be encoded in the compatible-entry which then implies the
> bootcount functionality. Also, keep in mind that your solution should be
> generic for bootloaders.
So I should call it compatible = "generic, bootcount" ?
>> reg = <0x23060 0x20>;
>
> I assume that non-volatile memory would qualify as a boot-counter, so those
> could be tied to I2C busses etc? reg would not fit then.
Currently, mem only supported, add this to the Documentation and log
message.
> I do wonder if it makes more sense to add such functionality to the
> watchdog-core to save the additional device (CCed). Needs a second thought,
> though...
Thanks!
bye,
heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Schocher <hs-ynQEQJNshbs@public.gmane.org>
To: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Wolfgang Denk <wd-ynQEQJNshbs@public.gmane.org>,
Vitaly Bordug <vbordug-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] drivers, char: add U-Boot bootcount driver
Date: Mon, 05 Dec 2011 15:39:46 +0100 [thread overview]
Message-ID: <4EDCD7B2.5030409@denx.de> (raw)
In-Reply-To: <20111204114741.GA5788-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Hello Wolfram,
Wolfram Sang wrote:
> On Sun, Dec 04, 2011 at 10:45:21AM +0100, Heiko Schocher wrote:
>> This driver implements the Linux kernel half of the boot count feature -
>> the boot counter can only be reset after it is clear that the
>> application has been started and is running correctly, which usually
>> can only be determined by the application code itself. Thus the reset
>> of the boot counter must be done by application code, which thus needs
>> an appropriate driver.
>
> An appropriate mechanism, not necessarily a driver, see below.
>
>> Required feature by the Carrier Grade Linux Requirements Definition;
>> see for example document "Carrier Grade Linux Requirements Definition
>> Overview V3.0" at
>>
>> http://www.linuxfoundation.org/collaborate/workgroups/cgl/requirements#SMM.6.0_Boot_Cycle_Detection
>>
>> Description: OSDL CGL specifies that carrier grade Linux
>> shall provide support for detecting a repeating reboot cycle
>> due to recurring failures. This detection should happen in
>> user space before system services are started.
>
> So, technically, a flag would be enough, not necessarily a counter? Although a
> counter probably has more advantages...
>
>> This driver provides read/write access to the U-Boot bootcounter
>> through PROC FS and/or sysFS file.
>
> Why ProcFS? Why ProcFS and/or SysFS? Which has priority? Why not /dev?
I drop the ProcFS support for v2.
>> The bootcountregister gets configured via DTS.
>> for example on the enbw_cmc board:
>>
>> bootcount@0x23060 {
>> compatible = "uboot,bootcount";
>
> No. I assume you are not the vendor of what is at 0x23060, the actual device.
> Only the device must be encoded in the compatible-entry which then implies the
> bootcount functionality. Also, keep in mind that your solution should be
> generic for bootloaders.
So I should call it compatible = "generic, bootcount" ?
>> reg = <0x23060 0x20>;
>
> I assume that non-volatile memory would qualify as a boot-counter, so those
> could be tied to I2C busses etc? reg would not fit then.
Currently, mem only supported, add this to the Documentation and log
message.
> I do wonder if it makes more sense to add such functionality to the
> watchdog-core to save the additional device (CCed). Needs a second thought,
> though...
Thanks!
bye,
heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2011-12-05 14:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-04 9:45 [PATCH] drivers, char: add U-Boot bootcount driver Heiko Schocher
2011-12-04 9:45 ` Heiko Schocher
2011-12-04 10:34 ` Matthias Kaehlcke
2011-12-04 11:47 ` Wolfram Sang
2011-12-04 16:34 ` Wolfgang Denk
2011-12-04 16:34 ` Wolfgang Denk
2011-12-05 7:43 ` Thierry Reding
2011-12-05 7:43 ` Thierry Reding
2011-12-05 14:39 ` Heiko Schocher [this message]
2011-12-05 14:39 ` Heiko Schocher
2011-12-06 21:50 ` Wolfram Sang
2011-12-06 21:56 ` Wolfgang Denk
2011-12-06 21:56 ` Wolfgang Denk
2011-12-06 21:56 ` Wolfgang Denk
2011-12-06 22:06 ` Wolfram Sang
2011-12-06 23:22 ` Rob Herring
2012-01-30 12:35 ` Heiko Schocher
2012-01-30 12:35 ` Heiko Schocher
2011-12-04 16:42 ` Paul Bolle
2011-12-04 23:30 ` Ryan Mallon
2011-12-04 23:30 ` Ryan Mallon
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=4EDCD7B2.5030409@denx.de \
--to=hs@denx.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=vbordug@ru.mvista.com \
--cc=w.sang@pengutronix.de \
--cc=wd@denx.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.