New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenTitan: Add support for detecting the USB device #2080
Conversation
a38a703
to
5bb035a
Compare
Ping! |
.set(1 << endpoint | self.registers.stall.get()); | ||
} | ||
|
||
fn copy_slice_out_to_hw(&self, ep: usize, buf_id: usize, size: usize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use enumerations rather than usize, for ep and buf_id, to allow compile-time rather than runtime checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would required converting from the uszie from the HIL to a enum, what advantage does that give us? It is then written to the hardware as just a number.
); | ||
} | ||
|
||
fn copy_from_hw(&self, ep: usize, buf_id: usize, size: usize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as copy_slice_out_to_hw.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Commit the freed buffers after they are freed. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
5bb035a
to
fa5161e
Compare
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
217c567
to
5bfcadd
Compare
Ping! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion with Alistair, I agree that the issue is with the HIL passing numbers and that this PR should not block on that.
bors r+ |
1 similar comment
bors r+ |
Already running a review |
Pull Request Overview
This allows me to see the OpenTitan USB device when running Tock.
There still seems to be some timing issues and the device doesn't always appear, but at least this is better then the current nothing.
Testing Strategy
Plugging in the OpenTitan FPGA.
TODO or Help Wanted
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.