Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /* Bootloader to resume MIO A701
0003  *
0004  * 2007-1-12 Robert Jarzmik
0005 */
0006 
0007 #include <linux/linkage.h>
0008 #include <asm/assembler.h>
0009 
0010 /*
0011  * Note: Yes, part of the following code is located into the .data section.
0012  *       This is to allow jumpaddr to be accessed with a relative load
0013  *       while we can't rely on any MMU translation.  We could have put
0014  *       sleep_save_sp in the .text section as well, but some setups might
0015  *       insist on it to be truly read-only.
0016  */
0017     .data
0018     .align  2
0019 ENTRY(mioa701_bootstrap)
0020 0:
0021     b   1f
0022 ENTRY(mioa701_jumpaddr)
0023     .word   0x40f00008      @ PSPR in no-MMU mode
0024 1:
0025     mov r0,     #0xa0000000 @ Don't suppose memory access works
0026     orr r0, r0, #0x00200000 @ even if it's supposed to
0027     orr r0, r0, #0x0000b000
0028     mov r1, #0
0029     str r1, [r0]        @ Early disable resume for next boot
0030     ldr r0, mioa701_jumpaddr    @ (Murphy's Law)
0031     ldr r0, [r0]
0032     ret r0
0033 2:
0034 
0035 ENTRY(mioa701_bootstrap_lg)
0036     .data
0037     .align  2
0038     .word   2b-0b