CHROMIUM: Refactor chromeos platform layer to cover both arm and x86.
[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 extern int chromeos_platform_read_nvram(u8 *nvram_buffer, int buf_size);
8 extern int chromeos_platform_write_nvram(u8 *nvram_buffer, int buf_size);
9
10 #ifdef CONFIG_CHROMEOS
11 /*
12  * ChromeOS platform support code. Glue layer between higher level functions
13  * and per-platform firmware interfaces.
14  */
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 #else
23
24 static inline int chromeos_set_need_recovery(void)
25 {
26         return -ENODEV;
27 }
28 #endif /* CONFIG_CHROMEOS */
29
30 #endif /* _LINUX_CHROMEOS_PLATFORM_H */