* [PATCH 2/4] ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks
@ 2011-08-11 4:55 Chanwoo Choi
2011-10-02 7:08 ` Kukjin Kim
0 siblings, 1 reply; 3+ messages in thread
From: Chanwoo Choi @ 2011-08-11 4:55 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Chanwoo Choi <cw00.choi@samsung•com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung•com>
---
arch/arm/mach-exynos4/Makefile | 2 +-
arch/arm/mach-exynos4/pm-runtime.c | 56 ++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 1 deletions(-)
create mode 100644 arch/arm/mach-exynos4/pm-runtime.c
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
index 97c31ce..28cdb8b 100644
--- a/arch/arm/mach-exynos4/Makefile
+++ b/arch/arm/mach-exynos4/Makefile
@@ -5,7 +5,7 @@
#
# Licensed under GPLv2
-obj-y :=
+obj-y := pm-runtime.o
obj-m :=
obj-n :=
obj- :=
diff --git a/arch/arm/mach-exynos4/pm-runtime.c b/arch/arm/mach-exynos4/pm-runtime.c
new file mode 100644
index 0000000..4fe9f73
--- /dev/null
+++ b/arch/arm/mach-exynos4/pm-runtime.c
@@ -0,0 +1,56 @@
+/* linux/arch/arm/mach-exynos4/pm-runtime.c
+
+ * Exynos4210 Power management support
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <linux/platform_device.h>
+#include <linux/clk.h>
+#include <linux/bitmap.h>
+#include <linux/slab.h>
+
+#ifdef CONFIG_PM_RUNTIME
+
+static int default_platform_runtime_idle(struct device *dev)
+{
+ return pm_runtime_suspend(dev);
+}
+
+static struct dev_pm_domain default_pm_domain = {
+ .ops = {
+ .runtime_suspend = pm_clk_suspend,
+ .runtime_resume = pm_clk_resume,
+ .runtime_idle = default_platform_runtime_idle,
+ USE_PLATFORM_PM_SLEEP_OPS
+ },
+};
+
+#define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain)
+
+#else
+
+#define DEFAULT_PM_DOMAIN_PTR NULL
+
+#endif /* CONFIG_PM_RUNTIME */
+
+static struct pm_clk_notifier_block platform_bus_notifier = {
+ .pm_domain = DEFAULT_PM_DOMAIN_PTR,
+ .con_ids = { NULL, },
+};
+
+static int __init exynos4_pm_runtime_init(void)
+{
+ pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
+ return 0;
+}
+core_initcall(exynos4_pm_runtime_init);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/4] ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks
2011-08-11 4:55 [PATCH 2/4] ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks Chanwoo Choi
@ 2011-10-02 7:08 ` Kukjin Kim
2011-10-05 1:57 ` Chanwoo Choi
0 siblings, 1 reply; 3+ messages in thread
From: Kukjin Kim @ 2011-10-02 7:08 UTC (permalink / raw)
To: linux-arm-kernel
Chanwoo Choi wrote:
>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung•com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung•com>
> ---
> arch/arm/mach-exynos4/Makefile | 2 +-
> arch/arm/mach-exynos4/pm-runtime.c | 56 ++++++++++++++++++++++++++++++++++++
> 2 files changed, 57 insertions(+), 1 deletions(-)
> create mode 100644 arch/arm/mach-exynos4/pm-runtime.c
>
> diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
> index 97c31ce..28cdb8b 100644
> --- a/arch/arm/mach-exynos4/Makefile
> +++ b/arch/arm/mach-exynos4/Makefile
> @@ -5,7 +5,7 @@
> #
> # Licensed under GPLv2
>
> -obj-y :=
> +obj-y := pm-runtime.o
To move under depending CONFIG_ARCH_EXYNOS4 like others is better.
> obj-m :=
> obj-n :=
> obj- :=
> diff --git a/arch/arm/mach-exynos4/pm-runtime.c b/arch/arm/mach-exynos4/pm-runtime.c
> new file mode 100644
> index 0000000..4fe9f73
> --- /dev/null
> +++ b/arch/arm/mach-exynos4/pm-runtime.c
> @@ -0,0 +1,56 @@
> +/* linux/arch/arm/mach-exynos4/pm-runtime.c
> +
> + * Exynos4210 Power management support
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/io.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/platform_device.h>
> +#include <linux/clk.h>
> +#include <linux/bitmap.h>
> +#include <linux/slab.h>
> +
> +#ifdef CONFIG_PM_RUNTIME
> +
> +static int default_platform_runtime_idle(struct device *dev)
> +{
> + return pm_runtime_suspend(dev);
> +}
> +
> +static struct dev_pm_domain default_pm_domain = {
> + .ops = {
> + .runtime_suspend = pm_clk_suspend,
> + .runtime_resume = pm_clk_resume,
> + .runtime_idle = default_platform_runtime_idle,
> + USE_PLATFORM_PM_SLEEP_OPS
> + },
> +};
> +
> +#define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain)
> +
> +#else
> +
> +#define DEFAULT_PM_DOMAIN_PTR NULL
> +
> +#endif /* CONFIG_PM_RUNTIME */
> +
> +static struct pm_clk_notifier_block platform_bus_notifier = {
> + .pm_domain = DEFAULT_PM_DOMAIN_PTR,
> + .con_ids = { NULL, },
> +};
> +
> +static int __init exynos4_pm_runtime_init(void)
> +{
> + pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
> + return 0;
> +}
> +core_initcall(exynos4_pm_runtime_init);
> --
> 1.7.0.4
How about to make common stuff in ARM instead of each platform has their own...
I think you can consolidate this pm_runtime with other ARM platform like omap, shmobile.
arch/arm/mach-omap1/pm_bus.c
arch/arm/mach-shmobile/pm_runtime.c
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung•com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/4] ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks
2011-10-02 7:08 ` Kukjin Kim
@ 2011-10-05 1:57 ` Chanwoo Choi
0 siblings, 0 replies; 3+ messages in thread
From: Chanwoo Choi @ 2011-10-05 1:57 UTC (permalink / raw)
To: linux-arm-kernel
Kukjin Kim wrote:
> Chanwoo Choi wrote:
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung•com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung•com>
>> ---
>> arch/arm/mach-exynos4/Makefile | 2 +-
>> arch/arm/mach-exynos4/pm-runtime.c | 56 ++++++++++++++++++++++++++++++++++++
>> 2 files changed, 57 insertions(+), 1 deletions(-)
>> create mode 100644 arch/arm/mach-exynos4/pm-runtime.c
>>
>> diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
>> index 97c31ce..28cdb8b 100644
>> --- a/arch/arm/mach-exynos4/Makefile
>> +++ b/arch/arm/mach-exynos4/Makefile
>> @@ -5,7 +5,7 @@
>> #
>> # Licensed under GPLv2
>>
>> -obj-y :=
>> +obj-y := pm-runtime.o
>
> To move under depending CONFIG_ARCH_EXYNOS4 like others is better.
Ok, I will modify it.
>
>> obj-m :=
>> obj-n :=
>> obj- :=
>> diff --git a/arch/arm/mach-exynos4/pm-runtime.c b/arch/arm/mach-exynos4/pm-runtime.c
>> new file mode 100644
>> index 0000000..4fe9f73
>> --- /dev/null
>> +++ b/arch/arm/mach-exynos4/pm-runtime.c
>> @@ -0,0 +1,56 @@
>> +/* linux/arch/arm/mach-exynos4/pm-runtime.c
>> +
>> + * Exynos4210 Power management support
>> + *
>> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
>> + * http://www.samsung.com
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> +*/
>> +
>> +#include <linux/init.h>
>> +#include <linux/kernel.h>
>> +#include <linux/io.h>
>> +#include <linux/pm_runtime.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/clk.h>
>> +#include <linux/bitmap.h>
>> +#include <linux/slab.h>
>> +
>> +#ifdef CONFIG_PM_RUNTIME
>> +
>> +static int default_platform_runtime_idle(struct device *dev)
>> +{
>> + return pm_runtime_suspend(dev);
>> +}
>> +
>> +static struct dev_pm_domain default_pm_domain = {
>> + .ops = {
>> + .runtime_suspend = pm_clk_suspend,
>> + .runtime_resume = pm_clk_resume,
>> + .runtime_idle = default_platform_runtime_idle,
>> + USE_PLATFORM_PM_SLEEP_OPS
>> + },
>> +};
>> +
>> +#define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain)
>> +
>> +#else
>> +
>> +#define DEFAULT_PM_DOMAIN_PTR NULL
>> +
>> +#endif /* CONFIG_PM_RUNTIME */
>> +
>> +static struct pm_clk_notifier_block platform_bus_notifier = {
>> + .pm_domain = DEFAULT_PM_DOMAIN_PTR,
>> + .con_ids = { NULL, },
>> +};
>> +
>> +static int __init exynos4_pm_runtime_init(void)
>> +{
>> + pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
>> + return 0;
>> +}
>> +core_initcall(exynos4_pm_runtime_init);
>> --
>> 1.7.0.4
>
> How about to make common stuff in ARM instead of each platform has their own...
>
> I think you can consolidate this pm_runtime with other ARM platform like omap, shmobile.
>
> arch/arm/mach-omap1/pm_bus.c
> arch/arm/mach-shmobile/pm_runtime.c
>
OK, I received the comment of consolidating geneirc power-domain of exynos series from Sylwester Nawrocki.
I will reimplment for supporting various exynos series and resend it.
Thanks,
Best Regards,
Chanwoo Choi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-05 1:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 4:55 [PATCH 2/4] ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks Chanwoo Choi
2011-10-02 7:08 ` Kukjin Kim
2011-10-05 1:57 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox