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

rk322x: fix emmc/sdio clock selection #5027

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

paolosabatino
Copy link
Contributor

Description

emmc and sdio clock registers on rk322x were not exactly properly configured in kernel source code, causing the clock to be not precisely aligned. This was particularly evident during initial detection of emmc and sdio devices and also was clashing with a recent addition to mainline kernel (this commit)

This PR corrects the kernel code in current and edge branches (6.1 and 6.2) to fix the thing and possibly increase compatibility, going from this:

[    2.194866] mmc_host mmc2: card is non-removable.
[    2.206312] mmc_host mmc2: Bus speed (slot 0) = 2343750Hz (slot req 400000Hz, actual 390625HZ div = 3)
[    2.385689] mmc_host mmc2: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)
[    2.386934] mmc2: new DDR MMC card at address 0001
[    2.388824] mmcblk2: mmc2:0001 MMC08G 7.45 GiB 
[    2.395831] mmcblk2boot0: mmc2:0001 MMC08G 2.00 MiB 
[    2.400068] mmcblk2boot1: mmc2:0001 MMC08G 2.00 MiB 
[    2.403912] mmcblk2rpmb: mmc2:0001 MMC08G 256 KiB, chardev (241:0)

to this:

[    1.604887] mmc_host mmc2: card is non-removable.
[    1.615800] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    1.898259] mmc_host mmc2: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)
[    1.899593] mmc2: new DDR MMC card at address 0001
[    1.901394] mmcblk2: mmc2:0001 MMC08G 7.45 GiB 
[    1.908235] mmcblk2boot0: mmc2:0001 MMC08G 2.00 MiB 
[    1.912311] mmcblk2boot1: mmc2:0001 MMC08G 2.00 MiB 
[    1.915123] mmcblk2rpmb: mmc2:0001 MMC08G 256 KiB, chardev (240:0)

How Has This Been Tested?

  • Tested on a couple of live systems

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Apr 3, 2023
@paolosabatino paolosabatino merged commit 4d80872 into armbian:main Apr 3, 2023
@paolosabatino paolosabatino deleted the rk322x-fix-mmc-clocks branch April 4, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge Reviewed, tested and ready for merge
Development

Successfully merging this pull request may close these issues.

None yet

3 participants