All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod _clk
@ 2010-08-14 15:38 Tarun Kanti DebBarma
  2010-08-23 22:50 ` Kevin Hilman
  2010-08-24 11:14 ` Grazvydas Ignotas
  0 siblings, 2 replies; 4+ messages in thread
From: Tarun Kanti DebBarma @ 2010-08-14 15:38 UTC (permalink / raw)
  To: linux-omap
  Cc: Partha Basak, Santosh Shilimkar, Thara Gopinath,
	Tarun Kanti DebBarma, Paul Walmsley, Kevin Hilman, Tony Lindgren

This patch adds the omap_hwmod_get_clk() to access the _clk
field needed while setting clock sources of the timers.

Signed-off-by: Partha Basak <p-basak2@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             |   21 +++++++++++++++++++++
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    1 +
 2 files changed, 22 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 arch/arm/mach-omap2/omap_hwmod.c
 mode change 100644 => 100755 arch/arm/plat-omap/include/plat/omap_hwmod.h

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 7f3c023..7188f0c
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1759,6 +1759,27 @@ void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh)
 }
 
 /**
+ * omap_hwmod_get_clk - returns pointer to this module's struct clk
+ * @oh: struct omap_hwmod *
+ *
+ * Return the struct clk pointer associated with the OMAP module
+ * Returns NULL on error, or a struct clk * on success.
+ */
+struct clk *omap_hwmod_get_clk(struct omap_hwmod *oh)
+{
+	if (!oh)
+		return NULL;
+
+	if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
+		return NULL;
+
+	if (oh->_state == _HWMOD_STATE_UNKNOWN)
+		return NULL;
+
+	return oh->_clk;
+}
+
+/**
  * omap_hwmod_add_initiator_dep - add sleepdep from @init_oh to @oh
  * @oh: struct omap_hwmod *
  * @init_oh: struct omap_hwmod * (initiator)
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 6adbb63..a2b85a5
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -538,6 +538,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
 
 struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
 void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
+struct clk *omap_hwmod_get_clk(struct omap_hwmod *oh);
 
 int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh,
 				 struct omap_hwmod *init_oh);
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod _clk
  2010-08-14 15:38 [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod _clk Tarun Kanti DebBarma
@ 2010-08-23 22:50 ` Kevin Hilman
  2010-08-24 11:14 ` Grazvydas Ignotas
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2010-08-23 22:50 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, Partha Basak, Santosh Shilimkar, Thara Gopinath,
	Paul Walmsley, Tony Lindgren

Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:

> This patch adds the omap_hwmod_get_clk() to access the _clk
> field needed while setting clock sources of the timers.
>
> Signed-off-by: Partha Basak <p-basak2@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Thara Gopinath <thara@ti.com>
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Tony Lindgren <tony@atomide.com>

To help understand the motivation for the change, please explain in the
changelog the intended usage of the API, e.g. what drivers/devices will
use this API and why.

Also, this patch (with a more descriptive changelog) should be separate
from this series as it affects the omap_hwmod core.

I see it's usage later in this series, but this change (if accepted)
would upstream separately from the dmtimer series.

Kevin

> ---
>  arch/arm/mach-omap2/omap_hwmod.c             |   21 +++++++++++++++++++++
>  arch/arm/plat-omap/include/plat/omap_hwmod.h |    1 +
>  2 files changed, 22 insertions(+), 0 deletions(-)
>  mode change 100644 => 100755 arch/arm/mach-omap2/omap_hwmod.c
>  mode change 100644 => 100755 arch/arm/plat-omap/include/plat/omap_hwmod.h
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 7f3c023..7188f0c
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -1759,6 +1759,27 @@ void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh)
>  }
>  
>  /**
> + * omap_hwmod_get_clk - returns pointer to this module's struct clk
> + * @oh: struct omap_hwmod *
> + *
> + * Return the struct clk pointer associated with the OMAP module
> + * Returns NULL on error, or a struct clk * on success.
> + */
> +struct clk *omap_hwmod_get_clk(struct omap_hwmod *oh)
> +{
> +	if (!oh)
> +		return NULL;
> +
> +	if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
> +		return NULL;
> +
> +	if (oh->_state == _HWMOD_STATE_UNKNOWN)
> +		return NULL;
> +
> +	return oh->_clk;
> +}
> +
> +/**
>   * omap_hwmod_add_initiator_dep - add sleepdep from @init_oh to @oh
>   * @oh: struct omap_hwmod *
>   * @init_oh: struct omap_hwmod * (initiator)
> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> index 6adbb63..a2b85a5
> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> @@ -538,6 +538,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
>  
>  struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
>  void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
> +struct clk *omap_hwmod_get_clk(struct omap_hwmod *oh);
>  
>  int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh,
>  				 struct omap_hwmod *init_oh);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod _clk
  2010-08-14 15:38 [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod _clk Tarun Kanti DebBarma
  2010-08-23 22:50 ` Kevin Hilman
@ 2010-08-24 11:14 ` Grazvydas Ignotas
  2010-08-24 11:19   ` DebBarma, Tarun Kanti
  1 sibling, 1 reply; 4+ messages in thread
From: Grazvydas Ignotas @ 2010-08-24 11:14 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, Partha Basak, Santosh Shilimkar, Thara Gopinath,
	Paul Walmsley, Kevin Hilman, Tony Lindgren

On Sat, Aug 14, 2010 at 6:38 PM, Tarun Kanti DebBarma
<tarun.kanti@ti.com> wrote:
> This patch adds the omap_hwmod_get_clk() to access the _clk
> field needed while setting clock sources of the timers.
>
> Signed-off-by: Partha Basak <p-basak2@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Thara Gopinath <thara@ti.com>
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/omap_hwmod.c             |   21 +++++++++++++++++++++
>  arch/arm/plat-omap/include/plat/omap_hwmod.h |    1 +
>  2 files changed, 22 insertions(+), 0 deletions(-)
>  mode change 100644 => 100755 arch/arm/mach-omap2/omap_hwmod.c
>  mode change 100644 => 100755 arch/arm/plat-omap/include/plat/omap_hwmod.h

watch out for the mode changes..
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod _clk
  2010-08-24 11:14 ` Grazvydas Ignotas
@ 2010-08-24 11:19   ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 4+ messages in thread
From: DebBarma, Tarun Kanti @ 2010-08-24 11:19 UTC (permalink / raw)
  To: Grazvydas Ignotas
  Cc: linux-omap, Basak, Partha, Shilimkar, Santosh, Gopinath, Thara,
	Paul Walmsley, Kevin Hilman, Tony Lindgren

> -----Original Message-----
> From: Grazvydas Ignotas [mailto:notasas@gmail.com]
> Sent: Tuesday, August 24, 2010 4:45 PM
> To: DebBarma, Tarun Kanti
> Cc: linux-omap@vger.kernel.org; Basak, Partha; Shilimkar, Santosh;
> Gopinath, Thara; Paul Walmsley; Kevin Hilman; Tony Lindgren
> Subject: Re: [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod
> _clk
> 
> On Sat, Aug 14, 2010 at 6:38 PM, Tarun Kanti DebBarma
> <tarun.kanti@ti.com> wrote:
> > This patch adds the omap_hwmod_get_clk() to access the _clk
> > field needed while setting clock sources of the timers.
> >
> > Signed-off-by: Partha Basak <p-basak2@ti.com>
> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > Signed-off-by: Thara Gopinath <thara@ti.com>
> > Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Kevin Hilman <khilman@deeprootsystems.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > ---
> >  arch/arm/mach-omap2/omap_hwmod.c             |   21
> +++++++++++++++++++++
> >  arch/arm/plat-omap/include/plat/omap_hwmod.h |    1 +
> >  2 files changed, 22 insertions(+), 0 deletions(-)
> >  mode change 100644 => 100755 arch/arm/mach-omap2/omap_hwmod.c
> >  mode change 100644 => 100755 arch/arm/plat-
> omap/include/plat/omap_hwmod.h
> 
> watch out for the mode changes..
Sure, I have taken serious note of this. Thanks.
-tarun
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-24 11:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-14 15:38 [PATCH 4/13] dmtimer: hwmod: OMAP: api to read omap_hwmod _clk Tarun Kanti DebBarma
2010-08-23 22:50 ` Kevin Hilman
2010-08-24 11:14 ` Grazvydas Ignotas
2010-08-24 11:19   ` DebBarma, Tarun Kanti

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.