diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-05-05 11:31:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-05-05 11:31:44 +0200 |
commit | 5485383d60cd62f1306c5ba6b781e684ba5c2ec3 (patch) | |
tree | a10523f97dbbfccb1b4a45e55a915831157394d9 /arch/arm/mach-socfpga/include/mach/barebox-arm-head.h | |
parent | 8e91536a000c1738e354827d6f72965fa1444985 (diff) | |
parent | 243530107ad99daa9456e8843efef25326d2a613 (diff) | |
download | barebox-5485383d60cd62f1306c5ba6b781e684ba5c2ec3.tar.gz barebox-5485383d60cd62f1306c5ba6b781e684ba5c2ec3.tar.xz |
Merge branch 'for-next/socfpga'
Diffstat (limited to 'arch/arm/mach-socfpga/include/mach/barebox-arm-head.h')
-rw-r--r-- | arch/arm/mach-socfpga/include/mach/barebox-arm-head.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/include/mach/barebox-arm-head.h b/arch/arm/mach-socfpga/include/mach/barebox-arm-head.h new file mode 100644 index 0000000000..28fb1c92fc --- /dev/null +++ b/arch/arm/mach-socfpga/include/mach/barebox-arm-head.h @@ -0,0 +1,42 @@ +static inline void __barebox_arm_head(void) +{ + __asm__ __volatile__ ( +#ifdef CONFIG_THUMB2_BAREBOX + ".arm\n" + "adr r9, 1f + 1\n" + "bx r9\n" + ".thumb\n" + "1:\n" + "bl 2f\n" + ".rept 10\n" + "1: b 1b\n" + ".endr\n" +#else + "b 2f\n" + "1: b 1b\n" + "1: b 1b\n" + "1: b 1b\n" + "1: b 1b\n" + "1: b 1b\n" + "1: b 1b\n" + "1: b 1b\n" +#endif + ".asciz \"barebox\"\n" + ".word _text\n" /* text base. If copied there, + * barebox can skip relocation + */ + ".word _barebox_image_size\n" /* image size to copy */ + + ".rept 10\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" + ); +} |