Thread (18 messages) 18 messages, 5 authors, 2011-09-20
DORMANTno replies

[PATCH v2 6/6] arm/imx6q: add suspend/resume support

From: Lorenzo Pieralisi <hidden>
Date: 2011-09-20 15:35:53

On Sat, Sep 17, 2011 at 09:30:09AM +0100, Shawn Guo wrote:
On Fri, Sep 16, 2011 at 03:45:39PM +0100, Lorenzo Pieralisi wrote:
quoted
Hi Shawn,

On Fri, Sep 16, 2011 at 07:09:00AM +0100, Shawn Guo wrote:
quoted
Hi Lorenzo,

On Thu, Sep 15, 2011 at 05:28:29PM +0100, Lorenzo Pieralisi wrote:
quoted
On Thu, Sep 15, 2011 at 03:45:26PM +0100, Shawn Guo wrote:
quoted
It adds suspend/resume support for imx6q.

Signed-off-by: Anson Huang <redacted>
Signed-off-by: Shawn Guo <redacted>
---
[...]
One reason that I implemented pl310_resume as a function call is that
I was trying to minimize the code that we have to put in .data section.
Now I do not think it's a point that really matters.  So following your
suggestion, here it is.  Please let me know it is not what you meant to
see.

/*
 * The following code is located into the .data section.  This is to
 * allow pl310_pbase and pl310_aux_ctrl to be accessed with a relative
 * load as we are running on physical address here.
 */
        .data
        .align

        .macro  pl310_resume
        adr     r2, pl310_pbase
        ldmia   r2, {r0, r1}
        str     r1, [r0, #L2X0_AUX_CTRL]        @ restore aux_ctrl
        mov     r1, #0x1
        str     r1, [r0, #L2X0_CTRL]            @ re-enable L2
        .endm

ENTRY(v7_cpu_resume)
        bl      v7_invalidate_l1
        pl310_resume
        b       cpu_resume
ENDPROC(v7_cpu_resume)

.globl
pl310_pbase:
        .long   0
pl310_aux_ctrl:
        .long   0
Yes, it does look simpler and better to me, but I still think there are going
to be other platforms doing the same precise thing if they run secure,
so we may want to generalize it; let's discuss it and converge.

Thanks for reworking it,
Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help