diff mbox

[v1] clocksource: tegra: Add nvidia,tegra30-timer compat

Message ID 1391203779-5676-1-git-send-email-achew@nvidia.com
State Not Applicable, archived
Headers show

Commit Message

achew@nvidia.com Jan. 31, 2014, 9:29 p.m. UTC
There are some differences between tegra20's timer registers and tegra30's
(and later).  For one thing, the watchdogs don't seem to be present in
tegra20.  Add this compatibility string in order to be able to distinguish
whether the watchdogs are there or not.

Signed-off-by: Andrew Chew <achew@nvidia.com>
---
 drivers/clocksource/tegra20_timer.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Lezcano Feb. 3, 2014, 4:39 p.m. UTC | #1
On 01/31/2014 10:29 PM, Andrew Chew wrote:
> There are some differences between tegra20's timer registers and tegra30's
> (and later).  For one thing, the watchdogs don't seem to be present in
> tegra20.

"don't seem", so it is an assumption ?

> Add this compatibility string in order to be able to distinguish
> whether the watchdogs are there or not.

Sorry but I don't get the connection between declaring the tegra30_timer 
and the log. Can you elaborate please ?

> Signed-off-by: Andrew Chew <achew@nvidia.com>
> ---
>   drivers/clocksource/tegra20_timer.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c
> index d1869f0..73cfa56 100644
> --- a/drivers/clocksource/tegra20_timer.c
> +++ b/drivers/clocksource/tegra20_timer.c
> @@ -218,6 +218,7 @@ static void __init tegra20_init_timer(struct device_node *np)
>   					0x1, 0x1fffffff);
>   }
>   CLOCKSOURCE_OF_DECLARE(tegra20_timer, "nvidia,tegra20-timer", tegra20_init_timer);
> +CLOCKSOURCE_OF_DECLARE(tegra30_timer, "nvidia,tegra30-timer", tegra20_init_timer);
>
>   static void __init tegra20_init_rtc(struct device_node *np)
>   {
>
achew@nvidia.com Feb. 3, 2014, 6:54 p.m. UTC | #2
> From: Daniel Lezcano [mailto:daniel.lezcano@linaro.org]

> Sent: Monday, February 03, 2014 8:40 AM

> To: Andrew Chew; tglx@linutronix.de; swarren@wwwdotorg.org;

> thierry.reding@gmail.com; abrestic@chromium.org; dgreid@chromium.org;

> katierh@chromium.org

> Cc: linux-kernel@vger.kernel.org; linux-tegra@vger.kernel.org

> Subject: Re: [PATCH v1] clocksource: tegra: Add nvidia,tegra30-timer compat

> 

> On 01/31/2014 10:29 PM, Andrew Chew wrote:

> > There are some differences between tegra20's timer registers and

> > tegra30's (and later).  For one thing, the watchdogs don't seem to be

> > present in tegra20.

> 

> "don't seem", so it is an assumption ?


No, this is not an assumption.  It has been verified by other NVIDIA engineers
since I proposed this change.

> > Add this compatibility string in order to be able to distinguish

> > whether the watchdogs are there or not.

> 

> Sorry but I don't get the connection between declaring the tegra30_timer

> and the log. Can you elaborate please ?


I don't know what you mean by "the log".  Was that a typo?  Anyway, I
have a watchdog driver that I intend to follow up with, that binds
with tegra30-timer.  I don't want this driver to be able to bind with
tegra20-timer, because the driver won't actually work on tegra20.

Does that answer your question?
Stephen Warren Feb. 3, 2014, 9:07 p.m. UTC | #3
On 01/31/2014 02:29 PM, Andrew Chew wrote:
> There are some differences between tegra20's timer registers and tegra30's
> (and later).  For one thing, the watchdogs don't seem to be present in
> tegra20.  Add this compatibility string in order to be able to distinguish
> whether the watchdogs are there or not.

Acked-by: Stephen Warren <swarren@nvidia.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thomas Gleixner Feb. 4, 2014, 7:10 p.m. UTC | #4
On Mon, 3 Feb 2014, Andrew Chew wrote:

> > From: Daniel Lezcano [mailto:daniel.lezcano@linaro.org]
> > Sent: Monday, February 03, 2014 8:40 AM
> > To: Andrew Chew; tglx@linutronix.de; swarren@wwwdotorg.org;
> > thierry.reding@gmail.com; abrestic@chromium.org; dgreid@chromium.org;
> > katierh@chromium.org
> > Cc: linux-kernel@vger.kernel.org; linux-tegra@vger.kernel.org
> > Subject: Re: [PATCH v1] clocksource: tegra: Add nvidia,tegra30-timer compat
> > 
> > On 01/31/2014 10:29 PM, Andrew Chew wrote:
> > > There are some differences between tegra20's timer registers and
> > > tegra30's (and later).  For one thing, the watchdogs don't seem to be
> > > present in tegra20.
> > 
> > "don't seem", so it is an assumption ?
> 
> No, this is not an assumption.  It has been verified by other NVIDIA engineers
> since I proposed this change.

So why is your changelog saying "don't seem to be" ?
  
> > > Add this compatibility string in order to be able to distinguish
> > > whether the watchdogs are there or not.
> > 
> > Sorry but I don't get the connection between declaring the tegra30_timer
> > and the log. Can you elaborate please ?
> 
> I don't know what you mean by "the log".  Was that a typo?  Anyway, I

Daniel refers to the changelog.

> have a watchdog driver that I intend to follow up with, that binds
> with tegra30-timer.  I don't want this driver to be able to bind with
> tegra20-timer, because the driver won't actually work on tegra20.

So the changelog should say:

  Tegra30 and later have more timer functionality than Tegra20, but
  share the clocksource core code.

  Add a separate devicetree entry which defaults to the tegra20 code
  for now. This is preparatory work for adding new tegra30 specific
  functionality.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
achew@nvidia.com Feb. 4, 2014, 7:14 p.m. UTC | #5
> > > On 01/31/2014 10:29 PM, Andrew Chew wrote:
> > > > There are some differences between tegra20's timer registers and
> > > > tegra30's (and later).  For one thing, the watchdogs don't seem to
> > > > be present in tegra20.
> > >
> > > "don't seem", so it is an assumption ?
> >
> > No, this is not an assumption.  It has been verified by other NVIDIA
> > engineers since I proposed this change.
> 
> So why is your changelog saying "don't seem to be" ?

I updated the commit message (see V2 of this patch).  I hope the new
commit message satisfies the concerns:

"There are some differences between tegra20's timer registers and tegra30's
(and later).  For example, tegra30 has more timers.  In addition, watchdogs are
not present in tegra20.

Add this compatibility string in order to be able to distinguish whether the
additional timers and watchdogs are there or not."
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thomas Gleixner Feb. 4, 2014, 8:22 p.m. UTC | #6
On Tue, 4 Feb 2014, Andrew Chew wrote:

> > > > On 01/31/2014 10:29 PM, Andrew Chew wrote:
> > > > > There are some differences between tegra20's timer registers and
> > > > > tegra30's (and later).  For one thing, the watchdogs don't seem to
> > > > > be present in tegra20.
> > > >
> > > > "don't seem", so it is an assumption ?
> > >
> > > No, this is not an assumption.  It has been verified by other NVIDIA
> > > engineers since I proposed this change.
> > 
> > So why is your changelog saying "don't seem to be" ?
> 
> I updated the commit message (see V2 of this patch).  I hope the new
> commit message satisfies the concerns:
> 
> "There are some differences between tegra20's timer registers and tegra30's
> (and later).  For example, tegra30 has more timers.  In addition, watchdogs are
> not present in tegra20.
> 
> Add this compatibility string in order to be able to distinguish whether the
> additional timers and watchdogs are there or not."

Yup, that's way more understandable.
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c
index d1869f0..73cfa56 100644
--- a/drivers/clocksource/tegra20_timer.c
+++ b/drivers/clocksource/tegra20_timer.c
@@ -218,6 +218,7 @@  static void __init tegra20_init_timer(struct device_node *np)
 					0x1, 0x1fffffff);
 }
 CLOCKSOURCE_OF_DECLARE(tegra20_timer, "nvidia,tegra20-timer", tegra20_init_timer);
+CLOCKSOURCE_OF_DECLARE(tegra30_timer, "nvidia,tegra30-timer", tegra20_init_timer);
 
 static void __init tegra20_init_rtc(struct device_node *np)
 {