| .. | .. | 
|---|
| 9 | 9 |  struct olpc_platform_t { | 
|---|
| 10 | 10 |  	int flags; | 
|---|
| 11 | 11 |  	uint32_t boardrev; | 
|---|
| 12 |  | -	int ecver;  | 
|---|
| 13 | 12 |  }; | 
|---|
| 14 | 13 |   | 
|---|
| 15 | 14 |  #define OLPC_F_PRESENT		0x01 | 
|---|
| 16 | 15 |  #define OLPC_F_DCON		0x02 | 
|---|
| 17 |  | -#define OLPC_F_EC_WIDE_SCI	0x04  | 
|---|
| 18 | 16 |   | 
|---|
| 19 | 17 |  #ifdef CONFIG_OLPC | 
|---|
| 20 | 18 |   | 
|---|
| .. | .. | 
|---|
| 64 | 62 |  	return olpc_platform_info.boardrev >= rev; | 
|---|
| 65 | 63 |  } | 
|---|
| 66 | 64 |   | 
|---|
| 67 |  | -extern void olpc_ec_wakeup_set(u16 value);  | 
|---|
| 68 |  | -extern void olpc_ec_wakeup_clear(u16 value);  | 
|---|
| 69 |  | -extern bool olpc_ec_wakeup_available(void);  | 
|---|
| 70 |  | -  | 
|---|
| 71 |  | -extern int olpc_ec_mask_write(u16 bits);  | 
|---|
| 72 |  | -extern int olpc_ec_sci_query(u16 *sci_value);  | 
|---|
| 73 |  | -  | 
|---|
| 74 | 65 |  #else | 
|---|
| 75 | 66 |   | 
|---|
| 76 | 67 |  static inline int machine_is_olpc(void) | 
|---|
| .. | .. | 
|---|
| 83 | 74 |  	return 0; | 
|---|
| 84 | 75 |  } | 
|---|
| 85 | 76 |   | 
|---|
| 86 |  | -static inline void olpc_ec_wakeup_set(u16 value) { }  | 
|---|
| 87 |  | -static inline void olpc_ec_wakeup_clear(u16 value) { }  | 
|---|
| 88 |  | -  | 
|---|
| 89 |  | -static inline bool olpc_ec_wakeup_available(void)  | 
|---|
| 90 |  | -{  | 
|---|
| 91 |  | -	return false;  | 
|---|
| 92 |  | -}  | 
|---|
| 93 |  | -  | 
|---|
| 94 | 77 |  #endif | 
|---|
| 95 | 78 |   | 
|---|
| 96 | 79 |  #ifdef CONFIG_OLPC_XO1_PM | 
|---|
| .. | .. | 
|---|
| 100 | 83 |  #endif | 
|---|
| 101 | 84 |   | 
|---|
| 102 | 85 |  extern int pci_olpc_init(void); | 
|---|
| 103 |  | -  | 
|---|
| 104 |  | -/* SCI source values */  | 
|---|
| 105 |  | -  | 
|---|
| 106 |  | -#define EC_SCI_SRC_EMPTY	0x00  | 
|---|
| 107 |  | -#define EC_SCI_SRC_GAME		0x01  | 
|---|
| 108 |  | -#define EC_SCI_SRC_BATTERY	0x02  | 
|---|
| 109 |  | -#define EC_SCI_SRC_BATSOC	0x04  | 
|---|
| 110 |  | -#define EC_SCI_SRC_BATERR	0x08  | 
|---|
| 111 |  | -#define EC_SCI_SRC_EBOOK	0x10	/* XO-1 only */  | 
|---|
| 112 |  | -#define EC_SCI_SRC_WLAN		0x20	/* XO-1 only */  | 
|---|
| 113 |  | -#define EC_SCI_SRC_ACPWR	0x40  | 
|---|
| 114 |  | -#define EC_SCI_SRC_BATCRIT	0x80  | 
|---|
| 115 |  | -#define EC_SCI_SRC_GPWAKE	0x100	/* XO-1.5 only */  | 
|---|
| 116 |  | -#define EC_SCI_SRC_ALL		0x1FF  | 
|---|
| 117 | 86 |   | 
|---|
| 118 | 87 |  /* GPIO assignments */ | 
|---|
| 119 | 88 |   | 
|---|