]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/sd/sdhci: Introduce a new Write Protected pin inverted property
authorJamin Lin <jamin_lin@aspeedtech.com>
Thu, 14 Nov 2024 09:48:38 +0000 (17:48 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 27 Jan 2025 08:38:15 +0000 (09:38 +0100)
commit134d9e5c0c4ae2fe64817a185730ec8b7835d573
treedee7d5d95eee454fc5e697dcc1d058b48f901764
parent8a139ae719616d85d835528a35f41eb23bfa54c7
hw/sd/sdhci: Introduce a new Write Protected pin inverted property

The Write Protect pin of SDHCI model is default active low to match the SDHCI
spec. So, write enable the bit 19 should be 1 and write protected the bit 19
should be 0 at the Present State Register (0x24). However, some boards are
design Write Protected pin active high. In other words, write enable the bit 19
should be 0 and write protected the bit 19 should be 1 at the
Present State Register (0x24). To support it, introduces a new "wp-inverted"
property and set it false by default.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Acked-by: Cédric Le Goater <clg@redhat.com>
Acked-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20241114094839.4128404-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/sd/sdhci.c
include/hw/sd/sdhci.h