]> Git Repo - linux.git/commit
i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes
authorJarkko Nikula <[email protected]>
Thu, 21 Sep 2023 05:56:55 +0000 (08:56 +0300)
committerAlexandre Belloni <[email protected]>
Mon, 25 Sep 2023 21:35:14 +0000 (23:35 +0200)
commit0676bfebf5766f0a60549f74ba597115028fa39c
treebb953176353d2aaa3d889548475222bc57dc6457
parentf656f6bd22d7cd08b55c6495fcfaa391c2eb933f
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
drivers/i3c/master/mipi-i3c-hci/core.c
This page took 0.045126 seconds and 4 git commands to generate.