blob: 42d93f40a59fa9c78a58d365d87fd2d56700174e [file] [log] [blame]
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +01001/* Bootloader to resume MIO A701
2 *
3 * 2007-1-12 Robert Jarzmik
4 *
5 * This code is licenced under the GPLv2.
6*/
7
8#include <linux/linkage.h>
9#include <asm/assembler.h>
10
11/*
12 * Note: Yes, part of the following code is located into the .data section.
13 * This is to allow jumpaddr to be accessed with a relative load
14 * while we can't rely on any MMU translation. We could have put
15 * sleep_save_sp in the .text section as well, but some setups might
16 * insist on it to be truly read-only.
17 */
18 .data
Russell King1abd3502017-07-26 12:49:31 +010019 .align 2
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010020ENTRY(mioa701_bootstrap)
210:
22 b 1f
23ENTRY(mioa701_jumpaddr)
24 .word 0x40f00008 @ PSPR in no-MMU mode
251:
26 mov r0, #0xa0000000 @ Don't suppose memory access works
27 orr r0, r0, #0x00200000 @ even if it's supposed to
Robert Jarzmik999f6332008-11-17 20:29:03 +010028 orr r0, r0, #0x0000b000
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010029 mov r1, #0
30 str r1, [r0] @ Early disable resume for next boot
31 ldr r0, mioa701_jumpaddr @ (Murphy's Law)
32 ldr r0, [r0]
Russell King6ebbf2c2014-06-30 16:29:12 +010033 ret r0
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +0100342:
35
36ENTRY(mioa701_bootstrap_lg)
37 .data
Russell King1abd3502017-07-26 12:49:31 +010038 .align 2
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010039 .word 2b-0b