From e82ba2c5445c1995e1ceb4f17b04cae4b86fb623 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Thu, 16 Jan 2020 21:50:53 +0000 Subject: [PATCH] dwmmc: Remove max_hz from the softc We never use it so directly set the value to the mmc host structure. --- sys/dev/mmc/host/dwmmc.c | 5 ++--- sys/dev/mmc/host/dwmmc_var.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/mmc/host/dwmmc.c b/sys/dev/mmc/host/dwmmc.c index 0e5f5ebc131e..207fe6f609a5 100644 --- a/sys/dev/mmc/host/dwmmc.c +++ b/sys/dev/mmc/host/dwmmc.c @@ -484,8 +484,8 @@ parse_fdt(struct dwmmc_softc *sc) sc->host.caps |= MMC_CAP_8_BIT_DATA; /* max-frequency */ - if (OF_getencprop(node, "max-frequency", &sc->max_hz, sizeof(uint32_t)) <= 0) - sc->max_hz = 200000000; + if (OF_getencprop(node, "max-frequency", &sc->host.f_max, sizeof(uint32_t)) <= 0) + sc->host.f_max = 200000000; /* fifo-depth */ if ((len = OF_getproplen(node, "fifo-depth")) > 0) { @@ -726,7 +726,6 @@ dwmmc_attach(device_t dev) WRITE4(sc, SDMMC_CTRL, SDMMC_CTRL_INT_ENABLE); sc->host.f_min = 400000; - sc->host.f_max = sc->max_hz; sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; sc->host.caps |= MMC_CAP_HSPEED; sc->host.caps |= MMC_CAP_SIGNALING_330; diff --git a/sys/dev/mmc/host/dwmmc_var.h b/sys/dev/mmc/host/dwmmc_var.h index 9f8d827d7d90..cc0683657c5d 100644 --- a/sys/dev/mmc/host/dwmmc_var.h +++ b/sys/dev/mmc/host/dwmmc_var.h @@ -79,7 +79,6 @@ struct dwmmc_softc { uint32_t acd_rcvd; uint32_t cmd_done; uint64_t bus_hz; - uint32_t max_hz; uint32_t fifo_depth; uint32_t num_slots; uint32_t sdr_timing;