From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Tomasz Figa <t.figa@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Kukjin Kim <kgene.kim@samsung.com>,
Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
Alexandre Courbot <acourbot@nvidia.com>,
Stephen Warren <swarren@nvidia.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Tomasz Figa <tomasz.figa@gmail.com>
Subject: Re: [PATCH 2/2] ARM: EXYNOS: Add support for firmware-assisted suspend/resume
Date: Wed, 25 Jun 2014 23:54:34 +0100 [thread overview]
Message-ID: <20140625225434.GN32514@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1403713114-18923-3-git-send-email-t.figa@samsung.com>
On Wed, Jun 25, 2014 at 06:18:34PM +0200, Tomasz Figa wrote:
> +static int exynos_suspend(void)
> +{
> + /* Save Power control and Diagnostic registers */
> + asm ("mrc p15, 0, %0, c15, c0, 0\n"
> + "mrc p15, 0, %1, c15, c0, 1\n"
> + : "=r" (cp15_power), "=r" (cp15_diag) : : "cc");
> +
> + writel(EXYNOS_SLEEP_MAGIC, sysram_ns_base_addr + EXYNOS_BOOT_FLAG);
> + writel(virt_to_phys(cpu_resume),
> + sysram_ns_base_addr + EXYNOS_BOOT_ADDR);
> +
> + return cpu_suspend(0, exynos_cpu_suspend);
> +}
> +
> +static int exynos_resume(void)
> +{
> + exynos_smc(SMC_CMD_C15RESUME, cp15_power, cp15_diag, 0);
I am told that these two registers are not expected to change value
once the MMU is on. This presents something of a problem where the
secure monitor is involved, because what that means is that this
really needs to be done before we get to C code.
OMAP has similar issues where it needs to restore the L2 cache
setup via SMC calls before the MMU is enabled, and they deal with
this via some hand-crafted assembly code which runs prior to calling
into cpu_resume.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
next prev parent reply other threads:[~2014-06-25 22:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 16:18 [PATCH 0/2] Firmware-assisted suspend/resume of Exynos SoCs Tomasz Figa
2014-06-25 16:18 ` [PATCH 1/2] ARM: firmware: Introduce suspend and resume operations Tomasz Figa
2014-06-26 2:33 ` Alexandre Courbot
2014-06-25 16:18 ` [PATCH 2/2] ARM: EXYNOS: Add support for firmware-assisted suspend/resume Tomasz Figa
2014-06-25 22:54 ` Russell King - ARM Linux [this message]
2014-06-26 11:33 ` Daniel Drake
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=20140625225434.GN32514@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=acourbot@nvidia.com \
--cc=arnd@arndb.de \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=olof@lixom.net \
--cc=swarren@nvidia.com \
--cc=t.figa@samsung.com \
--cc=tomasz.figa@gmail.com \
/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
all inboxes | Powered by JetHome®