mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
sd: sdhci: Implement basic vendor specific register support
The Linux kernel's IMX code now uses vendor specific commands. This results in endless warnings when booting the Linux kernel. sdhci-esdhc-imx 2194000.usdhc: esdhc_wait_for_card_clock_gate_off: card clock still not gate off in 100us!. Implement support for the vendor specific command implemented in IMX hardware to be able to avoid this warning. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Message-id: 20200603145258.195920-2-linux@roeck-us.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
8095508a9d
commit
3b2d81766f
3 changed files with 27 additions and 1 deletions
|
|
@ -1569,11 +1569,13 @@ static uint64_t usdhc_read(void *opaque, hwaddr offset, unsigned size)
|
|||
}
|
||||
break;
|
||||
|
||||
case ESDHC_VENDOR_SPEC:
|
||||
ret = s->vendor_spec;
|
||||
break;
|
||||
case ESDHC_DLL_CTRL:
|
||||
case ESDHC_TUNE_CTRL_STATUS:
|
||||
case ESDHC_UNDOCUMENTED_REG27:
|
||||
case ESDHC_TUNING_CTRL:
|
||||
case ESDHC_VENDOR_SPEC:
|
||||
case ESDHC_MIX_CTRL:
|
||||
case ESDHC_WTMK_LVL:
|
||||
ret = 0;
|
||||
|
|
@ -1596,7 +1598,21 @@ usdhc_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
|
|||
case ESDHC_UNDOCUMENTED_REG27:
|
||||
case ESDHC_TUNING_CTRL:
|
||||
case ESDHC_WTMK_LVL:
|
||||
break;
|
||||
|
||||
case ESDHC_VENDOR_SPEC:
|
||||
s->vendor_spec = value;
|
||||
switch (s->vendor) {
|
||||
case SDHCI_VENDOR_IMX:
|
||||
if (value & ESDHC_IMX_FRC_SDCLK_ON) {
|
||||
s->prnsts &= ~SDHC_IMX_CLOCK_GATE_OFF;
|
||||
} else {
|
||||
s->prnsts |= SDHC_IMX_CLOCK_GATE_OFF;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case SDHC_HOSTCTL:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue