All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 2/2] watchdog: at91rm9200 remove mach/ header dependency
Date: Fri, 31 Oct 2014 21:59:43 +0100	[thread overview]
Message-ID: <20141031205943.GC11327@piout.net> (raw)
In-Reply-To: <1840711.B9Yu766vja@wuerfel>

On 31/10/2014 at 21:53:03 +0100, Arnd Bergmann wrote :
> On Friday 31 October 2014 21:45:59 Alexandre Belloni wrote:
> > Remove the mach/ header dependency by including the necessary macros and taking
> > the appropriate resources from the system timer.
> > 
> > Also allow to compile both the at91rm920 and at91sam9 watchdog drivers at the
> > same time.
> > 
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> 
> Please list me in the changelog as well, either in free-form or as
> Suggested-by.

Sure, I was thinking about putting your sob there too and forgot...

> >  
> > +static struct of_device_id at91rm9200_st_timer_ids[] = {
> > +	{ .compatible = "atmel,at91rm9200-st" },
> > +	{ /* sentinel */ }
> > +};
> > +
> >  static int at91wdt_probe(struct platform_device *pdev)
> >  {
> > +	struct resource *regs;
> > +	struct resource _regs;
> >  	int res;
> >  
> >  	if (at91wdt_miscdev.parent)
> >  		return -EBUSY;
> >  	at91wdt_miscdev.parent = &pdev->dev;
> >  
> > +	if (pdev->dev.of_node) {
> > +		struct device_node *np;
> > +
> > +		np = of_find_matching_node(NULL, at91rm9200_st_timer_ids);
> > +		if (!np)
> > +			return -ENXIO;
> > +		if (of_address_to_resource(np, 0, &_regs))
> > +			return -ENXIO;
> > +		regs = &_regs;
> > +	} else {
> > +		regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	}
> 
> What was wrong with my approach of binding the driver to the
> "atmel,at91rm9200-st" node?
> 

I would enable and start the watchdog on all the rm9200 based platform,
something that we probably don't want.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] watchdog: at91rm9200 remove mach/ header dependency
Date: Fri, 31 Oct 2014 21:59:43 +0100	[thread overview]
Message-ID: <20141031205943.GC11327@piout.net> (raw)
In-Reply-To: <1840711.B9Yu766vja@wuerfel>

On 31/10/2014 at 21:53:03 +0100, Arnd Bergmann wrote :
> On Friday 31 October 2014 21:45:59 Alexandre Belloni wrote:
> > Remove the mach/ header dependency by including the necessary macros and taking
> > the appropriate resources from the system timer.
> > 
> > Also allow to compile both the at91rm920 and at91sam9 watchdog drivers at the
> > same time.
> > 
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> 
> Please list me in the changelog as well, either in free-form or as
> Suggested-by.

Sure, I was thinking about putting your sob there too and forgot...

> >  
> > +static struct of_device_id at91rm9200_st_timer_ids[] = {
> > +	{ .compatible = "atmel,at91rm9200-st" },
> > +	{ /* sentinel */ }
> > +};
> > +
> >  static int at91wdt_probe(struct platform_device *pdev)
> >  {
> > +	struct resource *regs;
> > +	struct resource _regs;
> >  	int res;
> >  
> >  	if (at91wdt_miscdev.parent)
> >  		return -EBUSY;
> >  	at91wdt_miscdev.parent = &pdev->dev;
> >  
> > +	if (pdev->dev.of_node) {
> > +		struct device_node *np;
> > +
> > +		np = of_find_matching_node(NULL, at91rm9200_st_timer_ids);
> > +		if (!np)
> > +			return -ENXIO;
> > +		if (of_address_to_resource(np, 0, &_regs))
> > +			return -ENXIO;
> > +		regs = &_regs;
> > +	} else {
> > +		regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	}
> 
> What was wrong with my approach of binding the driver to the
> "atmel,at91rm9200-st" node?
> 

I would enable and start the watchdog on all the rm9200 based platform,
something that we probably don't want.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-10-31 20:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 20:45 [PATCH 1/2] ARM: at91: rm9200 add system timer resources to watchdog Alexandre Belloni
2014-10-31 20:45 ` Alexandre Belloni
2014-10-31 20:45 ` [PATCH 2/2] watchdog: at91rm9200 remove mach/ header dependency Alexandre Belloni
2014-10-31 20:45   ` Alexandre Belloni
2014-10-31 20:53   ` Arnd Bergmann
2014-10-31 20:53     ` Arnd Bergmann
2014-10-31 20:59     ` Alexandre Belloni [this message]
2014-10-31 20:59       ` Alexandre Belloni
2014-10-31 20:50 ` [PATCH 1/2] ARM: at91: rm9200 add system timer resources to watchdog Arnd Bergmann
2014-10-31 20:50   ` Arnd Bergmann
2014-10-31 20:57   ` Alexandre Belloni
2014-10-31 20:57     ` Alexandre Belloni
2014-10-31 21:36     ` Arnd Bergmann
2014-10-31 21:36       ` Arnd Bergmann
2014-11-04 22:41       ` Alexandre Belloni
2014-11-04 22:41         ` Alexandre Belloni
2014-11-05  9:58         ` Arnd Bergmann
2014-11-05  9:58           ` Arnd Bergmann

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=20141031205943.GC11327@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=arnd@arndb.de \
    --cc=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.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.