CHROMIUM: arm: driver for accessing shared memory, first cut.
[cascardo/linux.git] / include / linux / chromeos_platform.h
1 #ifndef _LINUX_CHROMEOS_PLATFORM_H
2 #define _LINUX_CHROMEOS_PLATFORM_H
3
4 #include <linux/errno.h>
5 #include <linux/types.h>
6
7 #ifdef CONFIG_CHROMEOS
8 /*
9  * ChromeOS platform support code. Glue layer between higher level functions
10  * and per-platform firmware interfaces.
11  */
12
13 /* Checks to see if the current device is in devmode */
14 extern bool chromeos_is_devmode(void);
15
16 /*
17  * Set the taint bit telling firmware that the currently running side needs
18  * recovery (or reinstall).
19  */
20 extern int chromeos_set_need_recovery(void);
21
22 extern u64 phys_window_base;
23
24 #else
25
26 /* Stubbed-out versions so we can keep code common */
27 static inline bool chromeos_is_devmode(void)
28 {
29         return true;
30 }
31
32 static inline int chromeos_set_need_recovery(void)
33 {
34         return -ENODEV;
35 }
36 #endif /* CONFIG_CHROMEOS */
37
38 #endif /* _LINUX_CHROMEOS_PLATFORM_H */