* ARM: EXYNOS: implement pm_power_off for EXYNOS5440
@ 2013-09-28 5:07 Jungseok Lee
2013-09-28 9:25 ` Sachin Kamat
0 siblings, 1 reply; 3+ messages in thread
From: Jungseok Lee @ 2013-09-28 5:07 UTC (permalink / raw)
To: '???'; +Cc: linux-samsung-soc
This patch implements pm_power_off function since a power-down
control register should be set in order to turn off EXYNOS5440.
Otherwise, power domains remain alive despite "poweroff" action.
Signed-off-by: Jungseok Lee <jays.lee@samsung.com>
---
arch/arm/mach-exynos/common.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index ba95e5d..21f3ce9 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -294,11 +294,24 @@ void exynos5_restart(enum reboot_mode mode, const char *cmd)
__raw_writel(val, addr);
}
+static void exynos5440_power_off(void)
+{
+ struct device_node *np;
+ void __iomem *addr;
+
+ np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
+
+ addr = of_iomap(np, 0) + 0x14;
+
+ __raw_writel(0x1, addr);
+}
+
void __init exynos_init_late(void)
{
- if (of_machine_is_compatible("samsung,exynos5440"))
- /* to be supported later */
+ if (of_machine_is_compatible("samsung,exynos5440")) {
+ pm_power_off = exynos5440_power_off;
return;
+ }
exynos_pm_late_initcall();
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: ARM: EXYNOS: implement pm_power_off for EXYNOS5440
2013-09-28 5:07 ARM: EXYNOS: implement pm_power_off for EXYNOS5440 Jungseok Lee
@ 2013-09-28 9:25 ` Sachin Kamat
2013-09-29 22:49 ` Jungseok Lee
0 siblings, 1 reply; 3+ messages in thread
From: Sachin Kamat @ 2013-09-28 9:25 UTC (permalink / raw)
To: Jungseok Lee; +Cc: ???, linux-samsung-soc
On 28 September 2013 10:37, Jungseok Lee <jays.lee@samsung.com> wrote:
>
> +static void exynos5440_power_off(void)
> +{
> + struct device_node *np;
> + void __iomem *addr;
> +
> + np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
> +
> + addr = of_iomap(np, 0) + 0x14;
> +
> + __raw_writel(0x1, addr);
Probably the magic numbers could be defined as macros or atleast a
comment to that effect would be useful.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: ARM: EXYNOS: implement pm_power_off for EXYNOS5440
2013-09-28 9:25 ` Sachin Kamat
@ 2013-09-29 22:49 ` Jungseok Lee
0 siblings, 0 replies; 3+ messages in thread
From: Jungseok Lee @ 2013-09-29 22:49 UTC (permalink / raw)
To: 'Sachin Kamat'; +Cc: kgene.kim, 'linux-samsung-soc'
On Saturday, September 28, 2013 6:26 PM, Sachin Kamat wrote:
> On 28 September 2013 10:37, Jungseok Lee <jays.lee@samsung.com> wrote:
> >
> > +static void exynos5440_power_off(void)
> > +{
> > + struct device_node *np;
> > + void __iomem *addr;
> > +
> > + np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
> > +
> > + addr = of_iomap(np, 0) + 0x14;
> > +
> > + __raw_writel(0x1, addr);
>
> Probably the magic numbers could be defined as macros or atleast a
> comment to that effect would be useful.
Thanks for your suggestion.
I will add some comments on magic numbers and resend a patch.
(I've also missed [PATCH] at mail title.)
Best Regards
Jungseok Lee
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-29 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-28 5:07 ARM: EXYNOS: implement pm_power_off for EXYNOS5440 Jungseok Lee
2013-09-28 9:25 ` Sachin Kamat
2013-09-29 22:49 ` Jungseok Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox