linux/drivers/i3c/master
Jarkko Nikula 0676bfebf5 i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes
MIPI I3C HCI specification v1.1 describes the ENTRY_SIZE field for the
Device Address Table (DAT) and the Device Characteristics Table (DCT)
section offset registers (DAT_SECTION_OFFSET and DCT_SECTION_OFFSET).
That field is not documented in earlier version.

ENTRY_SIZE value 0 is meant to be backward compatible. For the DAT entry
size it is interpreted as 2 DWORDs (8-bytes) and for the DCT entry size
as 4 DWORDs (16-bytes). Values 1-15 are reserved for future use.

New version I believe fixes also the TABLE_SIZE field description.
Before it was defined in DWORDs which I believe is incorrect since the
DAT/DCT table entry structures, and sizes, are described having
8-bytes/16-bytes entries.

This is more clear in the specification v1.1 which states the TABLE_SIZE
fields are interpreted as number of entries in the DAT/DCT tables. I
believe this same holds also in earlier version, at least it makes more
sense.

Fix code accordingly and let the DAT_entry_size and the DCT_entry_size
variables carry the size as bytes. Which is how it is already
interpreted in the dat_v1.c: hci_dat_v1_init().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20230921055704.1087277-4-jarkko.nikula@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-09-25 23:35:14 +02:00
..
mipi-i3c-hci i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes 2023-09-25 23:35:14 +02:00
ast2600-i3c-master.c i3c: Explicitly include correct DT includes 2023-07-27 23:23:41 +02:00
dw-i3c-master.c i3c: dw: Annotate struct dw_i3c_xfer with __counted_by 2023-09-25 23:32:33 +02:00
dw-i3c-master.h i3c: dw: Add a platform facility for IBI PEC workarounds 2023-04-28 08:20:07 +02:00
i3c-master-cdns.c i3c: master: cdns: Annotate struct cdns_i3c_xfer with __counted_by 2023-09-25 23:33:12 +02:00
Kconfig i3c: ast2600: Add AST2600 platform-specific driver 2023-04-28 08:19:01 +02:00
Makefile i3c: ast2600: Add AST2600 platform-specific driver 2023-04-28 08:19:01 +02:00
svc-i3c-master.c i3c: svc: Annotate struct svc_i3c_xfer with __counted_by 2023-09-25 23:34:05 +02:00