-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Benjamin Herrenschmidt
committed
Jun 29, 2011
1 parent
0c2eb82
commit 7215bc7
Showing
3 changed files
with
70 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 8a0360a563cffc9a0712426820bedbb96bbc511b | ||
refs/heads/master: 725e789f228641fdfafcd65458f0ac78b87acc5a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#ifndef _HVSI_H | ||
#define _HVSI_H | ||
|
||
#define VS_DATA_PACKET_HEADER 0xff | ||
#define VS_CONTROL_PACKET_HEADER 0xfe | ||
#define VS_QUERY_PACKET_HEADER 0xfd | ||
#define VS_QUERY_RESPONSE_PACKET_HEADER 0xfc | ||
|
||
/* control verbs */ | ||
#define VSV_SET_MODEM_CTL 1 /* to service processor only */ | ||
#define VSV_MODEM_CTL_UPDATE 2 /* from service processor only */ | ||
#define VSV_CLOSE_PROTOCOL 3 | ||
|
||
/* query verbs */ | ||
#define VSV_SEND_VERSION_NUMBER 1 | ||
#define VSV_SEND_MODEM_CTL_STATUS 2 | ||
|
||
/* yes, these masks are not consecutive. */ | ||
#define HVSI_TSDTR 0x01 | ||
#define HVSI_TSCD 0x20 | ||
|
||
#define HVSI_MAX_OUTGOING_DATA 12 | ||
#define HVSI_VERSION 1 | ||
|
||
struct hvsi_header { | ||
uint8_t type; | ||
uint8_t len; | ||
uint16_t seqno; | ||
} __attribute__((packed)); | ||
|
||
struct hvsi_data { | ||
uint8_t type; | ||
uint8_t len; | ||
uint16_t seqno; | ||
uint8_t data[HVSI_MAX_OUTGOING_DATA]; | ||
} __attribute__((packed)); | ||
|
||
struct hvsi_control { | ||
uint8_t type; | ||
uint8_t len; | ||
uint16_t seqno; | ||
uint16_t verb; | ||
/* optional depending on verb: */ | ||
uint32_t word; | ||
uint32_t mask; | ||
} __attribute__((packed)); | ||
|
||
struct hvsi_query { | ||
uint8_t type; | ||
uint8_t len; | ||
uint16_t seqno; | ||
uint16_t verb; | ||
} __attribute__((packed)); | ||
|
||
struct hvsi_query_response { | ||
uint8_t type; | ||
uint8_t len; | ||
uint16_t seqno; | ||
uint16_t verb; | ||
uint16_t query_seqno; | ||
union { | ||
uint8_t version; | ||
uint32_t mctrl_word; | ||
} u; | ||
} __attribute__((packed)); | ||
|
||
|
||
#endif /* _HVSI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters