8000 chips/lowrisc/spi_host: refactor and rustify. by twilfredo · Pull Request #3329 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chips/lowrisc/spi_host: refactor and rustify. #3329

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

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

twilfredo
Copy link
Contributor
@twilfredo twilfredo commented Nov 16, 2022

Pull Request Overview

A few cleanup changes to avoid panics, reduced bloat by ~92B according to cargo bloat

Before:

 0.0%   0.5%     674B         lowrisc lowrisc::spi_host::SpiHost::handle_interrupt

After:

0.0%   0.4%     582B         lowrisc lowrisc::spi_host::SpiHost::handle_interrupt

Edit after a few more fixes:

0.0%   0.5%     632B         lowrisc lowrisc::spi_host::SpiHost::handle_interrupt

Could probably use a few more improvments...

Testing Strategy

Running SPI_HOST tests on QEMU and Verilator

TODO or Help Wanted

N/A

Documentation Updated

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

Formatting

  • Ran make prepush.

@github-actions github-actions bot added the WG-OpenTitan In the purview of the OpenTitan working group. label Nov 16, 2022
Copy link
Contributor
@hudson-ayers hudson-ayers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good but one important issue

@twilfredo
Copy link
Contributor Author
twilfredo commented Nov 21, 2022

Changes:

  • Fixed up multiple instances of calling upcalls in downcalls, now they occur in the handle_interrupt() fn only.
  • Added a new enum to detect spihost (specific to this driver) status.

Testing:

  • Running the SPI tests on Verilator

Edit:

  • Fixup clippy

A few cleanup changes to avoid panics, reduced bloat by ~90B according to
`cargo bloat`

Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Copy link
Contributor
@hudson-ayers hudson-ayers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor
bors bot commented Nov 22, 2022

@bors bors bot merged commit dc5a302 into tock:master Nov 22, 2022
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.

4 participants
0