Page MenuHomeFreeBSD

eswin reset driver
AcceptedPublic

Authored by br on Sat, Nov 30, 8:46 PM.

Details

Reviewers
mhorne
jrtc27
Summary

Add eswin reset driver

Test Plan

Works on SiFive Premier P550

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br requested review of this revision.Sat, Nov 30, 8:46 PM
sys/riscv/eswin/eswin_reset.c
170

Why not just use IDs from 0 through N? You can then do >> 5 to get the word number and & 31 to get the bit offset. That's really how the FDT should have represented it too, probably... logically it's just a big bit vector.

store both reg and bit in the hwreset *id

sys/riscv/eswin/eswin_reset.c
166

<< 5 but & 0xff is inconsistent and not what I said (which was & 31 ie 0x1f). Also is cells[1] the bit number or bit mask? Because it's being encoded as if it's the former, but used in the other functions as if it's the latter (no 1u << bit).

mhorne added inline comments.
sys/riscv/eswin/eswin_reset.c
50

Unused?

This revision is now accepted and ready to land.Mon, Dec 2, 9:55 PM