All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-watchdog@vger.kernel.org,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Lior Amsalem <alior@marvell.com>,
	Tawfik Bayouk <tawfik@marvell.com>,
	Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [PATCH 0/2] Watchdog on Armada 375 SoC
Date: Fri, 28 Feb 2014 12:09:26 -0300	[thread overview]
Message-ID: <20140228150925.GC24805@localhost> (raw)
In-Reply-To: <20140226203633.GA24656@obsidianresearch.com>

On Wed, Feb 26, 2014 at 01:36:33PM -0700, Jason Gunthorpe wrote:
> On Wed, Feb 26, 2014 at 09:50:45AM -0300, Ezequiel Garcia wrote:
>  
> > Here we found both the above RSTOUT:
> > 
> > 1. It has the same dedicated register as A370/XP (0x20704)
> > 2. Also has a bit in the shared RSTOUT register (0x18254)
> 
> Unless you know otherwise I think the same risk exists, RSTOUT could
> be (or become) internally asserted when you unmask the bit in the
> control register that drives the pin, which says the watchdog driver
> should control to it.
> 

I guess it's also possible to have the system-controller ensure the
watchdog is fully stopped, before unmasking the shared RSTOUT.

However, it seems it would be too ugly and hackish.

> > 
> > 	watchdog-timer@20300 {
> > 		compatible = "marvell,orion-wdt";
> > 		reg = <0x20300 0x28
> > 		       {shared RSOUT} 0x4
> > 		       0x0 0x0>;
> > 	};
> 
> I wouldn't have the 0x0, if you want to go this way, just make the
> 375 compatible string require a 3 entry reg.
> 

Yes, this sounds like the right thing to do. It means we need to also
have per-SoC hooks for stop() and is_enabled(), but it's the price to
pay for changing the register semantic: the shared RSTOUT has unmask/mask
semantics on A375, while it's enable/disable on Kirkwood and friends.

Let me cook a new patch.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] Watchdog on Armada 375 SoC
Date: Fri, 28 Feb 2014 12:09:26 -0300	[thread overview]
Message-ID: <20140228150925.GC24805@localhost> (raw)
In-Reply-To: <20140226203633.GA24656@obsidianresearch.com>

On Wed, Feb 26, 2014 at 01:36:33PM -0700, Jason Gunthorpe wrote:
> On Wed, Feb 26, 2014 at 09:50:45AM -0300, Ezequiel Garcia wrote:
>  
> > Here we found both the above RSTOUT:
> > 
> > 1. It has the same dedicated register as A370/XP (0x20704)
> > 2. Also has a bit in the shared RSTOUT register (0x18254)
> 
> Unless you know otherwise I think the same risk exists, RSTOUT could
> be (or become) internally asserted when you unmask the bit in the
> control register that drives the pin, which says the watchdog driver
> should control to it.
> 

I guess it's also possible to have the system-controller ensure the
watchdog is fully stopped, before unmasking the shared RSTOUT.

However, it seems it would be too ugly and hackish.

> > 
> > 	watchdog-timer at 20300 {
> > 		compatible = "marvell,orion-wdt";
> > 		reg = <0x20300 0x28
> > 		       {shared RSOUT} 0x4
> > 		       0x0 0x0>;
> > 	};
> 
> I wouldn't have the 0x0, if you want to go this way, just make the
> 375 compatible string require a 3 entry reg.
> 

Yes, this sounds like the right thing to do. It means we need to also
have per-SoC hooks for stop() and is_enabled(), but it's the price to
pay for changing the register semantic: the shared RSTOUT has unmask/mask
semantics on A375, while it's enable/disable on Kirkwood and friends.

Let me cook a new patch.
-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

  reply	other threads:[~2014-02-28 15:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 12:50 [PATCH 0/2] Watchdog on Armada 375 SoC Ezequiel Garcia
2014-02-26 12:50 ` Ezequiel Garcia
2014-02-26 12:50 ` [PATCH 1/2] ARM: mvebu: Enable Armada 375 watchdog in the devicetree Ezequiel Garcia
2014-02-26 12:50   ` Ezequiel Garcia
2014-02-26 12:50 ` [PATCH 2/2] ARM: mvebu: system-controller: Add A375 initialization Ezequiel Garcia
2014-02-26 12:50   ` Ezequiel Garcia
2014-02-26 20:36 ` [PATCH 0/2] Watchdog on Armada 375 SoC Jason Gunthorpe
2014-02-26 20:36   ` Jason Gunthorpe
2014-02-28 15:09   ` Ezequiel Garcia [this message]
2014-02-28 15:09     ` Ezequiel Garcia

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=20140228150925.GC24805@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tawfik@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --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.