]> git.sur5r.net Git - u-boot/blob - arch/arm/mach-uniphier/arm64/smp_kick_cpus.c
imx: correct speed grading info for i.MX6UL
[u-boot] / arch / arm / mach-uniphier / arm64 / smp_kick_cpus.c
1 /*
2  * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <common.h>
8 #include <mapmem.h>
9 #include <linux/io.h>
10 #include <linux/sizes.h>
11
12 #define UNIPHIER_SMPCTRL_ROM_RSV0       0x59801200
13
14 void uniphier_smp_setup(void);
15 void uniphier_secondary_startup(void);
16
17 void uniphier_smp_kick_all_cpus(void)
18 {
19         void __iomem *rom_boot_rsv0;
20
21         rom_boot_rsv0 = map_sysmem(UNIPHIER_SMPCTRL_ROM_RSV0, SZ_8);
22
23         writeq((u64)uniphier_secondary_startup, rom_boot_rsv0);
24         readq(rom_boot_rsv0);   /* relax */
25
26         unmap_sysmem(rom_boot_rsv0);
27
28         uniphier_smp_setup();
29
30         asm("sev"); /* Bring up all secondary CPUs from Boot ROM into U-Boot */
31 }