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

risc-v/mpfs: emmcsd: enforce HS DDR mode #197

Merged
merged 1 commit into from
Dec 15, 2023
Merged

risc-v/mpfs: emmcsd: enforce HS DDR mode #197

merged 1 commit into from
Dec 15, 2023

Conversation

eenurkka
Copy link

Previously, address 0x03b70000u was written with shift bits that only changed the bit width, not the mode. HS mode is changed via 0x03B90100, which is required, according to Jedec specs, for DDR mode. HS mode was not applied before. Enforce DDR mode (50 MHz) for now.

The real boost, however, comes from removing the DMA limitation at 0x08xxxxxx address space, which now seems unnecessary.

Summary

This boosts the emmc write speed to approximately 3x, near 5M / sec. The greatest boost is from removing the DMA limitation, which for some reason, just works with DMA.

Impact

Testing

Only saluki-v2

@eenurkka eenurkka requested review from pussuw and jlaitine December 15, 2023 10:55

mpfs_setclkrate(priv, clckr);

/* REVISIT: This should really be a separate configuration procedure */
Copy link

Choose a reason for hiding this comment

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

THe comment is now misplaced. The comment is supposed to indicate that the 8-bit mode implementation needs
revisiting, I think that mode should be selected by the upper level driver?

Copy link
Author

@eenurkka eenurkka Dec 15, 2023

Choose a reason for hiding this comment

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

Yes, but not sure there's support, it would need to be added in emmcsd.c file. Eg. would need to change that file.

But even if proper support was in emmcsd.c; reading out the CSD infos would probably put the clock too high for Saluki-v2 devices at least, if the limiting factor was due to the muxers or something - not the info at the mmc card itself.

Copy link

Choose a reason for hiding this comment

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

Yes I know there is no upper level driver support, this is why the 8-bit mode is kind of hacked here

Previously, address 0x03b70000u was written with shift bits
that only changed the bit width, not the mode. HS mode is
changed via 0x03B90100, which is required, according to Jedec
specs, for DDR mode. HS mode was not applied before. Enforce
DDR mode (50 MHz) for now.

The real boost, however, comes from removing the DMA limitation
at 0x08xxxxxx address space, which now seems unnecessary.

Signed-off-by: Eero Nurkkala <[email protected]>
Copy link

@pussuw pussuw left a comment

Choose a reason for hiding this comment

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

LGTM

@eenurkka eenurkka merged commit 71764e1 into master Dec 15, 2023
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants