blob: 95c115d8b5eee5407feb99ce996f5793ceb34747 [file] [log] [blame]
Dinh Nguyen9c4566a2012-10-25 10:41:39 -06001/*
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
Pavel Machekad208d02012-10-27 01:00:53 +020013 .arch armv7-a
Dinh Nguyen9c4566a2012-10-25 10:41:39 -060014
Dinh Nguyen9c4566a2012-10-25 10:41:39 -060015ENTRY(secondary_trampoline)
Dinh Nguyend6dd7352013-02-11 17:30:33 -060016 movw r2, #:lower16:cpu1start_addr
17 movt r2, #:upper16:cpu1start_addr
Dinh Nguyen9c4566a2012-10-25 10:41:39 -060018
Dinh Nguyend6dd7352013-02-11 17:30:33 -060019 /* The socfpga VT cannot handle a 0xC0000000 page offset when loading
20 the cpu1start_addr, we bit clear it. Tested on HW and VT. */
21 bic r2, r2, #0x40000000
22
23 ldr r0, [r2]
Dinh Nguyen9c4566a2012-10-25 10:41:39 -060024 ldr r1, [r0]
25 bx r1
26
27ENTRY(secondary_trampoline_end)
Dinh Nguyend6dd7352013-02-11 17:30:33 -060028
29ENTRY(socfpga_secondary_startup)
30 bl v7_invalidate_l1
31 b secondary_startup
32ENDPROC(socfpga_secondary_startup)