linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP4460: Hwmod: Add hwmod for thermal sensor
@ 2011-07-05 14:58 Vishwanath BS
  2011-07-07  9:29 ` Paul Walmsley
  0 siblings, 1 reply; 5+ messages in thread
From: Vishwanath BS @ 2011-07-05 14:58 UTC (permalink / raw)
  To: linux-omap; +Cc: Keerthy, Vishwnath BS, Paul Walmsley, Benoit Cousson

From: Keerthy <j-keerthy@ti.com>

Patch adds hwmod entry for 4460 thermal sensor module. Thermal sensor module
is part of Control module sharing its address space and clocked via Bandgap
Functional Clock. Adding a seperate hwmod entry for thermal sensor will
enable thermal sensor driver to manage its clock cleanly using PM runtime
interfaces.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Vishwnath BS <vishwanath.bs@ti.com>

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
---
Patch is generated against "[PATCH v2 0/6] OMAP4: Add 4460 base support"
patch series from Rajendra and boot tested on 4430 and 4460.

 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   54 ++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 5e9df34..a01a9ec
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -755,6 +755,58 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
 };
 
 /*
+ * 'thermal_sensor' class
+ * thermal sensor module inside the bandgap / control module
+ */
+
+static struct omap_hwmod_class omap44xx_thermal_sensor_hwmod_class = {
+	.name   = "thermal_sensor",
+};
+
+static struct omap_hwmod_irq_info omap44xx_thermal_sensor_irqs[] = {
+	{ .name = "thermal_alert", .irq = 126 + OMAP44XX_IRQ_GIC_START },
+};
+
+static struct omap_hwmod_addr_space omap44xx_thermal_sensor_addrs[] = {
+	{
+		.pa_start       = 0x4a002378,
+		.pa_end         = 0x4a0023ff,
+	},
+};
+
+static struct omap_hwmod omap44xx_thermal_sensor_hwmod;
+/* l4_cfg -> ctrl_module_core */
+static struct omap_hwmod_ocp_if omap44xx_l4_cfg__thermal_sensor = {
+	.master         = &omap44xx_l4_cfg_hwmod,
+	.slave          = &omap44xx_thermal_sensor_hwmod,
+	.clk            = "l4_div_ck",
+	.addr           = omap44xx_thermal_sensor_addrs,
+	.addr_cnt       = ARRAY_SIZE(omap44xx_thermal_sensor_addrs),
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* ctrl_module_core slave ports */
+static struct omap_hwmod_ocp_if *omap44xx_thermal_sensor_slaves[] = {
+	&omap44xx_l4_cfg__thermal_sensor,
+};
+
+static struct omap_hwmod omap44xx_thermal_sensor_hwmod = {
+	.name           = "thermal_sensor",
+	.class          = &omap44xx_thermal_sensor_hwmod_class,
+	.mpu_irqs       = omap44xx_thermal_sensor_irqs,
+	.mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_thermal_sensor_irqs),
+	.main_clk       = "bandgap_ts_fclk",
+	.slaves		= omap44xx_thermal_sensor_slaves,
+	.slaves_cnt     = ARRAY_SIZE(omap44xx_thermal_sensor_slaves),
+	.prcm           = {
+		.omap4 = {
+			.clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
+		},
+	},
+	.omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP446X),
+};
+
+/*
  * 'bandgap' class
  * bangap reference for ldo regulators
  */
@@ -5205,6 +5257,8 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
 	&omap44xx_timer10_hwmod,
 	&omap44xx_timer11_hwmod,
 
+	/* thermal sensor hwmod */
+	&omap44xx_thermal_sensor_hwmod,
 	/* uart class */
 	&omap44xx_uart1_hwmod,
 	&omap44xx_uart2_hwmod,
-- 
1.7.0.4


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

* Re: [PATCH] OMAP4460: Hwmod: Add hwmod for thermal sensor
  2011-07-05 14:58 [PATCH] OMAP4460: Hwmod: Add hwmod for thermal sensor Vishwanath BS
@ 2011-07-07  9:29 ` Paul Walmsley
  2011-07-21 15:26   ` J, KEERTHY
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Walmsley @ 2011-07-07  9:29 UTC (permalink / raw)
  To: Vishwanath BS; +Cc: linux-omap, Keerthy, Benoit Cousson

[-- Attachment #1: Type: TEXT/PLAIN, Size: 679 bytes --]

Hi

On Tue, 5 Jul 2011, Vishwanath BS wrote:

> From: Keerthy <j-keerthy@ti.com>
> 
> Patch adds hwmod entry for 4460 thermal sensor module. Thermal sensor module
> is part of Control module sharing its address space and clocked via Bandgap
> Functional Clock. Adding a seperate hwmod entry for thermal sensor will
> enable thermal sensor driver to manage its clock cleanly using PM runtime
> interfaces.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> Signed-off-by: Vishwnath BS <vishwanath.bs@ti.com>

This needs to be coordinated with Benoît, since he's the maintainer of 
this file.  Since he's away at the moment, this is probably 3.2 material.


- Paul

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

* Re: [PATCH] OMAP4460: Hwmod: Add hwmod for thermal sensor
  2011-07-07  9:29 ` Paul Walmsley
@ 2011-07-21 15:26   ` J, KEERTHY
  2011-07-25 12:07     ` J, KEERTHY
  2011-07-26  8:46     ` Cousson, Benoit
  0 siblings, 2 replies; 5+ messages in thread
From: J, KEERTHY @ 2011-07-21 15:26 UTC (permalink / raw)
  To: Paul Walmsley, Tony Lindgren; +Cc: Vishwanath BS, linux-omap, Benoit Cousson

On Thu, Jul 7, 2011 at 2:59 PM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi
>
> On Tue, 5 Jul 2011, Vishwanath BS wrote:
>
>> From: Keerthy <j-keerthy@ti.com>
>>
>> Patch adds hwmod entry for 4460 thermal sensor module. Thermal sensor module
>> is part of Control module sharing its address space and clocked via Bandgap
>> Functional Clock. Adding a seperate hwmod entry for thermal sensor will
>> enable thermal sensor driver to manage its clock cleanly using PM runtime
>> interfaces.
>>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>> Signed-off-by: Vishwnath BS <vishwanath.bs@ti.com>
>
> This needs to be coordinated with Benoît, since he's the maintainer of
> this file.  Since he's away at the moment, this is probably 3.2 material.
>

Hello Paul/Tony,

This hwmod is specific to OMAP4460. When i tried to compile i see that
CHIP_IS_OMAP446X is missing. Since this is very much specific to
OMAP4460 is there another way to differentiate between OMAP4430 and
OMAP4460?

>
> - Paul



-- 
Regards and Thanks,
Keerthy
--
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] 5+ messages in thread

* Re: [PATCH] OMAP4460: Hwmod: Add hwmod for thermal sensor
  2011-07-21 15:26   ` J, KEERTHY
@ 2011-07-25 12:07     ` J, KEERTHY
  2011-07-26  8:46     ` Cousson, Benoit
  1 sibling, 0 replies; 5+ messages in thread
From: J, KEERTHY @ 2011-07-25 12:07 UTC (permalink / raw)
  To: Paul Walmsley, Tony Lindgren; +Cc: Vishwanath BS, linux-omap, Benoit Cousson

On Thu, Jul 21, 2011 at 8:56 PM, J, KEERTHY <j-keerthy@ti.com> wrote:
> On Thu, Jul 7, 2011 at 2:59 PM, Paul Walmsley <paul@pwsan.com> wrote:
>> Hi
>>
>> On Tue, 5 Jul 2011, Vishwanath BS wrote:
>>
>>> From: Keerthy <j-keerthy@ti.com>
>>>
>>> Patch adds hwmod entry for 4460 thermal sensor module. Thermal sensor module
>>> is part of Control module sharing its address space and clocked via Bandgap
>>> Functional Clock. Adding a seperate hwmod entry for thermal sensor will
>>> enable thermal sensor driver to manage its clock cleanly using PM runtime
>>> interfaces.
>>>
>>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>>> Signed-off-by: Vishwnath BS <vishwanath.bs@ti.com>
>>
>> This needs to be coordinated with Benoît, since he's the maintainer of
>> this file.  Since he's away at the moment, this is probably 3.2 material.
>>
>
> Hello Paul/Tony,
>
> This hwmod is specific to OMAP4460. When i tried to compile i see that
> CHIP_IS_OMAP446X is missing. Since this is very much specific to
> OMAP4460 is there another way to differentiate between OMAP4430 and
> OMAP4460?

Hi Paul,

Any inputs on this?

>
>>
>> - Paul
>
>
>
> --
> Regards and Thanks,
> Keerthy
>



-- 
Regards and Thanks,
Keerthy
--
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] 5+ messages in thread

* Re: [PATCH] OMAP4460: Hwmod: Add hwmod for thermal sensor
  2011-07-21 15:26   ` J, KEERTHY
  2011-07-25 12:07     ` J, KEERTHY
@ 2011-07-26  8:46     ` Cousson, Benoit
  1 sibling, 0 replies; 5+ messages in thread
From: Cousson, Benoit @ 2011-07-26  8:46 UTC (permalink / raw)
  To: J, KEERTHY
  Cc: Paul Walmsley, Tony Lindgren, Sripathy, Vishwanath,
	linux-omap@vger.kernel.org

On 7/21/2011 5:26 PM, J, KEERTHY wrote:
> On Thu, Jul 7, 2011 at 2:59 PM, Paul Walmsley<paul@pwsan.com>  wrote:
>> Hi
>>
>> On Tue, 5 Jul 2011, Vishwanath BS wrote:
>>
>>> From: Keerthy<j-keerthy@ti.com>
>>>
>>> Patch adds hwmod entry for 4460 thermal sensor module. Thermal sensor module
>>> is part of Control module sharing its address space and clocked via Bandgap
>>> Functional Clock. Adding a seperate hwmod entry for thermal sensor will
>>> enable thermal sensor driver to manage its clock cleanly using PM runtime
>>> interfaces.
>>>
>>> Signed-off-by: Keerthy<j-keerthy@ti.com>
>>> Signed-off-by: Vishwnath BS<vishwanath.bs@ti.com>
>>
>> This needs to be coordinated with Benoît, since he's the maintainer of
>> this file.  Since he's away at the moment, this is probably 3.2 material.
>>
>
> Hello Paul/Tony,
>
> This hwmod is specific to OMAP4460. When i tried to compile i see that
> CHIP_IS_OMAP446X is missing. Since this is very much specific to
> OMAP4460 is there another way to differentiate between OMAP4430 and
> OMAP4460?

That flag should be added by the OMAP4460 series Rajendra did.
This is still the right way to identify a chip for the moment.

Benoit

--
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] 5+ messages in thread

end of thread, other threads:[~2011-07-26  8:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05 14:58 [PATCH] OMAP4460: Hwmod: Add hwmod for thermal sensor Vishwanath BS
2011-07-07  9:29 ` Paul Walmsley
2011-07-21 15:26   ` J, KEERTHY
2011-07-25 12:07     ` J, KEERTHY
2011-07-26  8:46     ` Cousson, Benoit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).