git: 6bc8fe8a9f71 - main - arm: allwinner: Add mmc_pwrseq support
Emmanuel Vadot
manu at FreeBSD.org
Mon Jun 14 18:47:55 UTC 2021
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=6bc8fe8a9f711923253115d2a23b81370ef3e33a
commit 6bc8fe8a9f711923253115d2a23b81370ef3e33a
Author: Emmanuel Vadot <manu at FreeBSD.org>
AuthorDate: 2021-05-26 11:13:33 +0000
Commit: Emmanuel Vadot <manu at FreeBSD.org>
CommitDate: 2021-06-14 18:47:37 +0000
arm: allwinner: Add mmc_pwrseq support
If a pwrseq is found, set power accordingly.
Sponsored by: Diablotin Systems
---
sys/arm/allwinner/aw_mmc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c
index 0b3f19aea55f..9f215399e62b 100644
--- a/sys/arm/allwinner/aw_mmc.c
+++ b/sys/arm/allwinner/aw_mmc.c
@@ -71,6 +71,8 @@ __FBSDID("$FreeBSD$");
#include "mmc_sim_if.h"
#endif
+#include "mmc_pwrseq_if.h"
+
#define AW_MMC_MEMRES 0
#define AW_MMC_IRQRES 1
#define AW_MMC_RESSZ 2
@@ -1323,6 +1325,9 @@ aw_mmc_update_ios(device_t bus, device_t child)
regulator_disable(sc->mmc_helper.vqmmc_supply);
}
+ if (sc->mmc_helper.mmc_pwrseq)
+ MMC_PWRSEQ_SET_POWER(sc->mmc_helper.mmc_pwrseq, false);
+
aw_mmc_reset(sc);
break;
case power_up:
@@ -1339,6 +1344,9 @@ aw_mmc_update_ios(device_t bus, device_t child)
if (rv == 0 && reg_status != REGULATOR_STATUS_ENABLED)
regulator_enable(sc->mmc_helper.vqmmc_supply);
}
+
+ if (sc->mmc_helper.mmc_pwrseq)
+ MMC_PWRSEQ_SET_POWER(sc->mmc_helper.mmc_pwrseq, true);
aw_mmc_init(sc);
break;
};
More information about the dev-commits-src-main
mailing list