Lines Matching full:header
3 // packet-header-definitions.h - The definitions of header fields for IEEE 1394 packet.
37 static inline unsigned int async_header_get_destination(const u32 header[ASYNC_HEADER_QUADLET_COUNT… in async_header_get_destination()
39 return (header[0] & ASYNC_HEADER_Q0_DESTINATION_MASK) >> ASYNC_HEADER_Q0_DESTINATION_SHIFT; in async_header_get_destination()
42 static inline unsigned int async_header_get_tlabel(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_tlabel()
44 return (header[0] & ASYNC_HEADER_Q0_TLABEL_MASK) >> ASYNC_HEADER_Q0_TLABEL_SHIFT; in async_header_get_tlabel()
47 static inline unsigned int async_header_get_retry(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_retry()
49 return (header[0] & ASYNC_HEADER_Q0_RETRY_MASK) >> ASYNC_HEADER_Q0_RETRY_SHIFT; in async_header_get_retry()
52 static inline unsigned int async_header_get_tcode(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_tcode()
54 return (header[0] & ASYNC_HEADER_Q0_TCODE_MASK) >> ASYNC_HEADER_Q0_TCODE_SHIFT; in async_header_get_tcode()
57 static inline unsigned int async_header_get_priority(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_priority()
59 return (header[0] & ASYNC_HEADER_Q0_PRIORITY_MASK) >> ASYNC_HEADER_Q0_PRIORITY_SHIFT; in async_header_get_priority()
62 static inline unsigned int async_header_get_source(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_source()
64 return (header[1] & ASYNC_HEADER_Q1_SOURCE_MASK) >> ASYNC_HEADER_Q1_SOURCE_SHIFT; in async_header_get_source()
67 static inline unsigned int async_header_get_rcode(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_rcode()
69 return (header[1] & ASYNC_HEADER_Q1_RCODE_MASK) >> ASYNC_HEADER_Q1_RCODE_SHIFT; in async_header_get_rcode()
72 static inline u64 async_header_get_offset(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_offset()
74 u32 hi = (header[1] & ASYNC_HEADER_Q1_OFFSET_HIGH_MASK) >> ASYNC_HEADER_Q1_OFFSET_HIGH_SHIFT; in async_header_get_offset()
75 return (((u64)hi) << 32) | ((u64)header[2]); in async_header_get_offset()
78 static inline u32 async_header_get_quadlet_data(const u32 header[ASYNC_HEADER_QUADLET_COUNT]) in async_header_get_quadlet_data()
80 return header[3]; in async_header_get_quadlet_data()
83 static inline unsigned int async_header_get_data_length(const u32 header[ASYNC_HEADER_QUADLET_COUNT… in async_header_get_data_length()
85 return (header[3] & ASYNC_HEADER_Q3_DATA_LENGTH_MASK) >> ASYNC_HEADER_Q3_DATA_LENGTH_SHIFT; in async_header_get_data_length()
88 static inline unsigned int async_header_get_extended_tcode(const u32 header[ASYNC_HEADER_QUADLET_CO… in async_header_get_extended_tcode()
90 return (header[3] & ASYNC_HEADER_Q3_EXTENDED_TCODE_MASK) >> ASYNC_HEADER_Q3_EXTENDED_TCODE_SHIFT; in async_header_get_extended_tcode()
93 static inline void async_header_set_destination(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_destination()
96 header[0] &= ~ASYNC_HEADER_Q0_DESTINATION_MASK; in async_header_set_destination()
97 …header[0] |= (((u32)destination) << ASYNC_HEADER_Q0_DESTINATION_SHIFT) & ASYNC_HEADER_Q0_DESTINATI… in async_header_set_destination()
100 static inline void async_header_set_tlabel(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_tlabel()
103 header[0] &= ~ASYNC_HEADER_Q0_TLABEL_MASK; in async_header_set_tlabel()
104 header[0] |= (((u32)tlabel) << ASYNC_HEADER_Q0_TLABEL_SHIFT) & ASYNC_HEADER_Q0_TLABEL_MASK; in async_header_set_tlabel()
107 static inline void async_header_set_retry(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_retry()
110 header[0] &= ~ASYNC_HEADER_Q0_RETRY_MASK; in async_header_set_retry()
111 header[0] |= (((u32)retry) << ASYNC_HEADER_Q0_RETRY_SHIFT) & ASYNC_HEADER_Q0_RETRY_MASK; in async_header_set_retry()
114 static inline void async_header_set_tcode(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_tcode()
117 header[0] &= ~ASYNC_HEADER_Q0_TCODE_MASK; in async_header_set_tcode()
118 header[0] |= (((u32)tcode) << ASYNC_HEADER_Q0_TCODE_SHIFT) & ASYNC_HEADER_Q0_TCODE_MASK; in async_header_set_tcode()
121 static inline void async_header_set_priority(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_priority()
124 header[0] &= ~ASYNC_HEADER_Q0_PRIORITY_MASK; in async_header_set_priority()
125 header[0] |= (((u32)priority) << ASYNC_HEADER_Q0_PRIORITY_SHIFT) & ASYNC_HEADER_Q0_PRIORITY_MASK; in async_header_set_priority()
129 static inline void async_header_set_source(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_source()
132 header[1] &= ~ASYNC_HEADER_Q1_SOURCE_MASK; in async_header_set_source()
133 header[1] |= (((u32)source) << ASYNC_HEADER_Q1_SOURCE_SHIFT) & ASYNC_HEADER_Q1_SOURCE_MASK; in async_header_set_source()
136 static inline void async_header_set_rcode(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_rcode()
139 header[1] &= ~ASYNC_HEADER_Q1_RCODE_MASK; in async_header_set_rcode()
140 header[1] |= (((u32)rcode) << ASYNC_HEADER_Q1_RCODE_SHIFT) & ASYNC_HEADER_Q1_RCODE_MASK; in async_header_set_rcode()
143 static inline void async_header_set_offset(u32 header[ASYNC_HEADER_QUADLET_COUNT], u64 offset) in async_header_set_offset()
146 header[1] &= ~ASYNC_HEADER_Q1_OFFSET_HIGH_MASK; in async_header_set_offset()
147 header[1] |= (hi << ASYNC_HEADER_Q1_OFFSET_HIGH_SHIFT) & ASYNC_HEADER_Q1_OFFSET_HIGH_MASK; in async_header_set_offset()
148 header[2] = (u32)(offset & 0x00000000ffffffff); in async_header_set_offset()
151 static inline void async_header_set_quadlet_data(u32 header[ASYNC_HEADER_QUADLET_COUNT], u32 quadle… in async_header_set_quadlet_data()
153 header[3] = quadlet_data; in async_header_set_quadlet_data()
156 static inline void async_header_set_data_length(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_data_length()
159 header[3] &= ~ASYNC_HEADER_Q3_DATA_LENGTH_MASK; in async_header_set_data_length()
160 …header[3] |= (((u32)data_length) << ASYNC_HEADER_Q3_DATA_LENGTH_SHIFT) & ASYNC_HEADER_Q3_DATA_LENG… in async_header_set_data_length()
163 static inline void async_header_set_extended_tcode(u32 header[ASYNC_HEADER_QUADLET_COUNT], in async_header_set_extended_tcode()
166 header[3] &= ~ASYNC_HEADER_Q3_EXTENDED_TCODE_MASK; in async_header_set_extended_tcode()
167 …header[3] |= (((u32)extended_tcode) << ASYNC_HEADER_Q3_EXTENDED_TCODE_SHIFT) & ASYNC_HEADER_Q3_EXT… in async_header_set_extended_tcode()
181 static inline unsigned int isoc_header_get_data_length(u32 header) in isoc_header_get_data_length() argument
183 return (header & ISOC_HEADER_DATA_LENGTH_MASK) >> ISOC_HEADER_DATA_LENGTH_SHIFT; in isoc_header_get_data_length()
186 static inline unsigned int isoc_header_get_tag(u32 header) in isoc_header_get_tag() argument
188 return (header & ISOC_HEADER_TAG_MASK) >> ISOC_HEADER_TAG_SHIFT; in isoc_header_get_tag()
191 static inline unsigned int isoc_header_get_channel(u32 header) in isoc_header_get_channel() argument
193 return (header & ISOC_HEADER_CHANNEL_MASK) >> ISOC_HEADER_CHANNEL_SHIFT; in isoc_header_get_channel()
196 static inline unsigned int isoc_header_get_tcode(u32 header) in isoc_header_get_tcode() argument
198 return (header & ISOC_HEADER_TCODE_MASK) >> ISOC_HEADER_TCODE_SHIFT; in isoc_header_get_tcode()
201 static inline unsigned int isoc_header_get_sy(u32 header) in isoc_header_get_sy() argument
203 return (header & ISOC_HEADER_SY_MASK) >> ISOC_HEADER_SY_SHIFT; in isoc_header_get_sy()
206 static inline void isoc_header_set_data_length(u32 *header, unsigned int data_length) in isoc_header_set_data_length() argument
208 *header &= ~ISOC_HEADER_DATA_LENGTH_MASK; in isoc_header_set_data_length()
209 *header |= (((u32)data_length) << ISOC_HEADER_DATA_LENGTH_SHIFT) & ISOC_HEADER_DATA_LENGTH_MASK; in isoc_header_set_data_length()
212 static inline void isoc_header_set_tag(u32 *header, unsigned int tag) in isoc_header_set_tag() argument
214 *header &= ~ISOC_HEADER_TAG_MASK; in isoc_header_set_tag()
215 *header |= (((u32)tag) << ISOC_HEADER_TAG_SHIFT) & ISOC_HEADER_TAG_MASK; in isoc_header_set_tag()
218 static inline void isoc_header_set_channel(u32 *header, unsigned int channel) in isoc_header_set_channel() argument
220 *header &= ~ISOC_HEADER_CHANNEL_MASK; in isoc_header_set_channel()
221 *header |= (((u32)channel) << ISOC_HEADER_CHANNEL_SHIFT) & ISOC_HEADER_CHANNEL_MASK; in isoc_header_set_channel()
224 static inline void isoc_header_set_tcode(u32 *header, unsigned int tcode) in isoc_header_set_tcode() argument
226 *header &= ~ISOC_HEADER_TCODE_MASK; in isoc_header_set_tcode()
227 *header |= (((u32)tcode) << ISOC_HEADER_TCODE_SHIFT) & ISOC_HEADER_TCODE_MASK; in isoc_header_set_tcode()
230 static inline void isoc_header_set_sy(u32 *header, unsigned int sy) in isoc_header_set_sy() argument
232 *header &= ~ISOC_HEADER_SY_MASK; in isoc_header_set_sy()
233 *header |= (((u32)sy) << ISOC_HEADER_SY_SHIFT) & ISOC_HEADER_SY_MASK; in isoc_header_set_sy()