Skip to content

Commit 7ccd40e

Browse files
jhnikulaalexandrebelloni
authored andcommitted
i3c: mipi-i3c-hci: Set number of SW enabled Ring Bundles earlier
Number of software enabled Ring Bundles must be set before using them. Otherwise Ring will not start and may be power-gated by the Host Controller. Signed-off-by: Jarkko Nikula <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 4e40642 commit 7ccd40e

File tree

1 file changed

+3
-2
lines changed
  • drivers/i3c/master/mipi-i3c-hci

1 file changed

+3
-2
lines changed

drivers/i3c/master/mipi-i3c-hci/dma.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ static int hci_dma_init(struct i3c_hci *hci)
229229
hci->io_data = rings;
230230
rings->total = nr_rings;
231231

232+
regval = FIELD_PREP(MAX_HEADER_COUNT, rings->total);
233+
rhs_reg_write(CONTROL, regval);
234+
232235
for (i = 0; i < rings->total; i++) {
233236
u32 offset = rhs_reg_read(RHn_OFFSET(i));
234237

@@ -329,8 +332,6 @@ static int hci_dma_init(struct i3c_hci *hci)
329332
RING_CTRL_RUN_STOP);
330333
}
331334

332-
regval = FIELD_PREP(MAX_HEADER_COUNT, rings->total);
333-
rhs_reg_write(CONTROL, regval);
334335
return 0;
335336

336337
err_out:

0 commit comments

Comments
 (0)