From: kgene.kim@samsung•com (Kukjin Kim)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 1/5] ARM: firmware: Introduce suspend and resume operations
Date: Wed, 24 Sep 2014 01:31:01 +0900 [thread overview]
Message-ID: <5421A045.5020804@samsung.com> (raw)
In-Reply-To: <1409062228-14690-2-git-send-email-t.figa@samsung.com>
On 08/26/14 23:10, Tomasz Figa wrote:
> This patch extends the firmware_ops structure with two new callbacks:
> .suspend() and .resume(). The former is intended to ask the firmware to
> save all its volatile state and suspend the system, without returning
> back to the kernel in between. The latter is to be called early by
> very low level platform suspend code after waking up to restore low
> level hardware state, which can't be restored in non-secure mode.
>
> While at it, outdated version of the structure is removed from the
> documentation and replaced with a reference to the header file.
>
> Signed-off-by: Tomasz Figa<t.figa@samsung•com>
> Acked-by: Alexandre Courbot<acourbot@nvidia•com>
> ---
> Documentation/arm/firmware.txt | 28 +++++-----------------------
> arch/arm/include/asm/firmware.h | 8 ++++++++
> 2 files changed, 13 insertions(+), 23 deletions(-)
>
> diff --git a/Documentation/arm/firmware.txt b/Documentation/arm/firmware.txt
> index c2e468f..da6713a 100644
> --- a/Documentation/arm/firmware.txt
> +++ b/Documentation/arm/firmware.txt
> @@ -7,32 +7,14 @@ world, which changes the way some things have to be initialized. This makes
> a need to provide an interface for such platforms to specify available firmware
> operations and call them when needed.
>
> -Firmware operations can be specified using struct firmware_ops
> -
> - struct firmware_ops {
> - /*
> - * Enters CPU idle mode
> - */
> - int (*do_idle)(void);
> - /*
> - * Sets boot address of specified physical CPU
> - */
> - int (*set_cpu_boot_addr)(int cpu, unsigned long boot_addr);
> - /*
> - * Boots specified physical CPU
> - */
> - int (*cpu_boot)(int cpu);
> - /*
> - * Initializes L2 cache
> - */
> - int (*l2x0_init)(void);
> - };
> -
> -and then registered with register_firmware_ops function
> +Firmware operations can be specified by filling in a struct firmware_ops
> +with appropriate callbacks and then registering it with register_firmware_ops()
> +function.
>
> void register_firmware_ops(const struct firmware_ops *ops)
>
> -the ops pointer must be non-NULL.
> +The ops pointer must be non-NULL. More information about struct firmware_ops
> +and its members can be found in arch/arm/include/asm/firmware.h header.
>
> There is a default, empty set of operations provided, so there is no need to
> set anything if platform does not require firmware operations.
> diff --git a/arch/arm/include/asm/firmware.h b/arch/arm/include/asm/firmware.h
> index 2c9f10d..5904f59 100644
> --- a/arch/arm/include/asm/firmware.h
> +++ b/arch/arm/include/asm/firmware.h
> @@ -41,6 +41,14 @@ struct firmware_ops {
> * Initializes L2 cache
> */
> int (*l2x0_init)(void);
> + /*
> + * Enter system-wide suspend.
> + */
> + int (*suspend)(void);
> + /*
> + * Restore state of privileged hardware after system-wide suspend.
> + */
> + int (*resume)(void);
> };
>
> /* Global pointer for current firmware_ops structure, can't be NULL. */
Hi Russell,
I've applied this in samsung tree for exynos stuff, if you have any
objection, please kindly let me know.
Thanks,
Kukjin
next prev parent reply other threads:[~2014-09-23 16:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 14:10 [PATCH v3 0/5] Firmware-assisted suspend/resume of Exynos SoCs Tomasz Figa
2014-08-26 14:10 ` [PATCH v3 1/5] ARM: firmware: Introduce suspend and resume operations Tomasz Figa
2014-09-23 16:31 ` Kukjin Kim [this message]
2014-08-26 14:10 ` [PATCH v3 2/5] ARM: EXYNOS: Add support for firmware-assisted suspend/resume Tomasz Figa
2014-08-26 14:10 ` [PATCH v3 3/5] ARM: dts: exynos4412-trats2: Keep eMMC regulators soft-disabled Tomasz Figa
2014-08-26 14:10 ` [PATCH v3 4/5] ARM: dts: exynos4x12: Add utility macro to define pin sleep states Tomasz Figa
2014-08-26 14:10 ` [PATCH v3 5/5] ARM: dts: exynos4412-trats2: Add sleep mode pin configuration Tomasz Figa
2014-09-14 17:47 ` [PATCH v3 0/5] Firmware-assisted suspend/resume of Exynos SoCs Tomasz Figa
2014-09-15 0:21 ` Kukjin Kim
2014-09-24 7:53 ` Kukjin Kim
2014-09-24 8:23 ` Marek Szyprowski
2014-09-24 8:42 ` Kukjin Kim
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=5421A045.5020804@samsung.com \
--to=kgene.kim@samsung$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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