Skip to content
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

Merged
merged 16 commits into from Sep 10, 2020

Conversation

alistair23
Copy link
Contributor

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

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@bradjc bradjc added the WG-OpenTitan In the purview of the OpenTitan working group. label Aug 27, 2020
bradjc
bradjc previously approved these changes Aug 27, 2020
@alistair23
Copy link
Contributor Author

Ping!

.set(1 << endpoint | self.registers.stall.get());
}

fn copy_slice_out_to_hw(&self, ep: usize, buf_id: usize, size: usize) {
Copy link
Contributor

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.

Copy link
Contributor Author

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) {
Copy link
Contributor

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>
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>
@alistair23
Copy link
Contributor Author

Ping!

Copy link
Contributor

@phil-levis phil-levis left a 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.

@bradjc
Copy link
Contributor

bradjc commented Sep 10, 2020

bors r+

1 similar comment
@phil-levis
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 10, 2020

Already running a review

@bors bors bot merged commit add1e63 into tock:master Sep 10, 2020
@alistair23 alistair23 deleted the alistair/opentitan-usb branch September 10, 2020 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants