]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
sdhci: allow setting MMC capabilities before sdhci_init_slot
authorMarcin Wojtas <mw@FreeBSD.org>
Tue, 4 May 2021 22:57:50 +0000 (00:57 +0200)
committerMarcin Wojtas <mw@FreeBSD.org>
Wed, 2 Jun 2021 07:55:19 +0000 (09:55 +0200)
With this change the host controller drivers can set the MMC capabilities
(e.g. using mmc_fdt_parse() helper) before calling sdhci_init_slot().
This way the configuration dump (eg. in bootverbose) can include the
possible additional information.

Reviewed by: manu
Obtained from: Semihalf
Sponsored by: Marvell
Differential Revision: https://reviews.freebsd.org/D30561
MFC after: 2 weeks

sys/dev/sdhci/sdhci.c

index 68a3cf9ab4d38851d0eedefd26328516ee886bb4..22df56672c4b0fc3526655894506469c71f76704 100644 (file)
@@ -891,7 +891,8 @@ sdhci_init_slot(device_t dev, struct sdhci_slot *slot, int num)
                    "support voltages.\n");
        }
 
-       host_caps = MMC_CAP_4_BIT_DATA;
+       host_caps = slot->host.caps;
+       host_caps |= MMC_CAP_4_BIT_DATA;
        if (caps & SDHCI_CAN_DO_8BITBUS)
                host_caps |= MMC_CAP_8_BIT_DATA;
        if (caps & SDHCI_CAN_DO_HISPD)