From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: EXYNOS: init cpuidle driver in exynos_init_late()
Date: Wed, 26 Jun 2013 12:48:37 +0200 [thread overview]
Message-ID: <51CAC705.7000500@linaro.org> (raw)
In-Reply-To: <1372241627-22695-3-git-send-email-b.zolnierkie@samsung.com>
On 06/26/2013 12:13 PM, Bartlomiej Zolnierkiewicz wrote:
> Init cpuidle driver in exynos_init_late() instead of using
> device_initcall(). This is needed for multiplatform support.
>
> Tested on Exynos4210 (Universal C210 board).
Please, find a way to have the same level of initialization than
device_init_call. In the work of consolidating the drivers, there are
all at the device_init_call level.
> Cc: Jaecheol Lee <jc.lee@samsung.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@linaro.org>
> Cc: Tomasz Figa <t.figa@samsung.com>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
> arch/arm/mach-exynos/common.c | 8 ++++----
> arch/arm/mach-exynos/common.h | 6 ++++++
> arch/arm/mach-exynos/cpuidle.c | 3 +--
> 3 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
> index f7e504b..1c78a16 100644
> --- a/arch/arm/mach-exynos/common.c
> +++ b/arch/arm/mach-exynos/common.c
> @@ -346,11 +346,11 @@ void exynos5_restart(char mode, const char *cmd)
>
> void __init exynos_init_late(void)
> {
> - if (of_machine_is_compatible("samsung,exynos5440"))
> - /* to be supported later */
> - return;
> + /* exynos5440 to be supported later */
> + if (!of_machine_is_compatible("samsung,exynos5440"))
> + exynos_pm_late_initcall();
>
> - exynos_pm_late_initcall();
> + exynos4_init_cpuidle();
> }
>
> #ifdef CONFIG_OF
> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
> index 11fc1e2..a3b95a6 100644
> --- a/arch/arm/mach-exynos/common.h
> +++ b/arch/arm/mach-exynos/common.h
> @@ -40,6 +40,12 @@ int exynos_pm_late_initcall(void);
> static inline int exynos_pm_late_initcall(void) { return 0; }
> #endif
>
> +#ifdef CONFIG_CPU_IDLE
> +int exynos4_init_cpuidle(void);
> +#else
> +static inline int exynos4_init_cpuidle(void) { return 0; }
> +#endif
> +
> #ifdef CONFIG_ARCH_EXYNOS4
> void exynos4_register_clocks(void);
> void exynos4_setup_clocks(void);
> diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
> index 0a657ac..d6e5115 100644
> --- a/arch/arm/mach-exynos/cpuidle.c
> +++ b/arch/arm/mach-exynos/cpuidle.c
> @@ -66,7 +66,7 @@ static void __init exynos5_core_down_clk(void)
> __raw_writel(tmp, EXYNOS5_PWR_CTRL2);
> }
>
> -static int __init exynos4_init_cpuidle(void)
> +int __init exynos4_init_cpuidle(void)
> {
> int cpu_id, ret;
> struct cpuidle_device *device;
> @@ -93,4 +93,3 @@ static int __init exynos4_init_cpuidle(void)
>
> return 0;
> }
> -device_initcall(exynos4_init_cpuidle);
>
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2013-06-26 10:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 10:13 [PATCH 0/3] ARM: EXYNOS: cpuidle driver fixes Bartlomiej Zolnierkiewicz
2013-06-26 10:13 ` [PATCH 1/3] ARM: EXYNOS: remove non-working AFTR mode support Bartlomiej Zolnierkiewicz
2013-06-26 10:36 ` Daniel Lezcano
2013-06-27 18:10 ` Bartlomiej Zolnierkiewicz
2013-06-28 9:57 ` Daniel Lezcano
2013-06-28 10:11 ` Tomasz Figa
2013-06-28 11:13 ` Lorenzo Pieralisi
2013-06-28 16:21 ` Tomasz Figa
2013-06-28 11:20 ` Daniel Lezcano
2013-06-28 16:27 ` Bartlomiej Zolnierkiewicz
2013-06-28 21:47 ` Daniel Lezcano
2013-06-28 22:47 ` Tomasz Figa
2013-07-01 9:09 ` Daniel Lezcano
2013-07-11 13:14 ` Bartlomiej Zolnierkiewicz
2013-07-17 12:57 ` Daniel Lezcano
2013-07-17 13:31 ` Lorenzo Pieralisi
2013-07-17 14:07 ` Tomasz Figa
2013-07-17 14:36 ` Bartlomiej Zolnierkiewicz
2013-06-28 17:31 ` Tomasz Figa
2013-06-28 22:27 ` Daniel Lezcano
2013-06-28 23:07 ` Tomasz Figa
2013-07-01 9:23 ` Daniel Lezcano
2013-06-26 10:13 ` [PATCH 2/3] ARM: EXYNOS: init cpuidle driver in exynos_init_late() Bartlomiej Zolnierkiewicz
2013-06-26 10:48 ` Daniel Lezcano [this message]
2013-06-26 10:13 ` [PATCH 3/3] ARM: EXYNOS: move cpuidle driver to drivers/cpuidle/ Bartlomiej Zolnierkiewicz
2013-06-26 10:46 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51CAC705.7000500@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).