linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] ARM: shmobile: r8a7790: add thermal driver support
@ 2013-06-27  1:53 Simon Horman
  2013-06-27  1:53 ` [PATCH v3 1/2] ARM: shmobile: r8a7790: add clocks for thermal Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Simon Horman @ 2013-06-27  1:53 UTC (permalink / raw)
  To: linux-arm-kernel

This short series enables the thermal driver on the r8a7790 SoC
and thus the lager board.

It is based on renesas-next-20130620

v3
* Correct title of clocks patch to refer to r8a7790

v2
* Add clocks patch

Simon Horman (2):
  ARM: shmobile: r8a7790: add clocks for thermal
  ARM: shmobile: r8a7790: add thermal driver support

 arch/arm/mach-shmobile/clock-r8a7790.c |  4 ++++
 arch/arm/mach-shmobile/setup-r8a7790.c | 12 ++++++++++++
 2 files changed, 16 insertions(+)

-- 
1.8.2.1

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

* [PATCH v3 1/2] ARM: shmobile: r8a7790: add clocks for thermal
  2013-06-27  1:53 [PATCH v3 0/2] ARM: shmobile: r8a7790: add thermal driver support Simon Horman
@ 2013-06-27  1:53 ` Simon Horman
  2013-06-27  1:53 ` [PATCH v3 2/2] ARM: shmobile: r8a7790: add thermal driver support Simon Horman
  2013-06-27  5:41 ` [PATCH v3 0/2] " Kuninori Morimoto
  2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-06-27  1:53 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

v3
* Correct title to refer to r8a7790

v2
* First post
---
 arch/arm/mach-shmobile/clock-r8a7790.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index 5d71313..28eccd1 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -49,6 +49,7 @@
 
 #define SMSTPCR2 0xe6150138
 #define SMSTPCR3 0xe615013c
+#define SMSTPCR5 0xe6150144
 #define SMSTPCR7 0xe615014c
 
 #define MODEMR		0xE6160060
@@ -182,6 +183,7 @@ static struct clk div6_clks[DIV6_NR] = {
 enum {
 	MSTP721, MSTP720,
 	MSTP717, MSTP716,
+	MSTP522,
 	MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304,
 	MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202,
 	MSTP_NR
@@ -203,6 +205,7 @@ static struct clk mstp_clks[MSTP_NR] = {
 	[MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */
 	[MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */
 	[MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */
+	[MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */
 	[MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
 	[MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */
 };
@@ -254,6 +257,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
 	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
 	CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
+	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
 	CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]),
-- 
1.8.2.1

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

* [PATCH v3 2/2] ARM: shmobile: r8a7790: add thermal driver support
  2013-06-27  1:53 [PATCH v3 0/2] ARM: shmobile: r8a7790: add thermal driver support Simon Horman
  2013-06-27  1:53 ` [PATCH v3 1/2] ARM: shmobile: r8a7790: add clocks for thermal Simon Horman
@ 2013-06-27  1:53 ` Simon Horman
  2013-06-27  5:41 ` [PATCH v3 0/2] " Kuninori Morimoto
  2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-06-27  1:53 UTC (permalink / raw)
  To: linux-arm-kernel

The current temperature may be read using:
cat /sys/class/thermal/thermal_zone0/temp

Based on similar work for the r8a73a4 by Kuninori Morimoto.

Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/setup-r8a7790.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index 28f9475..06c720f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -149,6 +149,17 @@ static struct resource irqc0_resources[] __initdata = {
 					  &irqc##idx##_data,		\
 					  sizeof(struct renesas_irqc_config))
 
+static struct resource thermal_resources[] __initdata = {
+	DEFINE_RES_MEM(0xe61f0000, 0x14),
+	DEFINE_RES_MEM(0xe61f0100, 0x38),
+	DEFINE_RES_IRQ(gic_spi(69)),
+};
+
+#define r8a7790_register_thermal()					\
+	platform_device_register_simple("rcar_thermal", -1,		\
+					thermal_resources,		\
+					ARRAY_SIZE(thermal_resources))
+
 void __init r8a7790_add_standard_devices(void)
 {
 	r8a7790_register_scif(SCIFA0);
@@ -162,6 +173,7 @@ void __init r8a7790_add_standard_devices(void)
 	r8a7790_register_scif(HSCIF0);
 	r8a7790_register_scif(HSCIF1);
 	r8a7790_register_irqc(0);
+	r8a7790_register_thermal();
 }
 
 void __init r8a7790_timer_init(void)
-- 
1.8.2.1

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

* [PATCH v3 0/2] ARM: shmobile: r8a7790: add thermal driver support
  2013-06-27  1:53 [PATCH v3 0/2] ARM: shmobile: r8a7790: add thermal driver support Simon Horman
  2013-06-27  1:53 ` [PATCH v3 1/2] ARM: shmobile: r8a7790: add clocks for thermal Simon Horman
  2013-06-27  1:53 ` [PATCH v3 2/2] ARM: shmobile: r8a7790: add thermal driver support Simon Horman
@ 2013-06-27  5:41 ` Kuninori Morimoto
  2013-06-27  7:02   ` Simon Horman
  2 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2013-06-27  5:41 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Simon

> This short series enables the thermal driver on the r8a7790 SoC
> and thus the lager board.
> 
> It is based on renesas-next-20130620
> 
> v3
> * Correct title of clocks patch to refer to r8a7790
> 
> v2
> * Add clocks patch
> 
> Simon Horman (2):
>   ARM: shmobile: r8a7790: add clocks for thermal
>   ARM: shmobile: r8a7790: add thermal driver support
> 
>  arch/arm/mach-shmobile/clock-r8a7790.c |  4 ++++
>  arch/arm/mach-shmobile/setup-r8a7790.c | 12 ++++++++++++
>  2 files changed, 16 insertions(+)

For all patches

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>



Best regards
---
Kuninori Morimoto

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

* [PATCH v3 0/2] ARM: shmobile: r8a7790: add thermal driver support
  2013-06-27  5:41 ` [PATCH v3 0/2] " Kuninori Morimoto
@ 2013-06-27  7:02   ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-06-27  7:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 26, 2013 at 10:41:43PM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > This short series enables the thermal driver on the r8a7790 SoC
> > and thus the lager board.
> > 
> > It is based on renesas-next-20130620
> > 
> > v3
> > * Correct title of clocks patch to refer to r8a7790
> > 
> > v2
> > * Add clocks patch
> > 
> > Simon Horman (2):
> >   ARM: shmobile: r8a7790: add clocks for thermal
> >   ARM: shmobile: r8a7790: add thermal driver support
> > 
> >  arch/arm/mach-shmobile/clock-r8a7790.c |  4 ++++
> >  arch/arm/mach-shmobile/setup-r8a7790.c | 12 ++++++++++++
> >  2 files changed, 16 insertions(+)
> 
> For all patches
> 
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thanks, I have queued these up for v3.12 in the soc branch.

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

end of thread, other threads:[~2013-06-27  7:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27  1:53 [PATCH v3 0/2] ARM: shmobile: r8a7790: add thermal driver support Simon Horman
2013-06-27  1:53 ` [PATCH v3 1/2] ARM: shmobile: r8a7790: add clocks for thermal Simon Horman
2013-06-27  1:53 ` [PATCH v3 2/2] ARM: shmobile: r8a7790: add thermal driver support Simon Horman
2013-06-27  5:41 ` [PATCH v3 0/2] " Kuninori Morimoto
2013-06-27  7:02   ` Simon Horman

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).