tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / arch / arm64 / include / asm / bL_switcher.h
1 /*
2  * Based on the stubs for the ARM implementation which is:
3  *
4  * Created by:  Nicolas Pitre, April 2012
5  * Copyright:   (C) 2012-2013  Linaro Limited
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  */
11
12 #ifndef ASM_BL_SWITCHER_H
13 #define ASM_BL_SWITCHER_H
14
15 #include <linux/notifier.h>
16 #include <linux/types.h>
17
18 typedef void (*bL_switch_completion_handler)(void *cookie);
19
20 static inline int bL_switch_request(unsigned int cpu,
21                                     unsigned int new_cluster_id)
22 {
23         return -ENOTSUPP;
24 }
25
26 /*
27  * Register here to be notified about runtime enabling/disabling of
28  * the switcher.
29  *
30  * The notifier chain is called with the switcher activation lock held:
31  * the switcher will not be enabled or disabled during callbacks.
32  * Callbacks must not call bL_switcher_{get,put}_enabled().
33  */
34 #define BL_NOTIFY_PRE_ENABLE    0
35 #define BL_NOTIFY_POST_ENABLE   1
36 #define BL_NOTIFY_PRE_DISABLE   2
37 #define BL_NOTIFY_POST_DISABLE  3
38
39 static inline int bL_switcher_register_notifier(struct notifier_block *nb)
40 {
41         return 0;
42 }
43
44 static inline int bL_switcher_unregister_notifier(struct notifier_block *nb)
45 {
46         return 0;
47 }
48
49 static inline bool bL_switcher_get_enabled(void) { return false; }
50 static inline void bL_switcher_put_enabled(void) { }
51 static inline int bL_switcher_trace_trigger(void) { return 0; }
52 static inline int bL_switcher_get_logical_index(u32 mpidr) { return -EUNATCH; }
53
54 #endif