From f762edb5f688ee21aea672133cff8f3f5de40a72 Mon Sep 17 00:00:00 2001 From: jsg Date: Sat, 30 May 2015 03:20:54 +0000 Subject: [PATCH] Set the sdmmc(4) emmc highspeed flag if the capability register claims it is supported. --- sys/arch/armv7/imx/imxesdhc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/armv7/imx/imxesdhc.c b/sys/arch/armv7/imx/imxesdhc.c index 9408dbe9b5a..432bcd733b1 100644 --- a/sys/arch/armv7/imx/imxesdhc.c +++ b/sys/arch/armv7/imx/imxesdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxesdhc.c,v 1.11 2015/05/30 02:17:36 jsg Exp $ */ +/* $OpenBSD: imxesdhc.c,v 1.12 2015/05/30 03:20:54 jsg Exp $ */ /* * Copyright (c) 2009 Dale Rahn * Copyright (c) 2006 Uwe Stuehler @@ -127,6 +127,7 @@ #define SDHC_PROT_CTRL_DMASEL_SDMA_MASK (0x3 << 8) #define SDHC_HOST_CTRL_CAP_MBL_SHIFT 16 #define SDHC_HOST_CTRL_CAP_MBL_MASK 0x7 +#define SDHC_HOST_CTRL_CAP_HSS (1 << 21) #define SDHC_HOST_CTRL_CAP_VS33 (1 << 24) #define SDHC_HOST_CTRL_CAP_VS30 (1 << 25) #define SDHC_HOST_CTRL_CAP_VS18 (1 << 26) @@ -321,6 +322,8 @@ imxesdhc_attach(struct device *parent, struct device *self, void *args) saa.saa_busname = "sdmmc"; saa.sct = &imxesdhc_functions; saa.sch = sc; + if (caps & SDHC_HOST_CTRL_CAP_HSS) + saa.caps |= SMC_CAPS_MMC_HIGHSPEED; sc->sdmmc = config_found(&sc->sc_dev, &saa, NULL); if (sc->sdmmc == NULL) { -- 2.20.1