mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] at91: sync mach/barebox-arm-head.h
@ 2017-07-07 22:06 Sam Ravnborg
  2017-09-06 12:41 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Ravnborg @ 2017-07-07 22:06 UTC (permalink / raw)
  To: Barebox List

From 308f9f62554feaffaf3e2a0c7203e57b6fde8abc Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri, 7 Jul 2017 17:53:59 +0200
Subject: [PATCH 1/2] at91: sync mach/barebox-arm-head.h

To prepare for multi image support synch the barebox-arm-head.h
header with the arm version.
This include the reservation of a small area for board specific use

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/arm/mach-at91/include/mach/barebox-arm-head.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/barebox-arm-head.h b/arch/arm/mach-at91/include/mach/barebox-arm-head.h
index d4bb96f63..e0e07500a 100644
--- a/arch/arm/mach-at91/include/mach/barebox-arm-head.h
+++ b/arch/arm/mach-at91/include/mach/barebox-arm-head.h
@@ -7,13 +7,13 @@
 #define AT91_EXV6	".word _barebox_bare_init_size\n"
 #endif
 
-static inline void barebox_arm_head(void)
+static inline void __barebox_arm_head(void)
 {
 	__asm__ __volatile__ (
 #ifdef CONFIG_THUMB2_BAREBOX
 #error Thumb2 is not supported
 #else
-		"b barebox_arm_reset_vector\n"
+		"b 2f\n"
 		"1: b 1b\n"
 		"1: b 1b\n"
 		"1: b 1b\n"
@@ -27,7 +27,19 @@ static inline void barebox_arm_head(void)
 							 * barebox can skip relocation
 							 */
 		".word _barebox_image_size\n"		/* image size to copy */
+		".rept 8\n"
+		".word 0x55555555\n"
+		".endr\n"
+		"2:\n"
+	);
+}
+
+static inline void barebox_arm_head(void)
+{
+	__barebox_arm_head();
+	__asm__ __volatile__ (
+		"b barebox_arm_reset_vector\n"
 	);
 }
 
-#endif /* __ASM_ARM_HEAD_H */
+#endif /* __MACH_ARM_HEAD_H */
-- 
2.12.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] at91: sync mach/barebox-arm-head.h
  2017-07-07 22:06 [PATCH 1/2] at91: sync mach/barebox-arm-head.h Sam Ravnborg
@ 2017-09-06 12:41 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-09-06 12:41 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Barebox List

On Sat, Jul 08, 2017 at 12:06:21AM +0200, Sam Ravnborg wrote:
> From 308f9f62554feaffaf3e2a0c7203e57b6fde8abc Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Fri, 7 Jul 2017 17:53:59 +0200
> Subject: [PATCH 1/2] at91: sync mach/barebox-arm-head.h
> 
> To prepare for multi image support synch the barebox-arm-head.h
> header with the arm version.
> This include the reservation of a small area for board specific use
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/arm/mach-at91/include/mach/barebox-arm-head.h | 18 +++++++++++++++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
> 

Applied, thanks

Sascha

> diff --git a/arch/arm/mach-at91/include/mach/barebox-arm-head.h b/arch/arm/mach-at91/include/mach/barebox-arm-head.h
> index d4bb96f63..e0e07500a 100644
> --- a/arch/arm/mach-at91/include/mach/barebox-arm-head.h
> +++ b/arch/arm/mach-at91/include/mach/barebox-arm-head.h
> @@ -7,13 +7,13 @@
>  #define AT91_EXV6	".word _barebox_bare_init_size\n"
>  #endif
>  
> -static inline void barebox_arm_head(void)
> +static inline void __barebox_arm_head(void)
>  {
>  	__asm__ __volatile__ (
>  #ifdef CONFIG_THUMB2_BAREBOX
>  #error Thumb2 is not supported
>  #else
> -		"b barebox_arm_reset_vector\n"
> +		"b 2f\n"
>  		"1: b 1b\n"
>  		"1: b 1b\n"
>  		"1: b 1b\n"
> @@ -27,7 +27,19 @@ static inline void barebox_arm_head(void)
>  							 * barebox can skip relocation
>  							 */
>  		".word _barebox_image_size\n"		/* image size to copy */
> +		".rept 8\n"
> +		".word 0x55555555\n"
> +		".endr\n"
> +		"2:\n"
> +	);
> +}
> +
> +static inline void barebox_arm_head(void)
> +{
> +	__barebox_arm_head();
> +	__asm__ __volatile__ (
> +		"b barebox_arm_reset_vector\n"
>  	);
>  }
>  
> -#endif /* __ASM_ARM_HEAD_H */
> +#endif /* __MACH_ARM_HEAD_H */
> -- 
> 2.12.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2017-09-06 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 22:06 [PATCH 1/2] at91: sync mach/barebox-arm-head.h Sam Ravnborg
2017-09-06 12:41 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox