diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-06-16 11:08:12 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-06-29 03:48:28 -0400 |
commit | 725e789f228641fdfafcd65458f0ac78b87acc5a (patch) | |
tree | 579d90a2a22de79dd6bec4e36434a3bf30b9513e /arch/powerpc | |
parent | 8a0360a563cffc9a0712426820bedbb96bbc511b (diff) |
powerpc/hvsi: Move HVSI protocol definitions to a header file
This moves various HVSI protocol definitions from the hvsi.c
driver to a header file that can be used later on by a udbg
implementation
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/hvsi.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/hvsi.h b/arch/powerpc/include/asm/hvsi.h new file mode 100644 index 000000000000..f13125a0cb3a --- /dev/null +++ b/arch/powerpc/include/asm/hvsi.h | |||
@@ -0,0 +1,68 @@ | |||
1 | #ifndef _HVSI_H | ||
2 | #define _HVSI_H | ||
3 | |||
4 | #define VS_DATA_PACKET_HEADER 0xff | ||
5 | #define VS_CONTROL_PACKET_HEADER 0xfe | ||
6 | #define VS_QUERY_PACKET_HEADER 0xfd | ||
7 | #define VS_QUERY_RESPONSE_PACKET_HEADER 0xfc | ||
8 | |||
9 | /* control verbs */ | ||
10 | #define VSV_SET_MODEM_CTL 1 /* to service processor only */ | ||
11 | #define VSV_MODEM_CTL_UPDATE 2 /* from service processor only */ | ||
12 | #define VSV_CLOSE_PROTOCOL 3 | ||
13 | |||
14 | /* query verbs */ | ||
15 | #define VSV_SEND_VERSION_NUMBER 1 | ||
16 | #define VSV_SEND_MODEM_CTL_STATUS 2 | ||
17 | |||
18 | /* yes, these masks are not consecutive. */ | ||
19 | #define HVSI_TSDTR 0x01 | ||
20 | #define HVSI_TSCD 0x20 | ||
21 | |||
22 | #define HVSI_MAX_OUTGOING_DATA 12 | ||
23 | #define HVSI_VERSION 1 | ||
24 | |||
25 | struct hvsi_header { | ||
26 | uint8_t type; | ||
27 | uint8_t len; | ||
28 | uint16_t seqno; | ||
29 | } __attribute__((packed)); | ||
30 | |||
31 | struct hvsi_data { | ||
32 | uint8_t type; | ||
33 | uint8_t len; | ||
34 | uint16_t seqno; | ||
35 | uint8_t data[HVSI_MAX_OUTGOING_DATA]; | ||
36 | } __attribute__((packed)); | ||
37 | |||
38 | struct hvsi_control { | ||
39 | uint8_t type; | ||
40 | uint8_t len; | ||
41 | uint16_t seqno; | ||
42 | uint16_t verb; | ||
43 | /* optional depending on verb: */ | ||
44 | uint32_t word; | ||
45 | uint32_t mask; | ||
46 | } __attribute__((packed)); | ||
47 | |||
48 | struct hvsi_query { | ||
49 | uint8_t type; | ||
50 | uint8_t len; | ||
51 | uint16_t seqno; | ||
52 | uint16_t verb; | ||
53 | } __attribute__((packed)); | ||
54 | |||
55 | struct hvsi_query_response { | ||
56 | uint8_t type; | ||
57 | uint8_t len; | ||
58 | uint16_t seqno; | ||
59 | uint16_t verb; | ||
60 | uint16_t query_seqno; | ||
61 | union { | ||
62 | uint8_t version; | ||
63 | uint32_t mctrl_word; | ||
64 | } u; | ||
65 | } __attribute__((packed)); | ||
66 | |||
67 | |||
68 | #endif /* _HVSI_H */ | ||