hw/arm/aspeed: Invert sdhci write protected pin for AST2600 EVB
authorJamin Lin <jamin_lin@aspeedtech.com>
Thu, 14 Nov 2024 09:48:39 +0000 (17:48 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 27 Jan 2025 08:38:15 +0000 (09:38 +0100)
commitbf8a471a38774800d77f58949bcaea4ca26390a7
treeaf7c328cc4000bb8e5f05c08d7478d5f3fc81c32
parent134d9e5c0c4ae2fe64817a185730ec8b7835d573
hw/arm/aspeed: Invert sdhci write protected pin for AST2600 EVB

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).

According to the design of AST2600 EVB, the Write Protected pin is active
high by default. To support it, introduces a new "sdhci_wp_inverted"
property in ASPEED MACHINE State and set it true for AST2600 EVB
and set "wp_inverted" property true of sdhci-generic model.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Acked-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20241114094839.4128404-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/arm/aspeed.c
include/hw/arm/aspeed.h