Jump to content

[Armbian build PR] - Fix reboot on odroid C4 when using UHS microSD cards


RSS Bot

Recommended Posts

Description

This fixes reboot on Odroid C4 boards which boot from UHS microSD cards. The issue has been discussed before here: https://forum.armbian.com/topic/19340-odroid-c4-will-not-reboot-after-any-sort-of-kernel-update-have-tried-running-nand-sata-install/

A previous pull request removed a version of this patch here: https://github.com/armbian/build/pull/3154/files#diff-8530e3af79cd8a35329d7d1a44b2a8006ad0cd70deefb0341a9933233673a9b6

The previous version of the patch was broken by upstream changes in the kernel, and this commit contains the minimal changes needed to fix it. Standard PSCI reset functions are now called in mainline, so the patch has been updated to reflect that. The patch now registers a reboot handler which gets called before the standard PSCI functions and toggles some GPIO lines to reset the SD card. If the card is a UHS card, then this puts it back into a state which the bootloader can deal with, and the board can reboot cleanly.

This patch might be applicable to other boards, but I can't test them. They can be tested by adding some code to the device tree, to add in the odroid,reboot driver.

I'd like to work on getting this change added to the kernel. but I'll try to make it more general, so it might not be a board-specific patch by the time it gets that far. When that eventually happens, this patch can be removed again.

How Has This Been Tested?

This has been tested by booting the board with a UHS-I SD card using the kernels compiled for odroidc4 targeting both BRANCH=current and BRANCH=edge. Both versions of the patched kernel allow a clean reboot.

Checklist:

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

View the full article

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines