Paul Burton | 0ee958e | 2014-01-15 10:31:53 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 Imagination Technologies |
| 3 | * Author: Paul Burton <paul.burton@imgtec.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the |
| 7 | * Free Software Foundation; either version 2 of the License, or (at your |
| 8 | * option) any later version. |
| 9 | */ |
| 10 | |
| 11 | #ifndef __MIPS_ASM_SMP_CPS_H__ |
| 12 | #define __MIPS_ASM_SMP_CPS_H__ |
| 13 | |
| 14 | #ifndef __ASSEMBLY__ |
| 15 | |
Paul Burton | 245a786 | 2014-04-14 12:04:27 +0100 | [diff] [blame] | 16 | struct vpe_boot_config { |
Paul Burton | 0ee958e | 2014-01-15 10:31:53 +0000 | [diff] [blame] | 17 | unsigned long pc; |
| 18 | unsigned long sp; |
| 19 | unsigned long gp; |
| 20 | }; |
| 21 | |
Paul Burton | 245a786 | 2014-04-14 12:04:27 +0100 | [diff] [blame] | 22 | struct core_boot_config { |
| 23 | atomic_t vpe_mask; |
| 24 | struct vpe_boot_config *vpe_config; |
| 25 | }; |
| 26 | |
| 27 | extern struct core_boot_config *mips_cps_core_bootcfg; |
Paul Burton | 0ee958e | 2014-01-15 10:31:53 +0000 | [diff] [blame] | 28 | |
| 29 | extern void mips_cps_core_entry(void); |
Paul Burton | 245a786 | 2014-04-14 12:04:27 +0100 | [diff] [blame] | 30 | extern void mips_cps_core_init(void); |
| 31 | |
| 32 | extern struct vpe_boot_config *mips_cps_boot_vpes(void); |
Paul Burton | 0ee958e | 2014-01-15 10:31:53 +0000 | [diff] [blame] | 33 | |
Paul Burton | 3179d37 | 2014-04-14 11:00:56 +0100 | [diff] [blame] | 34 | extern void mips_cps_pm_save(void); |
| 35 | extern void mips_cps_pm_restore(void); |
| 36 | |
Paul Burton | 064231e | 2014-07-09 12:48:18 +0100 | [diff] [blame] | 37 | #ifdef CONFIG_MIPS_CPS |
| 38 | |
| 39 | extern bool mips_cps_smp_in_use(void); |
| 40 | |
| 41 | #else /* !CONFIG_MIPS_CPS */ |
| 42 | |
| 43 | static inline bool mips_cps_smp_in_use(void) { return false; } |
| 44 | |
| 45 | #endif /* !CONFIG_MIPS_CPS */ |
| 46 | |
Paul Burton | 0ee958e | 2014-01-15 10:31:53 +0000 | [diff] [blame] | 47 | #else /* __ASSEMBLY__ */ |
| 48 | |
| 49 | .extern mips_cps_bootcfg; |
| 50 | |
| 51 | #endif /* __ASSEMBLY__ */ |
| 52 | #endif /* __MIPS_ASM_SMP_CPS_H__ */ |