mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
mmc: Fix regression in 8a8166e5bc breaking Stratix 10 boot
The refactoring in8a8166e5bcintroduced a functional change that breaks booting on the Stratix 10, hanging when it should be attaching da0. Previously OF_getencprop was called with a pointer to host->f_max, so if it wasn't present then the existing value was left untouched, but after that commit it will instead clobber the value with 0. The dwmmc driver, as used on the Stratix 10, sets a default value before calling mmc_fdt_parse and so was broken by this functional change. It appears that aw_mmc also does the same thing, so was presumably also broken on some boards. Fixes:8a8166e5bc("mmc: switch mmc_helper to device_ api") Reviewed by: manu, mw Differential Revision: https://reviews.freebsd.org/D32209
This commit is contained in:
parent
c39eefe715
commit
4a331971d2
1 changed files with 3 additions and 3 deletions
|
|
@ -105,9 +105,9 @@ mmc_parse(device_t dev, struct mmc_helper *helper, struct mmc_host *host)
|
|||
* if it's not present based on the clock that the mmc controller
|
||||
* operates on
|
||||
*/
|
||||
max_freq = 0;
|
||||
device_get_property(dev, "max-frequency", &max_freq, sizeof(uint64_t));
|
||||
host->f_max = max_freq;
|
||||
if (device_get_property(dev, "max-frequency", &max_freq,
|
||||
sizeof(uint64_t)) > 0)
|
||||
host->f_max = max_freq;
|
||||
|
||||
if (device_has_property(dev, "broken-cd"))
|
||||
helper->props |= MMC_PROP_BROKEN_CD;
|
||||
|
|
|
|||
Loading…
Reference in a new issue