linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: imx6q: resume PL310 only when CACHE_L2X0 defined
@ 2011-12-22  3:55 Eric Miao
  2011-12-26  2:17 ` Shawn Guo
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Miao @ 2011-12-22  3:55 UTC (permalink / raw)
  To: linux-arm-kernel

Original patch from Lothar Wa?mann, this patch fixes a building error
when CONFIG_CACHE_L2X0 is not defined.

Cc: Lothar Wa?mann <lw@karo-electronics.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Eric Miao <eric.miao@linaro.org>
---
 arch/arm/mach-imx/head-v7.S |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/head-v7.S
index a59cae7..cec23a8 100644
--- a/arch/arm/mach-imx/head-v7.S
+++ b/arch/arm/mach-imx/head-v7.S
@@ -80,6 +80,7 @@ ENDPROC(v7_secondary_startup)
 	.data
 	.align
 
+#ifdef CONFIG_CACHE_L2X0
 	.macro	pl310_resume
 	ldr	r2, phys_l2x0_saved_regs
 	ldr	r0, [r2, #L2X0_R_PHY_BASE]	@ get physical base of l2x0
@@ -89,13 +90,17 @@ ENDPROC(v7_secondary_startup)
 	str	r1, [r0, #L2X0_CTRL]		@ re-enable L2
 	.endm
 
+	.globl	phys_l2x0_saved_regs
+phys_l2x0_saved_regs:
+        .long   0
+#else
+	.macro	pl310_resume
+	.endm
+#endif
+
 ENTRY(v7_cpu_resume)
 	bl	v7_invalidate_l1
 	pl310_resume
 	b	cpu_resume
 ENDPROC(v7_cpu_resume)
-
-	.globl	phys_l2x0_saved_regs
-phys_l2x0_saved_regs:
-        .long   0
 #endif
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: imx6q: resume PL310 only when CACHE_L2X0 defined
  2011-12-22  3:55 [PATCH] ARM: imx6q: resume PL310 only when CACHE_L2X0 defined Eric Miao
@ 2011-12-26  2:17 ` Shawn Guo
  2011-12-26  7:25   ` Eric Miao
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn Guo @ 2011-12-26  2:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 22, 2011 at 11:55:01AM +0800, Eric Miao wrote:
> Original patch from Lothar Wa?mann, this patch fixes a building error
> when CONFIG_CACHE_L2X0 is not defined.
> 
> Cc: Lothar Wa?mann <lw@karo-electronics.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Signed-off-by: Eric Miao <eric.miao@linaro.org>
> ---
>  arch/arm/mach-imx/head-v7.S |   13 +++++++++----
>  1 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/head-v7.S
> index a59cae7..cec23a8 100644
> --- a/arch/arm/mach-imx/head-v7.S
> +++ b/arch/arm/mach-imx/head-v7.S
> @@ -80,6 +80,7 @@ ENDPROC(v7_secondary_startup)
>  	.data
>  	.align
>  
> +#ifdef CONFIG_CACHE_L2X0
>  	.macro	pl310_resume
>  	ldr	r2, phys_l2x0_saved_regs
>  	ldr	r0, [r2, #L2X0_R_PHY_BASE]	@ get physical base of l2x0
> @@ -89,13 +90,17 @@ ENDPROC(v7_secondary_startup)
>  	str	r1, [r0, #L2X0_CTRL]		@ re-enable L2
>  	.endm
>  
> +	.globl	phys_l2x0_saved_regs
> +phys_l2x0_saved_regs:
> +        .long   0
> +#else
> +	.macro	pl310_resume
> +	.endm
> +#endif
> +
>  ENTRY(v7_cpu_resume)
>  	bl	v7_invalidate_l1
>  	pl310_resume
>  	b	cpu_resume
>  ENDPROC(v7_cpu_resume)
> -
> -	.globl	phys_l2x0_saved_regs
> -phys_l2x0_saved_regs:
> -        .long   0
>  #endif
> -- 
> 1.7.5.4
> 
The following change on pm-imx6q.c needs to amended, otherwise we will see

  LD      .tmp_vmlinux1
arch/arm/mach-imx/built-in.o: In function `imx6q_pm_init':
arch/arm/mach-imx/pm-imx6q.c:70: undefined reference to `phys_l2x0_saved_regs'
arch/arm/mach-imx/pm-imx6q.c:70: undefined reference to `l2x0_saved_regs'

I fixed it up and queued for 3.3.  Thanks.

Regards,
Shawn

8<----
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
index f20f191..f7b0c2b 100644
--- a/arch/arm/mach-imx/pm-imx6q.c
+++ b/arch/arm/mach-imx/pm-imx6q.c
@@ -64,7 +64,9 @@ void __init imx6q_pm_init(void)
         * address of the data structure used by l2x0 core to save registers,
         * and later restore the necessary ones in imx6q resume entry.
         */
+#ifdef CONFIG_CACHE_L2X0
        phys_l2x0_saved_regs = __pa(&l2x0_saved_regs);
+#endif

        suspend_set_ops(&imx6q_pm_ops);
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: imx6q: resume PL310 only when CACHE_L2X0 defined
  2011-12-26  2:17 ` Shawn Guo
@ 2011-12-26  7:25   ` Eric Miao
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Miao @ 2011-12-26  7:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 26, 2011 at 10:17 AM, Shawn Guo <shawn.guo@freescale.com> wrote:
> On Thu, Dec 22, 2011 at 11:55:01AM +0800, Eric Miao wrote:
>> Original patch from Lothar Wa?mann, this patch fixes a building error
>> when CONFIG_CACHE_L2X0 is not defined.
>>
>> Cc: Lothar Wa?mann <lw@karo-electronics.de>
>> Cc: Shawn Guo <shawn.guo@linaro.org>
>> Signed-off-by: Eric Miao <eric.miao@linaro.org>
>> ---
>> ?arch/arm/mach-imx/head-v7.S | ? 13 +++++++++----
>> ?1 files changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/head-v7.S
>> index a59cae7..cec23a8 100644
>> --- a/arch/arm/mach-imx/head-v7.S
>> +++ b/arch/arm/mach-imx/head-v7.S
>> @@ -80,6 +80,7 @@ ENDPROC(v7_secondary_startup)
>> ? ? ? .data
>> ? ? ? .align
>>
>> +#ifdef CONFIG_CACHE_L2X0
>> ? ? ? .macro ?pl310_resume
>> ? ? ? ldr ? ? r2, phys_l2x0_saved_regs
>> ? ? ? ldr ? ? r0, [r2, #L2X0_R_PHY_BASE] ? ? ?@ get physical base of l2x0
>> @@ -89,13 +90,17 @@ ENDPROC(v7_secondary_startup)
>> ? ? ? str ? ? r1, [r0, #L2X0_CTRL] ? ? ? ? ? ?@ re-enable L2
>> ? ? ? .endm
>>
>> + ? ? .globl ?phys_l2x0_saved_regs
>> +phys_l2x0_saved_regs:
>> + ? ? ? ?.long ? 0
>> +#else
>> + ? ? .macro ?pl310_resume
>> + ? ? .endm
>> +#endif
>> +
>> ?ENTRY(v7_cpu_resume)
>> ? ? ? bl ? ? ?v7_invalidate_l1
>> ? ? ? pl310_resume
>> ? ? ? b ? ? ? cpu_resume
>> ?ENDPROC(v7_cpu_resume)
>> -
>> - ? ? .globl ?phys_l2x0_saved_regs
>> -phys_l2x0_saved_regs:
>> - ? ? ? ?.long ? 0
>> ?#endif
>> --
>> 1.7.5.4
>>
> The following change on pm-imx6q.c needs to amended, otherwise we will see
>
> ?LD ? ? ?.tmp_vmlinux1
> arch/arm/mach-imx/built-in.o: In function `imx6q_pm_init':
> arch/arm/mach-imx/pm-imx6q.c:70: undefined reference to `phys_l2x0_saved_regs'
> arch/arm/mach-imx/pm-imx6q.c:70: undefined reference to `l2x0_saved_regs'
>
> I fixed it up and queued for 3.3. ?Thanks.
>
> Regards,
> Shawn
>
> 8<----
> diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
> index f20f191..f7b0c2b 100644
> --- a/arch/arm/mach-imx/pm-imx6q.c
> +++ b/arch/arm/mach-imx/pm-imx6q.c
> @@ -64,7 +64,9 @@ void __init imx6q_pm_init(void)
> ? ? ? ? * address of the data structure used by l2x0 core to save registers,
> ? ? ? ? * and later restore the necessary ones in imx6q resume entry.
> ? ? ? ? */
> +#ifdef CONFIG_CACHE_L2X0
> ? ? ? ?phys_l2x0_saved_regs = __pa(&l2x0_saved_regs);
> +#endif

Ok, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-26  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22  3:55 [PATCH] ARM: imx6q: resume PL310 only when CACHE_L2X0 defined Eric Miao
2011-12-26  2:17 ` Shawn Guo
2011-12-26  7:25   ` Eric Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).