From a4e0b5a4719b1c38c9dcd84715711d301c5d9366 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Mon, 1 Jul 2019 21:50:53 +0000 Subject: [PATCH] Since r349571 we need all the accessor to be present for set or get otherwise we panic. dwmmc don't handle VCCQ (voltage for the IO line of the SD/eMMC) or TIMING. Add the needed accessor in the {read,write}_ivar functions. Reviewed by: imp (previous version) --- sys/dev/mmc/host/dwmmc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/mmc/host/dwmmc.c b/sys/dev/mmc/host/dwmmc.c index d9e38071defe..29e6da8e58f0 100644 --- a/sys/dev/mmc/host/dwmmc.c +++ b/sys/dev/mmc/host/dwmmc.c @@ -1096,6 +1096,10 @@ dwmmc_read_ivar(device_t bus, device_t child, int which, uintptr_t *result) break; case MMCBR_IVAR_MAX_DATA: *(int *)result = sc->desc_count; + break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->host.ios.timing; + break; } return (0); } @@ -1134,6 +1138,14 @@ dwmmc_write_ivar(device_t bus, device_t child, int which, uintptr_t value) case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; break; + case MMCBR_IVAR_TIMING: + sc->host.ios.timing = value; + break; + + /* Not handled */ + case MMCBR_IVAR_VCCQ: + return (0); + break; /* These are read-only */ case MMCBR_IVAR_CAPS: case MMCBR_IVAR_HOST_OCR: