All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Andrew Chew <AChew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: "robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
	"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org"
	<rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
	"thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org"
	<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"dgreid-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org"
	<dgreid-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"katierh-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org"
	<katierh-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v1] ARM: tegra: add nvidia,wdt-timer-id optional property
Date: Mon, 03 Feb 2014 14:26:44 -0700	[thread overview]
Message-ID: <52F00994.7080701@wwwdotorg.org> (raw)
In-Reply-To: <643E69AA4436674C8F39DCC2C05F7638631998538B-lR+7xdUAJVNDw2glCA4ptUEOCMrvLtNR@public.gmane.org>

On 02/03/2014 02:16 PM, Andrew Chew wrote:
>> On 02/03/2014 11:59 AM, Andrew Chew wrote:
>>>> On Fri, Jan 31, 2014 at 09:46:51PM +0000, Andrew Chew wrote:
>>>>> This optional property can be used to specify which timers are to be
>>>>> used for hardware watchdog timeouts (via a tegra wdt driver).
>>>>
>>>> Is there any reason that a particular timer should be used?
>>>
>>> I worry about colliding with other timer allocations, and wanted to be
>>> flexible in this regard.
>>
>> Are the other timer allocations represented in DT, or simply made by or hard-
>> coded in the driver? If the former, this property seems like a good equivalent
>> of any existing allocations. If the latter, can't the driver just allocate or hard-
>> code the allocation in the same way as any existing allocations?
> 
> From what I've seen, timer allocations are just hard-coded into whatever driver.
> I didn't think this was a particularly good idea, since when writing other drivers
> that for some reason need a timer, the author has to be aware of allocations
> made in other, barely related drivers.

I'm not sure that they would; why wouldn't the timer driver register the
various timers with standard Linux APIs which the clients talk to, thus
avoiding the clients having any knowledge at all of which channels are
used for what.

If you're talking about the watchdog driver, then can't we just create a
shared header file that the clocksource and watchdog drivers both
include, which defines the timer ID allocations?

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Andrew Chew <AChew@nvidia.com>, Mark Rutland <mark.rutland@arm.com>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
	Pawel Moll <Pawel.Moll@arm.com>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	"galak@codeaurora.org" <galak@codeaurora.org>,
	"rob@landley.net" <rob@landley.net>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"abrestic@chromium.org" <abrestic@chromium.org>,
	"dgreid@chromium.org" <dgreid@chromium.org>,
	"katierh@chromium.org" <katierh@chromium.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] ARM: tegra: add nvidia,wdt-timer-id optional property
Date: Mon, 03 Feb 2014 14:26:44 -0700	[thread overview]
Message-ID: <52F00994.7080701@wwwdotorg.org> (raw)
In-Reply-To: <643E69AA4436674C8F39DCC2C05F7638631998538B@HQMAIL03.nvidia.com>

On 02/03/2014 02:16 PM, Andrew Chew wrote:
>> On 02/03/2014 11:59 AM, Andrew Chew wrote:
>>>> On Fri, Jan 31, 2014 at 09:46:51PM +0000, Andrew Chew wrote:
>>>>> This optional property can be used to specify which timers are to be
>>>>> used for hardware watchdog timeouts (via a tegra wdt driver).
>>>>
>>>> Is there any reason that a particular timer should be used?
>>>
>>> I worry about colliding with other timer allocations, and wanted to be
>>> flexible in this regard.
>>
>> Are the other timer allocations represented in DT, or simply made by or hard-
>> coded in the driver? If the former, this property seems like a good equivalent
>> of any existing allocations. If the latter, can't the driver just allocate or hard-
>> code the allocation in the same way as any existing allocations?
> 
> From what I've seen, timer allocations are just hard-coded into whatever driver.
> I didn't think this was a particularly good idea, since when writing other drivers
> that for some reason need a timer, the author has to be aware of allocations
> made in other, barely related drivers.

I'm not sure that they would; why wouldn't the timer driver register the
various timers with standard Linux APIs which the clients talk to, thus
avoiding the clients having any knowledge at all of which channels are
used for what.

If you're talking about the watchdog driver, then can't we just create a
shared header file that the clocksource and watchdog drivers both
include, which defines the timer ID allocations?

  parent reply	other threads:[~2014-02-03 21:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 21:46 [PATCH v1] ARM: tegra: add nvidia,wdt-timer-id optional property Andrew Chew
2014-01-31 21:46 ` Andrew Chew
2014-02-03 17:10 ` Mark Rutland
2014-02-03 18:59   ` Andrew Chew
     [not found]     ` <643E69AA4436674C8F39DCC2C05F763863199852CA-lR+7xdUAJVNDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2014-02-03 21:09       ` Stephen Warren
2014-02-03 21:09         ` Stephen Warren
     [not found]         ` <52F005A0.4080807-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-02-03 21:16           ` Andrew Chew
2014-02-03 21:16             ` Andrew Chew
2014-02-03 21:16             ` Andrew Chew
     [not found]             ` <643E69AA4436674C8F39DCC2C05F7638631998538B-lR+7xdUAJVNDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2014-02-03 21:26               ` Stephen Warren [this message]
2014-02-03 21:26                 ` Stephen Warren
     [not found]                 ` <52F00994.7080701-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-02-03 21:29                   ` Andrew Chew
2014-02-03 21:29                     ` Andrew Chew

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=52F00994.7080701@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=AChew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=Pawel.Moll-5wv7dgnIgG8@public.gmane.org \
    --cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dgreid-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=katierh-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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.