.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Actions Semi Leopard |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * Author: Actions Semi, Inc. |
---|
8 | 9 | * |
---|
9 | 10 | * Copyright (c) 2017 Andreas Färber |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify it |
---|
12 | | - * under the terms of the GNU General Public License as published by the |
---|
13 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
14 | | - * option) any later version. |
---|
15 | 11 | */ |
---|
16 | 12 | |
---|
17 | 13 | #include <linux/delay.h> |
---|
.. | .. |
---|
38 | 34 | static void __iomem *sps_base_addr; |
---|
39 | 35 | static void __iomem *timer_base_addr; |
---|
40 | 36 | static int ncores; |
---|
41 | | - |
---|
42 | | -static DEFINE_SPINLOCK(boot_lock); |
---|
43 | | - |
---|
44 | | -void owl_secondary_startup(void); |
---|
45 | 37 | |
---|
46 | 38 | static int s500_wakeup_secondary(unsigned int cpu) |
---|
47 | 39 | { |
---|
.. | .. |
---|
84 | 76 | |
---|
85 | 77 | static int s500_smp_boot_secondary(unsigned int cpu, struct task_struct *idle) |
---|
86 | 78 | { |
---|
87 | | - unsigned long timeout; |
---|
88 | 79 | int ret; |
---|
89 | 80 | |
---|
90 | 81 | ret = s500_wakeup_secondary(cpu); |
---|
.. | .. |
---|
93 | 84 | |
---|
94 | 85 | udelay(10); |
---|
95 | 86 | |
---|
96 | | - spin_lock(&boot_lock); |
---|
97 | | - |
---|
98 | 87 | smp_send_reschedule(cpu); |
---|
99 | | - |
---|
100 | | - timeout = jiffies + (1 * HZ); |
---|
101 | | - while (time_before(jiffies, timeout)) { |
---|
102 | | - if (pen_release == -1) |
---|
103 | | - break; |
---|
104 | | - } |
---|
105 | 88 | |
---|
106 | 89 | writel(0, timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4); |
---|
107 | 90 | writel(0, timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4); |
---|
108 | | - |
---|
109 | | - spin_unlock(&boot_lock); |
---|
110 | 91 | |
---|
111 | 92 | return 0; |
---|
112 | 93 | } |
---|