From 1570f8d8d87ef482279e9176fd952cf051bc4f8e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 7 Jun 2021 12:44:00 +0200 Subject: mci: sdhci: straighten capabilities register So far we read the host capabilites register as two 16bit registers SDHCI_CAPABILITIES (0x40) and SDHCI_CAPABILITIES_1 (0x42). Read them as one 32bit register like Linux does. While at it switch to the register defines Linux uses. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210607104411.23071-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- drivers/mci/atmel-sdhci-common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/mci/atmel-sdhci-common.c') diff --git a/drivers/mci/atmel-sdhci-common.c b/drivers/mci/atmel-sdhci-common.c index a83610c3d0..92013feb95 100644 --- a/drivers/mci/atmel-sdhci-common.c +++ b/drivers/mci/atmel-sdhci-common.c @@ -42,13 +42,13 @@ void at91_sdhci_host_capability(struct at91_sdhci *host, { u16 caps; - caps = sdhci_read16(&host->sdhci, SDHCI_CAPABILITIES_1); + caps = sdhci_read32(&host->sdhci, SDHCI_CAPABILITIES); - if (caps & SDHCI_HOSTCAP_VOLTAGE_330) + if (caps & SDHCI_CAN_VDD_330) *voltages |= MMC_VDD_32_33 | MMC_VDD_33_34; - if (caps & SDHCI_HOSTCAP_VOLTAGE_300) + if (caps & SDHCI_CAN_VDD_300) *voltages |= MMC_VDD_29_30 | MMC_VDD_30_31; - if (caps & SDHCI_HOSTCAP_VOLTAGE_180) + if (caps & SDHCI_CAN_VDD_180) *voltages |= MMC_VDD_165_195; } -- cgit v1.2.3