From: Jungseok Lee <jays.lee@samsung.com>
To: kgene.kim@samsung.com
Cc: linux-samsung-soc@vger.kernel.org
Subject: [PATCH V2] ARM: EXYNOS: implement pm_power_off for EXYNOS5440
Date: Mon, 30 Sep 2013 10:32:05 +0900 [thread overview]
Message-ID: <003101cebd7c$ded3a610$9c7af230$%lee@samsung.com> (raw)
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>
---
Changes since v1:
- Added a comment to the effect of register configuration.
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..24eaa65 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");
+
+ /* turn off all power domains */
+ 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
next reply other threads:[~2013-09-30 1:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 1:32 Jungseok Lee [this message]
2013-09-30 3:03 ` [PATCH V2] ARM: EXYNOS: implement pm_power_off for EXYNOS5440 Sachin Kamat
2013-09-30 5:20 ` Jungseok Lee
2013-09-30 7:25 ` Kukjin Kim
2013-09-30 8:26 ` Sachin Kamat
2013-09-30 8:41 ` Tomasz Figa
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='003101cebd7c$ded3a610$9c7af230$%lee@samsung.com' \
--to=jays.lee@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.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