summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2015-12-21 16:50:47 +0200
committerJani Nikula <jani.nikula@intel.com>2015-12-22 14:21:22 +0200
commit9764247dc57036e1d1c73b2f69411906504a8288 (patch)
treebee66e021e0977a409e8165cafb27d36441d15c4 /tools
parentcb89add9793b04288cb332a0d17dd8d8d6f09680 (diff)
intel_bios_reader: add dumping of i2c element in mipi sequence
Due to the clever way the whole sequence block is specified without forward compatibility, it's not possible to dump most blocks without this. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_bios_reader.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 7c3e1bca..b31f648f 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -894,12 +894,35 @@ static const uint8_t *mipi_dump_gpio(const uint8_t *data)
return data;
}
+static const uint8_t *mipi_dump_i2c(const uint8_t *data)
+{
+ uint8_t flags, index, bus, offset, len, i;
+ uint16_t address;
+
+ flags = *data++;
+ index = *data++;
+ bus = *data++;
+ address = *((uint16_t *) data);
+ data += 2;
+ offset = *data++;
+ len = *data++;
+
+ printf("\t\tSend I2C: Flags %02x, Index %02x, Bus %02x, Address %04x, Offset %02x, Length %u, Data",
+ flags, index, bus, address, offset, len);
+ for (i = 0; i < len; i++)
+ printf(" %02x", *data++);
+ printf("\n");
+
+ return data;
+}
+
typedef const uint8_t * (*fn_mipi_elem_dump)(const uint8_t *data);
static const fn_mipi_elem_dump dump_elem[] = {
[MIPI_SEQ_ELEM_SEND_PKT] = mipi_dump_send_packet,
[MIPI_SEQ_ELEM_DELAY] = mipi_dump_delay,
[MIPI_SEQ_ELEM_GPIO] = mipi_dump_gpio,
+ [MIPI_SEQ_ELEM_I2C] = mipi_dump_i2c,
};
static const char * const seq_name[] = {