aw_mmc: Only change the clock if it has really changed
This also seems to fix problem when booting Pine64 from the mmc. Tested On: Pine64 Tested On: Pine64-LTS
This commit is contained in:
parent
8bf6ff2226
commit
0f7a6420fe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329463
@ -117,6 +117,7 @@ struct aw_mmc_softc {
|
||||
int32_t aw_vdd;
|
||||
regulator_t aw_reg_vmmc;
|
||||
regulator_t aw_reg_vqmmc;
|
||||
unsigned int aw_clock;
|
||||
|
||||
/* Fields required for DMA access. */
|
||||
bus_addr_t aw_dma_desc_phys;
|
||||
@ -939,8 +940,8 @@ aw_mmc_update_ios(device_t bus, device_t child)
|
||||
reg &= ~AW_MMC_CTRL_DDR_MOD_SEL;
|
||||
AW_MMC_WRITE_4(sc, AW_MMC_GCTL, reg);
|
||||
|
||||
if (ios->clock) {
|
||||
clock = ios->clock;
|
||||
if (ios->clock && ios->clock != sc->aw_clock) {
|
||||
sc->aw_clock = clock = ios->clock;
|
||||
|
||||
/* Disable clock */
|
||||
error = aw_mmc_update_clock(sc, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user