Fix a bug in sifive_spi.c. Add hardware IDs for ISSI IS25WP256D flash
memory to mx25l.c. Include mx25l in GENERIC.
Details
- Reviewers
jrtc27 mhorne philip - Group Reviewers
riscv - Commits
- rG01ecff28ad50: mx25l: Add support for Integrated Silicon Solution is25wp256
rGc108f304472e: sifive_spi: Add missing case for SPIBUS_MODE_NONE
rG416ac155bb75: mx25l: Add support for Integrated Silicon Solution is25wp256
rGf5d78bea1f69: sifive_spi: Add missing case for SPIBUS_MODE_NONE
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 41106 Build 37995: arc lint + arc unit
Event Timeline
sys/riscv/conf/GENERIC | ||
---|---|---|
156 ↗ | (On Diff #93762) | I'm thinking maybe this should not be in GENERIC and we can use a module. |
sys/dev/flash/mx25l.c | ||
---|---|---|
157 | Maybe belongs in a separate commit? Not overly fussed though. | |
sys/riscv/conf/GENERIC | ||
156 ↗ | (On Diff #93762) | Yeah, and with proper PNP info for mx25l you could even autoload it, though it might be better to *not* do that and force people to load it when they want to use it, safer against people accidentally trashing their flash... definitely doesn't need to be in GENERIC though. |
sys/riscv/sifive/sifive_spi.c | ||
234 | Ah is this missing case why kldload mx25l was giving 0xff for everything? I tried it and put it on the backburner behind getting the existing patches upstreamed when I saw that, didn't dig any further. | |
235 | Return EINVAL? |
sys/riscv/conf/GENERIC | ||
---|---|---|
156 ↗ | (On Diff #93762) | I'm not sure why it doesn't autoload but I'm happy to just manually load it or put a line loader.conf when I need it. |
sys/riscv/sifive/sifive_spi.c | ||
234 | Yes. I was getting ff ffff for the device ID. It's dumb luck that I figured it out. I printf'ed everything and the uninitialized value of sckmode happened to be 2 which is a valid value for the mode register. Only later did I notice that mode was 0. |
- Address revision feedback.
EDIT: Backed out mx25l from GENERIC kernel. Return EINVAL for invalid values of mode.
Please elaborate on "Fix a bug in sifive_spi.c." when committing, and please mark for MFC (I have yet to do the big batch of MFCs for the other commits to stable/13 but will get round to it soon).
How about "Add missing case for SPIBUS_MODE_NONE to sifive_spi.c" and "Add support for IS25WP256D flash memory to mx25l.c" in separate commits if you wish? I am not a committer so I can't do it. Thanks.