This source file includes following definitions.
- olpc_board
- olpc_board_pre
- machine_is_olpc
- olpc_has_dcon
- olpc_board_at_least
- machine_is_olpc
- olpc_has_dcon
1
2
3
4 #ifndef _ASM_X86_OLPC_H
5 #define _ASM_X86_OLPC_H
6
7 #include <asm/geode.h>
8
9 struct olpc_platform_t {
10 int flags;
11 uint32_t boardrev;
12 };
13
14 #define OLPC_F_PRESENT 0x01
15 #define OLPC_F_DCON 0x02
16
17 #ifdef CONFIG_OLPC
18
19 extern struct olpc_platform_t olpc_platform_info;
20
21
22
23
24
25
26
27
28 static inline uint32_t olpc_board(uint8_t id)
29 {
30 return (id << 4) | 0x8;
31 }
32
33 static inline uint32_t olpc_board_pre(uint8_t id)
34 {
35 return id << 4;
36 }
37
38 static inline int machine_is_olpc(void)
39 {
40 return (olpc_platform_info.flags & OLPC_F_PRESENT) ? 1 : 0;
41 }
42
43
44
45
46
47 static inline int olpc_has_dcon(void)
48 {
49 return (olpc_platform_info.flags & OLPC_F_DCON) ? 1 : 0;
50 }
51
52
53
54
55
56
57
58
59
60 static inline int olpc_board_at_least(uint32_t rev)
61 {
62 return olpc_platform_info.boardrev >= rev;
63 }
64
65 #else
66
67 static inline int machine_is_olpc(void)
68 {
69 return 0;
70 }
71
72 static inline int olpc_has_dcon(void)
73 {
74 return 0;
75 }
76
77 #endif
78
79 #ifdef CONFIG_OLPC_XO1_PM
80 extern void do_olpc_suspend_lowlevel(void);
81 extern void olpc_xo1_pm_wakeup_set(u16 value);
82 extern void olpc_xo1_pm_wakeup_clear(u16 value);
83 #endif
84
85 extern int pci_olpc_init(void);
86
87
88
89 #define OLPC_GPIO_MIC_AC 1
90 #define OLPC_GPIO_DCON_STAT0 5
91 #define OLPC_GPIO_DCON_STAT1 6
92 #define OLPC_GPIO_DCON_IRQ 7
93 #define OLPC_GPIO_THRM_ALRM geode_gpio(10)
94 #define OLPC_GPIO_DCON_LOAD 11
95 #define OLPC_GPIO_DCON_BLANK 12
96 #define OLPC_GPIO_SMB_CLK 14
97 #define OLPC_GPIO_SMB_DATA 15
98 #define OLPC_GPIO_WORKAUX geode_gpio(24)
99 #define OLPC_GPIO_LID 26
100 #define OLPC_GPIO_ECSCI 27
101
102 #endif