Lines Matching +full:no +full:- +full:1 +full:- +full:8 +full:- +full:v

4  * SPDX-License-Identifier: Apache-2.0
30 static mipi_syst_u16 channel = 1;
34 static const char pattern[] = "SYS-T RAW DATA: ";
42 out_ctx->buf[out_ctx->control_block->offset] = (uint8_t)c; in out_func()
43 out_ctx->control_block->offset++; in out_func()
45 __ASSERT_NO_MSG(out_ctx->control_block->offset <= out_ctx->size); in out_func()
47 if (out_ctx->control_block->offset == out_ctx->size) { in out_func()
58 p->current |= (n << 4); in stp_write_putNibble()
59 p->byteDone = !p->byteDone; in stp_write_putNibble()
61 if (p->byteDone) { in stp_write_putNibble()
62 out_func(p->current, systh->systh_platform.log_output); in stp_write_putNibble()
63 p->current = 0; in stp_write_putNibble()
65 p->current >>= 4; in stp_write_putNibble()
72 if (!p->byteDone) { in stp_write_flush()
78 struct stp_writer_data *p, mipi_syst_u8 v) in stp_write_d4() argument
80 stp_write_putNibble(systh, p, v); in stp_write_d4()
84 struct stp_writer_data *p, mipi_syst_u8 v) in stp_write_payload8() argument
86 stp_write_d4(systh, p, v); in stp_write_payload8()
87 stp_write_d4(systh, p, v>>4); in stp_write_payload8()
91 struct stp_writer_data *p, mipi_syst_u16 v) in stp_write_payload16() argument
93 stp_write_payload8(systh, p, (mipi_syst_u8)v); in stp_write_payload16()
94 stp_write_payload8(systh, p, (mipi_syst_u8)(v>>8)); in stp_write_payload16()
98 struct stp_writer_data *p, mipi_syst_u32 v) in stp_write_payload32() argument
100 stp_write_payload16(systh, p, (mipi_syst_u16)v); in stp_write_payload32()
101 stp_write_payload16(systh, p, (mipi_syst_u16)(v>>16)); in stp_write_payload32()
105 struct stp_writer_data *p, mipi_syst_u64 v) in stp_write_payload64() argument
107 stp_write_payload32(systh, p, (mipi_syst_u32)v); in stp_write_payload64()
108 stp_write_payload32(systh, p, (mipi_syst_u32)(v>>32)); in stp_write_payload64()
115 delta = mipi_syst_get_epoch() - p->timestamp; in deltaTime()
120 struct stp_writer_data *p, mipi_syst_u32 v) in stp_write_d32mts() argument
123 stp_write_payload32(systh, p, v); in stp_write_d32mts()
130 struct stp_writer_data *p, mipi_syst_u64 v) in stp_write_d64mts() argument
133 stp_write_payload64(systh, p, v); in stp_write_d64mts()
140 struct stp_writer_data *p, mipi_syst_u32 v) in stp_write_d32ts() argument
145 stp_write_payload32(systh, p, v); in stp_write_d32ts()
152 struct stp_writer_data *p, mipi_syst_u8 v) in stp_write_d8() argument
155 stp_write_payload8(systh, p, v); in stp_write_d8()
159 struct stp_writer_data *p, mipi_syst_u16 v) in stp_write_d16() argument
162 stp_write_payload16(systh, p, v); in stp_write_d16()
166 struct stp_writer_data *p, mipi_syst_u32 v) in stp_write_d32() argument
169 stp_write_payload32(systh, p, v); in stp_write_d32()
174 struct stp_writer_data *p, mipi_syst_u64 v) in stp_write_d64() argument
177 stp_write_payload64(systh, p, v); in stp_write_d64()
207 p->master = 0; in stp_write_version()
208 p->channel = 0; in stp_write_version()
225 if (!(p->recordCount++ % 20)) { in stp_write_setMC()
231 if (p->master != master) { in stp_write_setMC()
236 p->master = master; in stp_write_setMC()
237 p->channel = 0; in stp_write_setMC()
240 if (p->channel != channel) { in stp_write_setMC()
245 p->channel = channel; in stp_write_setMC()
255 for (i = n - 1; i >= 0; --i) {
261 out_func(c, systh->systh_platform.log_output);
263 out_func(valToHex[c >> 0x4], systh->systh_platform.log_output);
264 out_func(valToHex[c & 0xF], systh->systh_platform.log_output);
270 static void write_d8(struct mipi_syst_handle *systh, uint8_t v) argument
274 systh->systh_header->systh_platform.stpWriter;
276 stp_write_d8(systh, writer, v);
278 write_raw(systh, &v, sizeof(v));
282 static void write_d16(struct mipi_syst_handle *systh, uint16_t v) argument
286 systh->systh_header->systh_platform.stpWriter;
288 stp_write_d16(systh, writer, v);
290 write_raw(systh, &v, sizeof(v));
294 static void write_d32(struct mipi_syst_handle *systh, uint32_t v) argument
298 systh->systh_header->systh_platform.stpWriter;
300 stp_write_d32(systh, writer, v);
302 write_raw(systh, &v, sizeof(v));
307 static void write_d64(struct mipi_syst_handle *systh, uint64_t v) argument
311 systh->systh_header->systh_platform.stpWriter;
313 stp_write_d64(systh, writer, v);
315 write_raw(systh, &v, sizeof(v));
320 static void write_d32ts(struct mipi_syst_handle *systh, uint32_t v) argument
324 systh->systh_header->systh_platform.stpWriter;
327 systh->systh_platform.master,
328 systh->systh_platform.channel);
329 stp_write_d32ts(systh, writer, v);
333 write_raw(systh, &v, sizeof(v));
336 out_func(pattern[i], systh->systh_platform.log_output);
339 write_raw(systh, &v, sizeof(v));
343 static void write_d32mts(struct mipi_syst_handle *systh, mipi_syst_u32 v) argument
347 systh->systh_header->systh_platform.stpWriter;
350 systh->systh_platform.master,
351 systh->systh_platform.channel);
352 stp_write_d32mts(systh, writer, v);
355 ARG_UNUSED(v);
359 static void write_d64mts(struct mipi_syst_handle *systh, mipi_syst_u64 v) argument
363 systh->systh_header->systh_platform.stpWriter;
366 systh->systh_platform.master,
367 systh->systh_platform.channel);
368 stp_write_d64mts(systh, writer, v);
371 ARG_UNUSED(v);
379 systh->systh_header->systh_platform.stpWriter;
386 uint32_t flag = systh->systh_platform.flag;
393 out_func('\n', systh->systh_platform.log_output);
395 out_func('\r', systh->systh_platform.log_output);
396 out_func('\n', systh->systh_platform.log_output);
414 handle->systh_platform.flag = (mipi_syst_u32)flag;
415 handle->systh_platform.log_output = (struct log_output *)log_output;
421 * @brief Set module ID in the origin unit of Sys-T message
425 * Otherwise, this is a no-op as the module ID is set to
426 * default at boot time, and no need to be set again.
429 * @param module_id Module ID to be set (range 0x00 - 0x7F)
434 handle->systh_tag.et_modunit =
444 * Platform specific SyS-T handle initialization hook function
446 * @param systh pointer to the SyS-T handle structure
453 channel = 1;
456 systh->systh_platform.channel = channel++;
457 systh->systh_platform.master = master;
461 MIPI_SYST_ENABLE_HANDLE_LENGTH(systh, 1);
465 MIPI_SYST_ENABLE_HANDLE_TIMESTAMP(systh, 1);
478 * @param systh pointer to the new SyS-T handle structure
493 systh->systh_platform.stpWriter = &writer_state;
497 systh->systh_inith = platform_handle_init;
498 systh->systh_releaseh = platform_handle_release;
501 systh->systh_platform.write_d8 = write_d8;
502 systh->systh_platform.write_d16 = write_d16;
503 systh->systh_platform.write_d32 = write_d32;
505 systh->systh_platform.write_d64 = write_d64;
507 systh->systh_platform.write_d32ts = write_d32ts;
508 systh->systh_platform.write_d32mts = write_d32mts;
509 systh->systh_platform.write_d64mts = write_d64mts;
510 systh->systh_platform.write_flag = write_flag;
515 * 0 MIPI_SYST_SEVERITY_MAX no assigned severity
516 * 1 MIPI_SYST_SEVERITY_FATAL critical error level
557 hexdump_buf[sizeof(hexdump_buf) - 1] = '\0';
561 if (i > 0 && !(i % 8)) {
579 if (i > 0 && !(i % 8)) {
607 length -= part_len;
746 return -EINVAL;
764 payload_sz = argp - payload_buf;
777 return -ENOSPC;
793 /* Set the log source ID as Sys-T message module ID */
812 if (is_in_log_strings_section(pkg_hdr->fmt)) {
813 if ((pkg_hdr->hdr.desc.pkg_flags & CBPRINTF_PACKAGE_ARGS_ARE_TAGGED) ==
820 * 1. mipi_catalog_formatter() can only deal with
850 CHECKIF((pkg_desc->pkg_flags & CBPRINTF_PACKAGE_ARGS_ARE_TAGGED) ==
854 * and should not be used for non-tagged ones.