Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 1 | /* |
Masahiro Yamada | fa1f73f | 2016-07-19 21:56:13 +0900 | [diff] [blame^] | 2 | * Copyright (C) 2016 Socionext Inc. |
| 3 | * Author: Masahiro Yamada <yamada.masahiro@socionext.com> |
Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 8 | #include <linux/io.h> |
| 9 | #include <linux/sizes.h> |
| 10 | |
| 11 | #define UNIPHIER_SMPCTRL_ROM_RSV0 0x59801200 |
| 12 | |
| 13 | void uniphier_smp_setup(void); |
| 14 | void uniphier_secondary_startup(void); |
| 15 | |
| 16 | void uniphier_smp_kick_all_cpus(void) |
| 17 | { |
| 18 | void __iomem *rom_boot_rsv0; |
| 19 | |
Masahiro Yamada | fa1f73f | 2016-07-19 21:56:13 +0900 | [diff] [blame^] | 20 | rom_boot_rsv0 = ioremap(UNIPHIER_SMPCTRL_ROM_RSV0, SZ_8); |
Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 21 | |
| 22 | writeq((u64)uniphier_secondary_startup, rom_boot_rsv0); |
Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 23 | |
Masahiro Yamada | fa1f73f | 2016-07-19 21:56:13 +0900 | [diff] [blame^] | 24 | iounmap(rom_boot_rsv0); |
Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 25 | |
| 26 | uniphier_smp_setup(); |
| 27 | |
Masahiro Yamada | f627ef1 | 2016-06-08 18:02:32 +0900 | [diff] [blame] | 28 | asm("dsb ishst\n" /* Ensure the write to ROM_RSV0 is visible */ |
| 29 | "sev"); /* Bring up all secondary CPUs from Boot ROM into U-Boot */ |
Masahiro Yamada | 063eb1e | 2016-04-21 14:43:18 +0900 | [diff] [blame] | 30 | } |