Page MenuHomeFreeBSD

D55097.diff
No OneTemporary

D55097.diff

diff --git a/sys/arm/allwinner/aw_mmc.h b/sys/arm/allwinner/aw_mmc.h
--- a/sys/arm/allwinner/aw_mmc.h
+++ b/sys/arm/allwinner/aw_mmc.h
@@ -169,6 +169,10 @@
/* AW_MMC_NTSR */
#define AW_MMC_NTSR_MODE_SELECT (1U << 31)
+/* AW_MMC_HWRST */
+#define AW_MMC_HWRST_ASSERT (0U << 0)
+#define AW_MMC_HWRST_DEASSERT (1U << 0)
+
/* IDMA CONTROLLER BUS MOD BIT FIELD */
#define AW_MMC_DMAC_IDMAC_SOFT_RST (1U << 0)
#define AW_MMC_DMAC_IDMAC_FIX_BURST (1U << 1)
diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c
--- a/sys/arm/allwinner/aw_mmc.c
+++ b/sys/arm/allwinner/aw_mmc.c
@@ -117,6 +117,7 @@
static const struct aw_mmc_conf h616_mmc_conf = {
.dma_xferlen = 0x10000,
+ .dma_desc_shift = 2,
.mask_data0 = true,
.can_calibrate = true,
.new_timing = true,
@@ -737,6 +738,13 @@
if (timeout == 0)
return (ETIMEDOUT);
+ /*
+ * Assert hardware reset and have the card move to the pre-idle state.
+ * This is needed on H616 to get the card into a functional state.
+ */
+ AW_MMC_WRITE_4(sc, AW_MMC_HWRST, AW_MMC_HWRST_ASSERT);
+ AW_MMC_WRITE_4(sc, AW_MMC_HWRST, AW_MMC_HWRST_DEASSERT);
+
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jul 5, 4:51 AM (11 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34692255
Default Alt Text
D55097.diff (1 KB)

Event Timeline