[Bootrom] Enable SPI 4 bytes addressing#441
Merged
engdoreis merged 5 commits intolowRISC:mainfrom Apr 16, 2026
Merged
Conversation
c7252a6 to
4e6f943
Compare
AlexJones0
approved these changes
Apr 15, 2026
| void spi_device_cmd_info_4b_enable_set(spi_device_t spi_device, uint8_t opcode) | ||
| { | ||
| uint32_t reg = 0; | ||
| reg = reg | (opcode << SPI_DEVICE_CMD_OPCODE); |
There was a problem hiding this comment.
Really minor nit (not necessary to fix in this PR). Subjectively I prefer reg |= (opcode << SPI_DEVICE_CMD_OPCODE); since it removes the needless duplication of reg but I see this is in many places in this file. Maybe we could change it in a different PR?
Collaborator
Author
There was a problem hiding this comment.
I agree, but I don't want to change the spi_device.c because it will replaced by the soon.
| // Configure commands | ||
| spi_device_cmd_info_set(spi_device, SPI_DEVICE_CMD_INFO_0_REG, SPI_DEVICE_OPCODE_READ_STATUS, | ||
| false, 0, false); | ||
| spi_device_cmd_info_set(spi_device, SPI_DEVICE_CMD_INFO_0_REG, SPI_DEVICE_OPCODE_READ_STATUS, 0, |
There was a problem hiding this comment.
Repeated a few different times - even for 0, I think we should use the constant name:
Suggested change
| spi_device_cmd_info_set(spi_device, SPI_DEVICE_CMD_INFO_0_REG, SPI_DEVICE_OPCODE_READ_STATUS, 0, | |
| spi_device_cmd_info_set(spi_device, SPI_DEVICE_CMD_INFO_0_REG, SPI_DEVICE_OPCODE_READ_STATUS, SPI_DEVICE_CMD_ADDR_MODE_ADDR_DISABLED, |
Collaborator
Author
There was a problem hiding this comment.
I agree, but I don't want to change the spi_device.c because it will replaced by the soon.
4e6f943 to
e7e86d7
Compare
This a requirement because there will be tests built for DRAM and SRAM.
The bootrom will use this to: - Check that there's a valid test loaded in memory before jumping. - Discover the address where it should jump to.
e7e86d7 to
7fe62cd
Compare
190ff9a to
80916f6
Compare
80916f6 to
534e5aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will support running tests in DRAM and SRAM.