All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2012-12-05 12:13 ` Bastian Hecht
  0 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2012-12-05 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bastian Hecht <hechtb@gmail.com>

Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
clocks are stopped there is no need to save or restore any state of the
system.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
 arch/arm/mach-shmobile/Makefile              |    1 +
 arch/arm/mach-shmobile/board-kzm9g.c         |    2 ++
 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/pm-sh73a0.c           |   32 ++++++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 arch/arm/mach-shmobile/pm-sh73a0.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index fe2c97c..d0d06f2 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -43,6 +43,7 @@ obj-$(CONFIG_ARCH_SHMOBILE)	+= pm-rmobile.o
 obj-$(CONFIG_ARCH_SH7372)	+= pm-sh7372.o sleep-sh7372.o
 obj-$(CONFIG_ARCH_R8A7740)	+= pm-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779.o
+obj-$(CONFIG_ARCH_SH73A0)	+= pm-sh73a0.o
 
 # Board objects
 obj-$(CONFIG_MACH_G3EVM)	+= board-g3evm.o
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 0a43f31..dc8c0f8 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -760,6 +760,8 @@ static void __init kzm_init(void)
 
 	sh73a0_add_standard_devices();
 	platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
+
+	sh73a0_pm_init();
 }
 
 static void kzm9g_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index d47e215..318551b3 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -54,6 +54,7 @@ extern void sh73a0_add_early_devices(void);
 extern void sh73a0_add_standard_devices(void);
 extern void sh73a0_clock_init(void);
 extern void sh73a0_pinmux_init(void);
+extern void sh73a0_pm_init(void);
 extern struct clk sh73a0_extal1_clk;
 extern struct clk sh73a0_extal2_clk;
 extern struct clk sh73a0_extcki_clk;
diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c
new file mode 100644
index 0000000..9cf67bb
--- /dev/null
+++ b/arch/arm/mach-shmobile/pm-sh73a0.c
@@ -0,0 +1,32 @@
+/*
+ * sh73a0 Power management support
+ *
+ *  Copyright (C) 2012 Bastian Hecht <hechtb+renesas@gmail.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/suspend.h>
+#include <mach/common.h>
+
+#ifdef CONFIG_SUSPEND
+static int sh73a0_enter_suspend(suspend_state_t suspend_state)
+{
+	cpu_do_idle();
+	return 0;
+}
+
+static void sh73a0_suspend_init(void)
+{
+	shmobile_suspend_ops.enter = sh73a0_enter_suspend;
+}
+#else
+static void sh73a0_suspend_init(void) {}
+#endif
+
+void __init sh73a0_pm_init(void)
+{
+	sh73a0_suspend_init();
+}
-- 
1.7.9.5


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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2012-12-05 12:13 ` Bastian Hecht
  0 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2012-12-05 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bastian Hecht <hechtb@gmail.com>

Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
clocks are stopped there is no need to save or restore any state of the
system.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
 arch/arm/mach-shmobile/Makefile              |    1 +
 arch/arm/mach-shmobile/board-kzm9g.c         |    2 ++
 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/pm-sh73a0.c           |   32 ++++++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 arch/arm/mach-shmobile/pm-sh73a0.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index fe2c97c..d0d06f2 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -43,6 +43,7 @@ obj-$(CONFIG_ARCH_SHMOBILE)	+= pm-rmobile.o
 obj-$(CONFIG_ARCH_SH7372)	+= pm-sh7372.o sleep-sh7372.o
 obj-$(CONFIG_ARCH_R8A7740)	+= pm-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779.o
+obj-$(CONFIG_ARCH_SH73A0)	+= pm-sh73a0.o
 
 # Board objects
 obj-$(CONFIG_MACH_G3EVM)	+= board-g3evm.o
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 0a43f31..dc8c0f8 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -760,6 +760,8 @@ static void __init kzm_init(void)
 
 	sh73a0_add_standard_devices();
 	platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
+
+	sh73a0_pm_init();
 }
 
 static void kzm9g_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index d47e215..318551b3 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -54,6 +54,7 @@ extern void sh73a0_add_early_devices(void);
 extern void sh73a0_add_standard_devices(void);
 extern void sh73a0_clock_init(void);
 extern void sh73a0_pinmux_init(void);
+extern void sh73a0_pm_init(void);
 extern struct clk sh73a0_extal1_clk;
 extern struct clk sh73a0_extal2_clk;
 extern struct clk sh73a0_extcki_clk;
diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c
new file mode 100644
index 0000000..9cf67bb
--- /dev/null
+++ b/arch/arm/mach-shmobile/pm-sh73a0.c
@@ -0,0 +1,32 @@
+/*
+ * sh73a0 Power management support
+ *
+ *  Copyright (C) 2012 Bastian Hecht <hechtb+renesas@gmail.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/suspend.h>
+#include <mach/common.h>
+
+#ifdef CONFIG_SUSPEND
+static int sh73a0_enter_suspend(suspend_state_t suspend_state)
+{
+	cpu_do_idle();
+	return 0;
+}
+
+static void sh73a0_suspend_init(void)
+{
+	shmobile_suspend_ops.enter = sh73a0_enter_suspend;
+}
+#else
+static void sh73a0_suspend_init(void) {}
+#endif
+
+void __init sh73a0_pm_init(void)
+{
+	sh73a0_suspend_init();
+}
-- 
1.7.9.5

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

* [PATCH 2/2] ARM: shmobile: r8a7740: Add CPU sleep suspend
  2012-12-05 12:13 ` Bastian Hecht
@ 2012-12-05 12:13   ` Bastian Hecht
  -1 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2012-12-05 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bastian Hecht <hechtb@gmail.com>

Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep.
It is entered by a simple dsb and wfi instruction via cpu_do_idle(). As
just clocks are stopped there is no need to save or restore any state of
the system.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
 arch/arm/mach-shmobile/board-armadillo800eva.c |    2 ++
 arch/arm/mach-shmobile/include/mach/common.h   |    1 +
 arch/arm/mach-shmobile/pm-r8a7740.c            |   20 ++++++++++++++++++++
 3 files changed, 23 insertions(+)

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 3cc8b1c..48847f6 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -1213,6 +1213,8 @@ static void __init eva_init(void)
 	rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
 	if (usb)
 		rmobile_add_device_to_domain("A3SP", usb);
+
+	r8a7740_pm_init();
 }
 
 static void __init eva_earlytimer_init(void)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 318551b3..ebcd28d 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -66,6 +66,7 @@ extern void r8a7740_add_early_devices(void);
 extern void r8a7740_add_standard_devices(void);
 extern void r8a7740_clock_init(u8 md_ck);
 extern void r8a7740_pinmux_init(void);
+extern void r8a7740_pm_init(void);
 
 extern void r8a7779_init_irq(void);
 extern void r8a7779_map_io(void);
diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c
index 21e5316d..8cfb5bc 100644
--- a/arch/arm/mach-shmobile/pm-r8a7740.c
+++ b/arch/arm/mach-shmobile/pm-r8a7740.c
@@ -58,3 +58,23 @@ void __init r8a7740_init_pm_domains(void)
 }
 
 #endif /* CONFIG_PM */
+
+#ifdef CONFIG_SUSPEND
+static int r8a7740_enter_suspend(suspend_state_t suspend_state)
+{
+	cpu_do_idle();
+	return 0;
+}
+
+static void r8a7740_suspend_init(void)
+{
+	shmobile_suspend_ops.enter = r8a7740_enter_suspend;
+}
+#else
+static void r8a7740_suspend_init(void) {}
+#endif
+
+void __init r8a7740_pm_init(void)
+{
+	r8a7740_suspend_init();
+}
-- 
1.7.9.5


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

* [PATCH 2/2] ARM: shmobile: r8a7740: Add CPU sleep suspend
@ 2012-12-05 12:13   ` Bastian Hecht
  0 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2012-12-05 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bastian Hecht <hechtb@gmail.com>

Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep.
It is entered by a simple dsb and wfi instruction via cpu_do_idle(). As
just clocks are stopped there is no need to save or restore any state of
the system.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
 arch/arm/mach-shmobile/board-armadillo800eva.c |    2 ++
 arch/arm/mach-shmobile/include/mach/common.h   |    1 +
 arch/arm/mach-shmobile/pm-r8a7740.c            |   20 ++++++++++++++++++++
 3 files changed, 23 insertions(+)

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 3cc8b1c..48847f6 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -1213,6 +1213,8 @@ static void __init eva_init(void)
 	rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
 	if (usb)
 		rmobile_add_device_to_domain("A3SP", usb);
+
+	r8a7740_pm_init();
 }
 
 static void __init eva_earlytimer_init(void)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 318551b3..ebcd28d 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -66,6 +66,7 @@ extern void r8a7740_add_early_devices(void);
 extern void r8a7740_add_standard_devices(void);
 extern void r8a7740_clock_init(u8 md_ck);
 extern void r8a7740_pinmux_init(void);
+extern void r8a7740_pm_init(void);
 
 extern void r8a7779_init_irq(void);
 extern void r8a7779_map_io(void);
diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c
index 21e5316d..8cfb5bc 100644
--- a/arch/arm/mach-shmobile/pm-r8a7740.c
+++ b/arch/arm/mach-shmobile/pm-r8a7740.c
@@ -58,3 +58,23 @@ void __init r8a7740_init_pm_domains(void)
 }
 
 #endif /* CONFIG_PM */
+
+#ifdef CONFIG_SUSPEND
+static int r8a7740_enter_suspend(suspend_state_t suspend_state)
+{
+	cpu_do_idle();
+	return 0;
+}
+
+static void r8a7740_suspend_init(void)
+{
+	shmobile_suspend_ops.enter = r8a7740_enter_suspend;
+}
+#else
+static void r8a7740_suspend_init(void) {}
+#endif
+
+void __init r8a7740_pm_init(void)
+{
+	r8a7740_suspend_init();
+}
-- 
1.7.9.5

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

* Re: [PATCH 2/2] ARM: shmobile: r8a7740: Add CPU sleep suspend
  2012-12-05 12:13   ` Bastian Hecht
@ 2012-12-14  3:22     ` Magnus Damm
  -1 siblings, 0 replies; 22+ messages in thread
From: Magnus Damm @ 2012-12-14  3:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> From: Bastian Hecht <hechtb@gmail.com>
>
> Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep.
> It is entered by a simple dsb and wfi instruction via cpu_do_idle(). As
> just clocks are stopped there is no need to save or restore any state of
> the system.
>
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>

Acked-by: Magnus Damm <damm@opensource.se>

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

* [PATCH 2/2] ARM: shmobile: r8a7740: Add CPU sleep suspend
@ 2012-12-14  3:22     ` Magnus Damm
  0 siblings, 0 replies; 22+ messages in thread
From: Magnus Damm @ 2012-12-14  3:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> From: Bastian Hecht <hechtb@gmail.com>
>
> Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep.
> It is entered by a simple dsb and wfi instruction via cpu_do_idle(). As
> just clocks are stopped there is no need to save or restore any state of
> the system.
>
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>

Acked-by: Magnus Damm <damm@opensource.se>

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

* Re: [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
  2012-12-05 12:13 ` Bastian Hecht
@ 2012-12-14  3:23   ` Magnus Damm
  -1 siblings, 0 replies; 22+ messages in thread
From: Magnus Damm @ 2012-12-14  3:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> From: Bastian Hecht <hechtb@gmail.com>
>
> Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> clocks are stopped there is no need to save or restore any state of the
> system.
>
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>

Acked-by: Magnus Damm <damm@opensource.se>

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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2012-12-14  3:23   ` Magnus Damm
  0 siblings, 0 replies; 22+ messages in thread
From: Magnus Damm @ 2012-12-14  3:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> From: Bastian Hecht <hechtb@gmail.com>
>
> Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> clocks are stopped there is no need to save or restore any state of the
> system.
>
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>

Acked-by: Magnus Damm <damm@opensource.se>

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

* Re: [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
  2012-12-14  3:23   ` Magnus Damm
@ 2012-12-14 13:47     ` Simon Horman
  -1 siblings, 0 replies; 22+ messages in thread
From: Simon Horman @ 2012-12-14 13:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 14, 2012 at 12:23:06PM +0900, Magnus Damm wrote:
> On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> > From: Bastian Hecht <hechtb@gmail.com>
> >
> > Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> > entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> > clocks are stopped there is no need to save or restore any state of the
> > system.
> >
> > Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
> 
> Acked-by: Magnus Damm <damm@opensource.se>

Hi Bastian,

could you please re-spin this series on top of the soc5 or next
branches of my renesas tree on kernel.org?

Feel free to include Magnus's Ack unless you make any
non-trivial changes.

Thanks


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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2012-12-14 13:47     ` Simon Horman
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Horman @ 2012-12-14 13:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 14, 2012 at 12:23:06PM +0900, Magnus Damm wrote:
> On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> > From: Bastian Hecht <hechtb@gmail.com>
> >
> > Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> > entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> > clocks are stopped there is no need to save or restore any state of the
> > system.
> >
> > Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
> 
> Acked-by: Magnus Damm <damm@opensource.se>

Hi Bastian,

could you please re-spin this series on top of the soc5 or next
branches of my renesas tree on kernel.org?

Feel free to include Magnus's Ack unless you make any
non-trivial changes.

Thanks

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

* Re: [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
  2012-12-14 13:47     ` Simon Horman
@ 2013-01-11  9:32       ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 22+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-11  9:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon

On Fri, 14 Dec 2012, Simon Horman wrote:

> On Fri, Dec 14, 2012 at 12:23:06PM +0900, Magnus Damm wrote:
> > On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> > > From: Bastian Hecht <hechtb@gmail.com>
> > >
> > > Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> > > entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> > > clocks are stopped there is no need to save or restore any state of the
> > > system.
> > >
> > > Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
> > 
> > Acked-by: Magnus Damm <damm@opensource.se>
> 
> Hi Bastian,
> 
> could you please re-spin this series on top of the soc5 or next
> branches of my renesas tree on kernel.org?
> 
> Feel free to include Magnus's Ack unless you make any
> non-trivial changes.

It looks like this commit in your tree

http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h\x1662b83628a0c6fd6d8a2a0dcf9b67577906e75b

is broken, am I right?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2013-01-11  9:32       ` Guennadi Liakhovetski
  0 siblings, 0 replies; 22+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-11  9:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon

On Fri, 14 Dec 2012, Simon Horman wrote:

> On Fri, Dec 14, 2012 at 12:23:06PM +0900, Magnus Damm wrote:
> > On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
> > > From: Bastian Hecht <hechtb@gmail.com>
> > >
> > > Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> > > entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> > > clocks are stopped there is no need to save or restore any state of the
> > > system.
> > >
> > > Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
> > 
> > Acked-by: Magnus Damm <damm@opensource.se>
> 
> Hi Bastian,
> 
> could you please re-spin this series on top of the soc5 or next
> branches of my renesas tree on kernel.org?
> 
> Feel free to include Magnus's Ack unless you make any
> non-trivial changes.

It looks like this commit in your tree

http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h=1662b83628a0c6fd6d8a2a0dcf9b67577906e75b

is broken, am I right?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
  2013-01-11  9:32       ` Guennadi Liakhovetski
@ 2013-01-12 15:43         ` Bastian Hecht
  -1 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2013-01-12 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Guennadi, hi Simon,

yes somehow a chunk is missing from my original patch in the patch of
the next branch that got merged from soc2. I've prepared a revert of
the bad patch and a corrected version, but now I'm unsure if that
helps at all. Finally you don't want to get that fixups pulled into
the mainline.

It seems to me to be a real mess to correct some patch somewhere in
the middle of merged patch stacks. If I can help Simon, please let me
know.

Cheers,

 Bastian


2013/1/11 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> Hi Simon
>
> On Fri, 14 Dec 2012, Simon Horman wrote:
>
>> On Fri, Dec 14, 2012 at 12:23:06PM +0900, Magnus Damm wrote:
>> > On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
>> > > From: Bastian Hecht <hechtb@gmail.com>
>> > >
>> > > Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
>> > > entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
>> > > clocks are stopped there is no need to save or restore any state of the
>> > > system.
>> > >
>> > > Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>> >
>> > Acked-by: Magnus Damm <damm@opensource.se>
>>
>> Hi Bastian,
>>
>> could you please re-spin this series on top of the soc5 or next
>> branches of my renesas tree on kernel.org?
>>
>> Feel free to include Magnus's Ack unless you make any
>> non-trivial changes.
>
> It looks like this commit in your tree
>
> http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h\x1662b83628a0c6fd6d8a2a0dcf9b67577906e75b
>
> is broken, am I right?
>
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/

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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2013-01-12 15:43         ` Bastian Hecht
  0 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2013-01-12 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Guennadi, hi Simon,

yes somehow a chunk is missing from my original patch in the patch of
the next branch that got merged from soc2. I've prepared a revert of
the bad patch and a corrected version, but now I'm unsure if that
helps at all. Finally you don't want to get that fixups pulled into
the mainline.

It seems to me to be a real mess to correct some patch somewhere in
the middle of merged patch stacks. If I can help Simon, please let me
know.

Cheers,

 Bastian


2013/1/11 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> Hi Simon
>
> On Fri, 14 Dec 2012, Simon Horman wrote:
>
>> On Fri, Dec 14, 2012 at 12:23:06PM +0900, Magnus Damm wrote:
>> > On Wed, Dec 5, 2012 at 9:13 PM, Bastian Hecht <hechtb@gmail.com> wrote:
>> > > From: Bastian Hecht <hechtb@gmail.com>
>> > >
>> > > Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
>> > > entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
>> > > clocks are stopped there is no need to save or restore any state of the
>> > > system.
>> > >
>> > > Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>> >
>> > Acked-by: Magnus Damm <damm@opensource.se>
>>
>> Hi Bastian,
>>
>> could you please re-spin this series on top of the soc5 or next
>> branches of my renesas tree on kernel.org?
>>
>> Feel free to include Magnus's Ack unless you make any
>> non-trivial changes.
>
> It looks like this commit in your tree
>
> http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h=1662b83628a0c6fd6d8a2a0dcf9b67577906e75b
>
> is broken, am I right?
>
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/

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

* Re: [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
  2013-01-12 15:43         ` Bastian Hecht
@ 2013-01-30  4:22           ` Simon Horman
  -1 siblings, 0 replies; 22+ messages in thread
From: Simon Horman @ 2013-01-30  4:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 12, 2013 at 04:43:29PM +0100, Bastian Hecht wrote:
> Hi Guennadi, hi Simon,
> 
> yes somehow a chunk is missing from my original patch in the patch of
> the next branch that got merged from soc2. I've prepared a revert of
> the bad patch and a corrected version, but now I'm unsure if that
> helps at all. Finally you don't want to get that fixups pulled into
> the mainline.
> 
> It seems to me to be a real mess to correct some patch somewhere in
> the middle of merged patch stacks. If I can help Simon, please let me
> know.

Could you see if the following is correct?
If not could you please prepare whichever of the following makes sense.

* An incremental patch to add the missing hunk

* A revert patch and a new patch

* A revert patch

http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h\x13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f


From 13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f Mon Sep 17 00:00:00 2001
From: Bastian Hecht <hechtb@gmail.com>
Date: Wed, 5 Dec 2012 12:13:06 +0000
Subject: [PATCH] ARM: shmobile: sh73a0: Add CPU sleep suspend

Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
clocks are stopped there is no need to save or restore any state of the
system.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/Makefile              |    1 +
 arch/arm/mach-shmobile/board-kzm9g.c         |    2 ++
 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/pm-sh73a0.c           |   32 ++++++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 arch/arm/mach-shmobile/pm-sh73a0.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 0b71479..f6aba6d 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_ARCH_SHMOBILE)	+= pm-rmobile.o
 obj-$(CONFIG_ARCH_SH7372)	+= pm-sh7372.o sleep-sh7372.o
 obj-$(CONFIG_ARCH_R8A7740)	+= pm-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779.o
+obj-$(CONFIG_ARCH_SH73A0)	+= pm-sh73a0.o
 
 # Board objects
 obj-$(CONFIG_MACH_AP4EVB)	+= board-ap4evb.o
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index ac94285..363c6ed 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -772,6 +772,8 @@ static void __init kzm_init(void)
 
 	sh73a0_add_standard_devices();
 	platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
+
+	sh73a0_pm_init();
 }
 
 static void kzm9g_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 2d1686b..f221c11 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -40,6 +40,7 @@ extern void sh73a0_add_early_devices(void);
 extern void sh73a0_add_standard_devices(void);
 extern void sh73a0_clock_init(void);
 extern void sh73a0_pinmux_init(void);
+extern void sh73a0_pm_init(void);
 extern struct clk sh73a0_extal1_clk;
 extern struct clk sh73a0_extal2_clk;
 extern struct clk sh73a0_extcki_clk;
diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c
new file mode 100644
index 0000000..99086e9
--- /dev/null
+++ b/arch/arm/mach-shmobile/pm-sh73a0.c
@@ -0,0 +1,32 @@
+/*
+ * sh73a0 Power management support
+ *
+ *  Copyright (C) 2012 Bastian Hecht <hechtb+renesas@gmail.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/suspend.h>
+#include <mach/common.h>
+
+#ifdef CONFIG_SUSPEND
+static int sh73a0_enter_suspend(suspend_state_t suspend_state)
+{
+	cpu_do_idle();
+	return 0;
+}
+
+static void sh73a0_suspend_init(void)
+{
+	shmobile_suspend_ops.enter = sh73a0_enter_suspend;
+}
+#else
+static void sh73a0_suspend_init(void) {}
+#endif
+
+void __init sh73a0_pm_init(void)
+{
+	sh73a0_suspend_init();
+}
-- 
1.7.10.4


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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2013-01-30  4:22           ` Simon Horman
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Horman @ 2013-01-30  4:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 12, 2013 at 04:43:29PM +0100, Bastian Hecht wrote:
> Hi Guennadi, hi Simon,
> 
> yes somehow a chunk is missing from my original patch in the patch of
> the next branch that got merged from soc2. I've prepared a revert of
> the bad patch and a corrected version, but now I'm unsure if that
> helps at all. Finally you don't want to get that fixups pulled into
> the mainline.
> 
> It seems to me to be a real mess to correct some patch somewhere in
> the middle of merged patch stacks. If I can help Simon, please let me
> know.

Could you see if the following is correct?
If not could you please prepare whichever of the following makes sense.

* An incremental patch to add the missing hunk

* A revert patch and a new patch

* A revert patch

http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h=13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f


>From 13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f Mon Sep 17 00:00:00 2001
From: Bastian Hecht <hechtb@gmail.com>
Date: Wed, 5 Dec 2012 12:13:06 +0000
Subject: [PATCH] ARM: shmobile: sh73a0: Add CPU sleep suspend

Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
clocks are stopped there is no need to save or restore any state of the
system.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/Makefile              |    1 +
 arch/arm/mach-shmobile/board-kzm9g.c         |    2 ++
 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/pm-sh73a0.c           |   32 ++++++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 arch/arm/mach-shmobile/pm-sh73a0.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 0b71479..f6aba6d 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_ARCH_SHMOBILE)	+= pm-rmobile.o
 obj-$(CONFIG_ARCH_SH7372)	+= pm-sh7372.o sleep-sh7372.o
 obj-$(CONFIG_ARCH_R8A7740)	+= pm-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779.o
+obj-$(CONFIG_ARCH_SH73A0)	+= pm-sh73a0.o
 
 # Board objects
 obj-$(CONFIG_MACH_AP4EVB)	+= board-ap4evb.o
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index ac94285..363c6ed 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -772,6 +772,8 @@ static void __init kzm_init(void)
 
 	sh73a0_add_standard_devices();
 	platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
+
+	sh73a0_pm_init();
 }
 
 static void kzm9g_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 2d1686b..f221c11 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -40,6 +40,7 @@ extern void sh73a0_add_early_devices(void);
 extern void sh73a0_add_standard_devices(void);
 extern void sh73a0_clock_init(void);
 extern void sh73a0_pinmux_init(void);
+extern void sh73a0_pm_init(void);
 extern struct clk sh73a0_extal1_clk;
 extern struct clk sh73a0_extal2_clk;
 extern struct clk sh73a0_extcki_clk;
diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c
new file mode 100644
index 0000000..99086e9
--- /dev/null
+++ b/arch/arm/mach-shmobile/pm-sh73a0.c
@@ -0,0 +1,32 @@
+/*
+ * sh73a0 Power management support
+ *
+ *  Copyright (C) 2012 Bastian Hecht <hechtb+renesas@gmail.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/suspend.h>
+#include <mach/common.h>
+
+#ifdef CONFIG_SUSPEND
+static int sh73a0_enter_suspend(suspend_state_t suspend_state)
+{
+	cpu_do_idle();
+	return 0;
+}
+
+static void sh73a0_suspend_init(void)
+{
+	shmobile_suspend_ops.enter = sh73a0_enter_suspend;
+}
+#else
+static void sh73a0_suspend_init(void) {}
+#endif
+
+void __init sh73a0_pm_init(void)
+{
+	sh73a0_suspend_init();
+}
-- 
1.7.10.4

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

* Re: [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
  2013-01-30  4:22           ` Simon Horman
@ 2013-01-31 16:31             ` Bastian Hecht
  -1 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2013-01-31 16:31 UTC (permalink / raw)
  To: linux-arm-kernel

Looks perfect, thanks!

2013/1/30 Simon Horman <horms@verge.net.au>:
> On Sat, Jan 12, 2013 at 04:43:29PM +0100, Bastian Hecht wrote:
>> Hi Guennadi, hi Simon,
>>
>> yes somehow a chunk is missing from my original patch in the patch of
>> the next branch that got merged from soc2. I've prepared a revert of
>> the bad patch and a corrected version, but now I'm unsure if that
>> helps at all. Finally you don't want to get that fixups pulled into
>> the mainline.
>>
>> It seems to me to be a real mess to correct some patch somewhere in
>> the middle of merged patch stacks. If I can help Simon, please let me
>> know.
>
> Could you see if the following is correct?
> If not could you please prepare whichever of the following makes sense.
>
> * An incremental patch to add the missing hunk
>
> * A revert patch and a new patch
>
> * A revert patch
>
> http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h\x13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f
>
>
> From 13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f Mon Sep 17 00:00:00 2001
> From: Bastian Hecht <hechtb@gmail.com>
> Date: Wed, 5 Dec 2012 12:13:06 +0000
> Subject: [PATCH] ARM: shmobile: sh73a0: Add CPU sleep suspend
>
> Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> clocks are stopped there is no need to save or restore any state of the
> system.
>
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
> Acked-by: Magnus Damm <damm@opensource.se>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  arch/arm/mach-shmobile/Makefile              |    1 +
>  arch/arm/mach-shmobile/board-kzm9g.c         |    2 ++
>  arch/arm/mach-shmobile/include/mach/common.h |    1 +
>  arch/arm/mach-shmobile/pm-sh73a0.c           |   32 ++++++++++++++++++++++++++
>  4 files changed, 36 insertions(+)
>  create mode 100644 arch/arm/mach-shmobile/pm-sh73a0.c
>
> diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
> index 0b71479..f6aba6d 100644
> --- a/arch/arm/mach-shmobile/Makefile
> +++ b/arch/arm/mach-shmobile/Makefile
> @@ -37,6 +37,7 @@ obj-$(CONFIG_ARCH_SHMOBILE)   += pm-rmobile.o
>  obj-$(CONFIG_ARCH_SH7372)      += pm-sh7372.o sleep-sh7372.o
>  obj-$(CONFIG_ARCH_R8A7740)     += pm-r8a7740.o
>  obj-$(CONFIG_ARCH_R8A7779)     += pm-r8a7779.o
> +obj-$(CONFIG_ARCH_SH73A0)      += pm-sh73a0.o
>
>  # Board objects
>  obj-$(CONFIG_MACH_AP4EVB)      += board-ap4evb.o
> diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
> index ac94285..363c6ed 100644
> --- a/arch/arm/mach-shmobile/board-kzm9g.c
> +++ b/arch/arm/mach-shmobile/board-kzm9g.c
> @@ -772,6 +772,8 @@ static void __init kzm_init(void)
>
>         sh73a0_add_standard_devices();
>         platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
> +
> +       sh73a0_pm_init();
>  }
>
>  static void kzm9g_restart(char mode, const char *cmd)
> diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
> index 2d1686b..f221c11 100644
> --- a/arch/arm/mach-shmobile/include/mach/common.h
> +++ b/arch/arm/mach-shmobile/include/mach/common.h
> @@ -40,6 +40,7 @@ extern void sh73a0_add_early_devices(void);
>  extern void sh73a0_add_standard_devices(void);
>  extern void sh73a0_clock_init(void);
>  extern void sh73a0_pinmux_init(void);
> +extern void sh73a0_pm_init(void);
>  extern struct clk sh73a0_extal1_clk;
>  extern struct clk sh73a0_extal2_clk;
>  extern struct clk sh73a0_extcki_clk;
> diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c
> new file mode 100644
> index 0000000..99086e9
> --- /dev/null
> +++ b/arch/arm/mach-shmobile/pm-sh73a0.c
> @@ -0,0 +1,32 @@
> +/*
> + * sh73a0 Power management support
> + *
> + *  Copyright (C) 2012 Bastian Hecht <hechtb+renesas@gmail.com>
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/suspend.h>
> +#include <mach/common.h>
> +
> +#ifdef CONFIG_SUSPEND
> +static int sh73a0_enter_suspend(suspend_state_t suspend_state)
> +{
> +       cpu_do_idle();
> +       return 0;
> +}
> +
> +static void sh73a0_suspend_init(void)
> +{
> +       shmobile_suspend_ops.enter = sh73a0_enter_suspend;
> +}
> +#else
> +static void sh73a0_suspend_init(void) {}
> +#endif
> +
> +void __init sh73a0_pm_init(void)
> +{
> +       sh73a0_suspend_init();
> +}
> --
> 1.7.10.4
>

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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2013-01-31 16:31             ` Bastian Hecht
  0 siblings, 0 replies; 22+ messages in thread
From: Bastian Hecht @ 2013-01-31 16:31 UTC (permalink / raw)
  To: linux-arm-kernel

Looks perfect, thanks!

2013/1/30 Simon Horman <horms@verge.net.au>:
> On Sat, Jan 12, 2013 at 04:43:29PM +0100, Bastian Hecht wrote:
>> Hi Guennadi, hi Simon,
>>
>> yes somehow a chunk is missing from my original patch in the patch of
>> the next branch that got merged from soc2. I've prepared a revert of
>> the bad patch and a corrected version, but now I'm unsure if that
>> helps at all. Finally you don't want to get that fixups pulled into
>> the mainline.
>>
>> It seems to me to be a real mess to correct some patch somewhere in
>> the middle of merged patch stacks. If I can help Simon, please let me
>> know.
>
> Could you see if the following is correct?
> If not could you please prepare whichever of the following makes sense.
>
> * An incremental patch to add the missing hunk
>
> * A revert patch and a new patch
>
> * A revert patch
>
> http://git.kernel.org/?p=linux/kernel/git/horms/renesas.git;a=commitdiff;h=13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f
>
>
> From 13baf88bd69ed3cf7e2374eec4a7128f62ae9c1f Mon Sep 17 00:00:00 2001
> From: Bastian Hecht <hechtb@gmail.com>
> Date: Wed, 5 Dec 2012 12:13:06 +0000
> Subject: [PATCH] ARM: shmobile: sh73a0: Add CPU sleep suspend
>
> Add the lighest possible sleep mode on Cortex-A9 cores: CPU sleep. It is
> entered by a simple dsb and wfi instruction via cpu_do_idle(). As just
> clocks are stopped there is no need to save or restore any state of the
> system.
>
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
> Acked-by: Magnus Damm <damm@opensource.se>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  arch/arm/mach-shmobile/Makefile              |    1 +
>  arch/arm/mach-shmobile/board-kzm9g.c         |    2 ++
>  arch/arm/mach-shmobile/include/mach/common.h |    1 +
>  arch/arm/mach-shmobile/pm-sh73a0.c           |   32 ++++++++++++++++++++++++++
>  4 files changed, 36 insertions(+)
>  create mode 100644 arch/arm/mach-shmobile/pm-sh73a0.c
>
> diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
> index 0b71479..f6aba6d 100644
> --- a/arch/arm/mach-shmobile/Makefile
> +++ b/arch/arm/mach-shmobile/Makefile
> @@ -37,6 +37,7 @@ obj-$(CONFIG_ARCH_SHMOBILE)   += pm-rmobile.o
>  obj-$(CONFIG_ARCH_SH7372)      += pm-sh7372.o sleep-sh7372.o
>  obj-$(CONFIG_ARCH_R8A7740)     += pm-r8a7740.o
>  obj-$(CONFIG_ARCH_R8A7779)     += pm-r8a7779.o
> +obj-$(CONFIG_ARCH_SH73A0)      += pm-sh73a0.o
>
>  # Board objects
>  obj-$(CONFIG_MACH_AP4EVB)      += board-ap4evb.o
> diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
> index ac94285..363c6ed 100644
> --- a/arch/arm/mach-shmobile/board-kzm9g.c
> +++ b/arch/arm/mach-shmobile/board-kzm9g.c
> @@ -772,6 +772,8 @@ static void __init kzm_init(void)
>
>         sh73a0_add_standard_devices();
>         platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
> +
> +       sh73a0_pm_init();
>  }
>
>  static void kzm9g_restart(char mode, const char *cmd)
> diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
> index 2d1686b..f221c11 100644
> --- a/arch/arm/mach-shmobile/include/mach/common.h
> +++ b/arch/arm/mach-shmobile/include/mach/common.h
> @@ -40,6 +40,7 @@ extern void sh73a0_add_early_devices(void);
>  extern void sh73a0_add_standard_devices(void);
>  extern void sh73a0_clock_init(void);
>  extern void sh73a0_pinmux_init(void);
> +extern void sh73a0_pm_init(void);
>  extern struct clk sh73a0_extal1_clk;
>  extern struct clk sh73a0_extal2_clk;
>  extern struct clk sh73a0_extcki_clk;
> diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c
> new file mode 100644
> index 0000000..99086e9
> --- /dev/null
> +++ b/arch/arm/mach-shmobile/pm-sh73a0.c
> @@ -0,0 +1,32 @@
> +/*
> + * sh73a0 Power management support
> + *
> + *  Copyright (C) 2012 Bastian Hecht <hechtb+renesas@gmail.com>
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/suspend.h>
> +#include <mach/common.h>
> +
> +#ifdef CONFIG_SUSPEND
> +static int sh73a0_enter_suspend(suspend_state_t suspend_state)
> +{
> +       cpu_do_idle();
> +       return 0;
> +}
> +
> +static void sh73a0_suspend_init(void)
> +{
> +       shmobile_suspend_ops.enter = sh73a0_enter_suspend;
> +}
> +#else
> +static void sh73a0_suspend_init(void) {}
> +#endif
> +
> +void __init sh73a0_pm_init(void)
> +{
> +       sh73a0_suspend_init();
> +}
> --
> 1.7.10.4
>

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

* Re: [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
  2013-01-31 16:31             ` Bastian Hecht
@ 2013-02-01  0:12               ` Simon Horman
  -1 siblings, 0 replies; 22+ messages in thread
From: Simon Horman @ 2013-02-01  0:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 31, 2013 at 12:31:17PM -0400, Bastian Hecht wrote:
> Looks perfect, thanks!

Great, thanks.

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

* [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend
@ 2013-02-01  0:12               ` Simon Horman
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Horman @ 2013-02-01  0:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 31, 2013 at 12:31:17PM -0400, Bastian Hecht wrote:
> Looks perfect, thanks!

Great, thanks.

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

* [PATCH 2/2] ARM: shmobile: r8a7740: Add TPU node to the device tree
  2012-12-05 12:13   ` Bastian Hecht
  (?)
  (?)
@ 2013-07-25 22:51   ` Laurent Pinchart
  -1 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2013-07-25 22:51 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm/boot/dts/r8a7740.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index e18a195..639822d 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -147,4 +147,11 @@
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
+
+	tpu: pwm@e6600000 {
+		compatible = "renesas,tpu-r8a7740", "renesas,tpu";
+		reg = <0xe6600000 0x100>;
+		status = "disabled";
+		#pwm-cells = <3>;
+	};
 };
-- 
1.8.1.5


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

* Re: [PATCH 2/2] ARM: shmobile: r8a7740: Add TPU node to the device tree
  2012-12-05 12:13   ` Bastian Hecht
                     ` (2 preceding siblings ...)
  (?)
@ 2013-07-31  1:46   ` Simon Horman
  -1 siblings, 0 replies; 22+ messages in thread
From: Simon Horman @ 2013-07-31  1:46 UTC (permalink / raw)
  To: linux-sh

On Fri, Jul 26, 2013 at 12:51:00AM +0200, Laurent Pinchart wrote:
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  arch/arm/boot/dts/r8a7740.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
> index e18a195..639822d 100644
> --- a/arch/arm/boot/dts/r8a7740.dtsi
> +++ b/arch/arm/boot/dts/r8a7740.dtsi
> @@ -147,4 +147,11 @@
>  		gpio-controller;
>  		#gpio-cells = <2>;
>  	};
> +
> +	tpu: pwm@e6600000 {
> +		compatible = "renesas,tpu-r8a7740", "renesas,tpu";
> +		reg = <0xe6600000 0x100>;
> +		status = "disabled";
> +		#pwm-cells = <3>;
> +	};
>  };

Thanks, I will queue this up for v3.12 in the tpu-pwm branch.

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

end of thread, other threads:[~2013-07-31  1:46 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-05 12:13 [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend Bastian Hecht
2012-12-05 12:13 ` Bastian Hecht
2012-12-05 12:13 ` [PATCH 2/2] ARM: shmobile: r8a7740: " Bastian Hecht
2012-12-05 12:13   ` Bastian Hecht
2012-12-14  3:22   ` Magnus Damm
2012-12-14  3:22     ` Magnus Damm
2013-07-25 22:51   ` [PATCH 2/2] ARM: shmobile: r8a7740: Add TPU node to the device tree Laurent Pinchart
2013-07-31  1:46   ` Simon Horman
2012-12-14  3:23 ` [PATCH 1/2] ARM: shmobile: sh73a0: Add CPU sleep suspend Magnus Damm
2012-12-14  3:23   ` Magnus Damm
2012-12-14 13:47   ` Simon Horman
2012-12-14 13:47     ` Simon Horman
2013-01-11  9:32     ` Guennadi Liakhovetski
2013-01-11  9:32       ` Guennadi Liakhovetski
2013-01-12 15:43       ` Bastian Hecht
2013-01-12 15:43         ` Bastian Hecht
2013-01-30  4:22         ` Simon Horman
2013-01-30  4:22           ` Simon Horman
2013-01-31 16:31           ` Bastian Hecht
2013-01-31 16:31             ` Bastian Hecht
2013-02-01  0:12             ` Simon Horman
2013-02-01  0:12               ` Simon Horman

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.