263b6a7cfb962dfff4242362c517cf2d1a4bd5e0
[openwrt/openwrt.git] /
1 From faa9140ce1086fe2fe86bb6008907d2b62436d6f Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 15 Apr 2025 08:37:05 +0100
4 Subject: [PATCH] fixup! mmc: sdhci-of-dwcmshc: define sdio timeout clocks
5
6 The usage of the .data field of the of_device_id array changed with the
7 move to kernel 6.11, but because it holds a void pointer there were
8 no warnings that the sdhci_dwcmshc_rp1_data was now the wrong type.
9
10 Convert sdhci_dwcmshc_rp1_data to a dwcmshc_pltfm_data to avoid a crash
11 when one of RP1's SDIO interfaces is enabled.
12
13 See: https://github.com/raspberrypi/linux/issues/6778
14
15 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
16 ---
17 drivers/mmc/host/sdhci-of-dwcmshc.c | 16 +++++++++-------
18 1 file changed, 9 insertions(+), 7 deletions(-)
19
20 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c
21 +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
22 @@ -1221,13 +1221,15 @@ static const struct dwcmshc_pltfm_data s
23 };
24 #endif
25
26 -static const struct sdhci_pltfm_data sdhci_dwcmshc_rp1_pdata = {
27 - .ops = &sdhci_dwcmshc_ops,
28 - .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
29 - SDHCI_QUIRK_BROKEN_CARD_DETECTION,
30 - .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
31 - SDHCI_QUIRK2_BROKEN_HS200 |
32 - SDHCI_QUIRK2_SPURIOUS_INT_RESP,
33 +static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rp1_pdata = {
34 + .pdata = {
35 + .ops = &sdhci_dwcmshc_ops,
36 + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
37 + SDHCI_QUIRK_BROKEN_CARD_DETECTION,
38 + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
39 + SDHCI_QUIRK2_BROKEN_HS200 |
40 + SDHCI_QUIRK2_SPURIOUS_INT_RESP,
41 + }
42 };
43
44 static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk35xx_pdata = {