From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] Add deep sleep framework support for Freescale QorIQ platforms
Date: Thu, 23 Oct 2014 04:15:10 +0000 [thread overview]
Message-ID: <D06DCBDA.19FD7%yorksun@freescale.com> (raw)
In-Reply-To: <9d42fae860424a3b97638795c1fcb1ed@DM2PR03MB574.namprd03.prod.outlook.com>
Yuantian,
I examined current code closely and have two suggestions:
1. In initdram() function, add a call to fsl_dp_resume()
It is rational because the deep sleep resume is mainly dealing with memory. Doing this means you need to add calls to all boards with deep sleep feature enabled, not a lot at this moment.
2. Add a new hook at exact location you proposed
But change to a more generic name, eg misc_ram. Add a weak function misc_ram() doing nothing. Then you can add misc_ram() in board file where it is needed.
Both require to put a hook in all boards with deep sleep enabled.
York
From: Tang Yuantian-B29983 <Yuantian.Tang at freescale.com<mailto:Yuantian.Tang@freescale.com>>
Date: Wednesday, October 22, 2014 8:26 PM
To: York Sun <yorksun at freescale.com<mailto:yorksun@freescale.com>>, Tom Rini <trini at ti.com<mailto:trini@ti.com>>
Cc: "albert.u.boot at aribaud.net<mailto:albert.u.boot@aribaud.net>" <albert.u.boot at aribaud.net<mailto:albert.u.boot@aribaud.net>>, Jin Zhengxiong-R64188 <Jason.Jin at freescale.com<mailto:Jason.Jin@freescale.com>>, "u-boot at lists.denx.de<mailto:u-boot@lists.denx.de>" <u-boot at lists.denx.de<mailto:u-boot@lists.denx.de>>
Subject: RE: [U-Boot] [PATCH 1/4] Add deep sleep framework support for Freescale QorIQ platforms
Thanks for your hint. Unfortunately I can?t find such place.
It needs to be placed between DDR initialization and relocation.
It is used on both PPC and ARM platforms.
Do you have any sugguestions?
Thanks,
Yuantian
From: Sun York-R58495
Sent: Thursday, October 23, 2014 11:06 AM
To: Tang Yuantian-B29983; Tom Rini
Cc: albert.u.boot at aribaud.net<mailto:albert.u.boot@aribaud.net>; Jin Zhengxiong-R64188; u-boot at lists.denx.de<mailto:u-boot@lists.denx.de>
Subject: RE: [U-Boot] [PATCH 1/4] Add deep sleep framework support for Freescale QorIQ platforms
Yuantian,
Tom didn't suggest a specific hook. If you can use existing one, you don't have to create a new one. It's preferred if you can find a good place in existing xxx_f functions.
York
-------- Original Message --------
From: Tang Yuantian-B29983
Sent: Wed, 22/10/2014 19:53
To: Tom Rini
CC: albert.u.boot at aribaud.net<mailto:albert.u.boot@aribaud.net>; Jin Zhengxiong-R64188 ; u-boot at lists.denx.de<mailto:u-boot@lists.denx.de>; Sun York-R58495
Subject: RE: [U-Boot] [PATCH 1/4] Add deep sleep framework support for Freescale QorIQ platforms
> -----Original Message-----
> From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Tom Rini
> Sent: Wednesday, October 22, 2014 9:54 PM
> To: Tang Yuantian-B29983
> Cc: albert.u.boot at aribaud.net<mailto:albert.u.boot@aribaud.net>; Jin Zhengxiong-R64188; u-boot at lists.denx.de<mailto:u-boot@lists.denx.de>;
> Sun York-R58495
> Subject: Re: [U-Boot] [PATCH 1/4] Add deep sleep framework support for
> Freescale QorIQ platforms
>
> On Sun, Sep 28, 2014 at 04:59:45PM +0800, Yuantian.Tang at freescale.com<mailto:Yuantian.Tang@freescale.com>
> wrote:
> > From: Tang Yuantian <Yuantian.Tang at freescale.com<mailto:Yuantian.Tang@freescale.com>>
> >
> > When Freescale QorIQ SoCs wake up from deep sleep, control is passed
> > to the primary core that starts executing uboot. After re-initialized
> > some IP blocks, like DDRC, kernel will take responsibility to continue
> > to restore environment it leaves before.
> >
> > This patch adds the deep sleep framework support for all Freescale
> > QorIQ platforms that use generic_board configuation.
> >
> > Signed-off-by: Tang Yuantian <Yuantian.Tang at freescale.com<mailto:Yuantian.Tang@freescale.com>>
> > ---
> > common/board_f.c | 10 +++++++++
> > drivers/ddr/fsl/arm_ddr_gen3.c | 48
> +++++++++++++++++++++++++++++++++++++-----
> > include/fsl_ddr_sdram.h | 2 ++
> > include/fsl_sleep.h | 32 ++++++++++++++++++++++++++++
> > 4 files changed, 87 insertions(+), 5 deletions(-) create mode 100644
> > include/fsl_sleep.h
> >
> > diff --git a/common/board_f.c b/common/board_f.c index
> > e6aa298..b736d29 100644
> > --- a/common/board_f.c
> > +++ b/common/board_f.c
> > @@ -56,6 +56,9 @@
> > #endif
> > #include <dm/root.h>
> > #include <linux/compiler.h>
> > +#ifdef CONFIG_FSL_DEEP_SLEEP
> > +#include <fsl_sleep.h>
> > +#endif
> >
> > /*
> > * Pointer to initial global data area @@ -921,6 +924,9 @@ static
> > init_fnc_t init_sequence_f[] = { #if defined(CONFIG_MIPS) ||
> > defined(CONFIG_PPC)
> > init_func_ram,
> > #endif
> > +#ifdef CONFIG_FSL_DEEP_SLEEP
> > + fsl_dp_resume,
> > +#endif
>
> Is there not an existing hook you can use here instead? Is misc_init_f too early?
Misc_init_f is too early, we need to put it between DDR initialization and relocation.
> If we're going to add a new hook in here, it needs to be somewhat generically
> named, with the requirements of the system spelled out.
It is Freescale specific. Wouldn't be a misleading for other platforms that don't jump to kernel here?
> Some TI parts have a
> (setting aside marketing-speak) similar function and I believe the U-Boot patches
> for that use an existing hook to notice what happened and do what's needed.
Which function did you refer to? I can check if it can be used.
Thanks,
Yuantian
> Thanks!
>
> --
> Tom
next prev parent reply other threads:[~2014-10-23 4:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-28 8:59 [U-Boot] [PATCH 0/4] Deep sleep patches for Freescale QorIQ platforms Yuantian.Tang at freescale.com
2014-09-28 8:59 ` [U-Boot] [PATCH 1/4] Add deep sleep framework support " Yuantian.Tang at freescale.com
2014-10-22 13:53 ` Tom Rini
2014-10-23 2:53 ` Yuantian Tang
2014-10-23 3:06 ` York Sun
2014-10-23 3:26 ` Yuantian Tang
2014-10-23 3:33 ` York Sun
2014-10-23 4:15 ` York Sun [this message]
2014-10-23 4:47 ` Yuantian Tang
2014-10-23 18:58 ` Tom Rini
2014-09-28 8:59 ` [U-Boot] [PATCH 2/4] ARM: HYP/non-sec: Make armv7_init_nonsec() usable before relocation Yuantian.Tang at freescale.com
2014-09-28 8:59 ` [U-Boot] [PATCH 3/4] arm: ls102xa: Fixed a register definition error Yuantian.Tang at freescale.com
2014-09-28 8:59 ` [U-Boot] [PATCH 4/4] arm: ls1021qds: Add deep sleep support Yuantian.Tang at freescale.com
-- strict thread matches above, loose matches on Subject: below --
2014-10-09 8:11 [U-Boot] [PATCH 0/4] Deep sleep patches for Freescale QorIQ platforms Yuantian.Tang at freescale.com
2014-10-09 8:11 ` [U-Boot] [PATCH 1/4] Add deep sleep framework support " Yuantian.Tang at freescale.com
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=D06DCBDA.19FD7%yorksun@freescale.com \
--to=yorksun@freescale.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.