Dinh Nguyen | 9c4566a | 2012-10-25 10:41:39 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2003 ARM Limited |
| 3 | * Copyright (c) u-boot contributors |
| 4 | * Copyright (c) 2012 Pavel Machek <pavel@denx.de> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | #include <linux/linkage.h> |
| 11 | #include <linux/init.h> |
| 12 | |
Arnd Bergmann | 9560f84 | 2012-11-06 23:14:49 +0100 | [diff] [blame] | 13 | __CPUINIT |
Pavel Machek | ad208d0 | 2012-10-27 01:00:53 +0200 | [diff] [blame] | 14 | .arch armv7-a |
Dinh Nguyen | 9c4566a | 2012-10-25 10:41:39 -0600 | [diff] [blame] | 15 | |
Dinh Nguyen | 9c4566a | 2012-10-25 10:41:39 -0600 | [diff] [blame] | 16 | ENTRY(secondary_trampoline) |
Dinh Nguyen | d6dd735 | 2013-02-11 17:30:33 -0600 | [diff] [blame] | 17 | movw r2, #:lower16:cpu1start_addr |
| 18 | movt r2, #:upper16:cpu1start_addr |
Dinh Nguyen | 9c4566a | 2012-10-25 10:41:39 -0600 | [diff] [blame] | 19 | |
Dinh Nguyen | d6dd735 | 2013-02-11 17:30:33 -0600 | [diff] [blame] | 20 | /* The socfpga VT cannot handle a 0xC0000000 page offset when loading |
| 21 | the cpu1start_addr, we bit clear it. Tested on HW and VT. */ |
| 22 | bic r2, r2, #0x40000000 |
| 23 | |
| 24 | ldr r0, [r2] |
Dinh Nguyen | 9c4566a | 2012-10-25 10:41:39 -0600 | [diff] [blame] | 25 | ldr r1, [r0] |
| 26 | bx r1 |
| 27 | |
| 28 | ENTRY(secondary_trampoline_end) |
Dinh Nguyen | d6dd735 | 2013-02-11 17:30:33 -0600 | [diff] [blame] | 29 | |
| 30 | ENTRY(socfpga_secondary_startup) |
| 31 | bl v7_invalidate_l1 |
| 32 | b secondary_startup |
| 33 | ENDPROC(socfpga_secondary_startup) |