2022-07-14 09:47:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 0/3] dt-bindings: mmc: / ARM: qcom: add MSM8998 and cleanup driver of_device_id

Hi,

Rationale/background:
https://lore.kernel.org/linux-devicetree/CAD=FV=WGxQF4vPuRi7kWKoqTpe0RFsgH+J82C=sQbmncK_AFpw@mail.gmail.com/

Changes since v2
================
1. Add Rb tags.
2. Add a comment to SDHCI driver to hopefully prevent re-adding of compatibles
(suggested by Doug).

Changes since v1
================
1. Add Rb tags.
2. Rework driver patch (now last in the series), after talk with Doug.

Best regards,
Krzysztof

Cc: Konrad Dybcio <[email protected]>
Cc: Bhupesh Sharma <[email protected]>
Cc: Doug Anderson <[email protected]>

Krzysztof Kozlowski (3):
dt-bindings: mmc: sdhci-msm: add MSM8998
arm64: dts: qcom: msm8998: add MSM8998 SDCC specific compatible
mmc: sdhci-msm: drop redundant of_device_id entries

.../devicetree/bindings/mmc/sdhci-msm.yaml | 1 +
arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +-
drivers/mmc/host/sdhci-msm.c | 29 +++----------------
3 files changed, 6 insertions(+), 26 deletions(-)

--
2.34.1


2022-07-14 09:49:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH v3 3/3] mmc: sdhci-msm: drop redundant of_device_id entries

This reverts three commits:
1. Revert "mmc: sdhci-msm: Add compatible string check for sdx65"
This reverts commit 953706844f0f2fd4dc6984cc010fe6cf51c041f2.

2. Revert "mmc: sdhci-msm: Add compatible string check for sm8150"
This reverts commit 5acd6adb65802cc6f9986be3750179a820580d37.

3. Revert "mmc: sdhci-msm: Add SoC specific compatibles"
This reverts commit 466614a9765c6fb67e1464d0a3f1261db903834b.

The oldest commit 466614a9765c ("mmc: sdhci-msm: Add SoC specific
compatibles") did not specify what benefits such multiple compatibles
bring, therefore assume there is none. On the other hand such approach
brings a lot of churn to driver maintenance by expecting commit for
every new compatible, even though it is already covered by the fallback.

There is really no sense in duplicating of_device_id for each
variant, which is already covered by generic compatible fallback
qcom,sdhci-msm-v4 or qcom,sdhci-msm-v5.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>

---

Cc: Konrad Dybcio <[email protected]>
Cc: Bhupesh Sharma <[email protected]>
Cc: Doug Anderson <[email protected]>
---
drivers/mmc/host/sdhci-msm.c | 29 ++++-------------------------
1 file changed, 4 insertions(+), 25 deletions(-)

diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index e395411fb6fd..dc2991422a87 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2435,33 +2435,12 @@ static const struct sdhci_msm_variant_info sdm845_sdhci_var = {
};

static const struct of_device_id sdhci_msm_dt_match[] = {
- /* Following two entries are deprecated (kept only for backward compatibility) */
- {.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
- /* Add entries for sdcc versions less than 5.0 here */
- {.compatible = "qcom,apq8084-sdhci", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,msm8226-sdhci", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,msm8916-sdhci", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,msm8953-sdhci", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,msm8974-sdhci", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,msm8992-sdhci", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,msm8994-sdhci", .data = &sdhci_msm_mci_var},
- {.compatible = "qcom,msm8996-sdhci", .data = &sdhci_msm_mci_var},
/*
- * Add entries for sdcc version 5.0 here. For SDCC version 5.0.0,
- * MCI registers are removed from SDCC interface and some registers
- * are moved to HC.
+ * Do not add new variants to the driver which are compatible with
+ * generic ones, unless they need customization.
*/
- {.compatible = "qcom,qcs404-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sdx55-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sdx65-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sdm630-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sm6125-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sm6350-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sm8150-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sm8250-sdhci", .data = &sdhci_msm_v5_var},
- {.compatible = "qcom,sc7280-sdhci", .data = &sdhci_msm_v5_var},
- /* Add entries where soc specific handling is required, here */
+ {.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
+ {.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
{.compatible = "qcom,sdm845-sdhci", .data = &sdm845_sdhci_var},
{.compatible = "qcom,sc7180-sdhci", .data = &sdm845_sdhci_var},
{},
--
2.34.1

2022-07-18 11:55:59

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] dt-bindings: mmc: / ARM: qcom: add MSM8998 and cleanup driver of_device_id

On Thu, 14 Jul 2022 at 11:10, Krzysztof Kozlowski
<[email protected]> wrote:
>
> Hi,
>
> Rationale/background:
> https://lore.kernel.org/linux-devicetree/CAD=FV=WGxQF4vPuRi7kWKoqTpe0RFsgH+J82C=sQbmncK_AFpw@mail.gmail.com/
>
> Changes since v2
> ================
> 1. Add Rb tags.
> 2. Add a comment to SDHCI driver to hopefully prevent re-adding of compatibles
> (suggested by Doug).
>
> Changes since v1
> ================
> 1. Add Rb tags.
> 2. Rework driver patch (now last in the series), after talk with Doug.
>
> Best regards,
> Krzysztof
>
> Cc: Konrad Dybcio <[email protected]>
> Cc: Bhupesh Sharma <[email protected]>
> Cc: Doug Anderson <[email protected]>
>
> Krzysztof Kozlowski (3):
> dt-bindings: mmc: sdhci-msm: add MSM8998
> arm64: dts: qcom: msm8998: add MSM8998 SDCC specific compatible
> mmc: sdhci-msm: drop redundant of_device_id entries
>
> .../devicetree/bindings/mmc/sdhci-msm.yaml | 1 +
> arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +-
> drivers/mmc/host/sdhci-msm.c | 29 +++----------------
> 3 files changed, 6 insertions(+), 26 deletions(-)
>

Patch 1 and patch3 applied for next, thanks!

Kind regards
Uffe

2022-08-30 00:19:20

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v3 0/3] dt-bindings: mmc: / ARM: qcom: add MSM8998 and cleanup driver of_device_id

On Thu, 14 Jul 2022 11:10:39 +0200, Krzysztof Kozlowski wrote:
> Rationale/background:
> https://lore.kernel.org/linux-devicetree/CAD=FV=WGxQF4vPuRi7kWKoqTpe0RFsgH+J82C=sQbmncK_AFpw@mail.gmail.com/
>
> Changes since v2
> ================
> 1. Add Rb tags.
> 2. Add a comment to SDHCI driver to hopefully prevent re-adding of compatibles
> (suggested by Doug).
>
> [...]

Applied, thanks!

[2/3] arm64: dts: qcom: msm8998: add MSM8998 SDCC specific compatible
commit: 18f581bfe29de7c3ad33b3f2b2bd515623417494

Best regards,
--
Bjorn Andersson <[email protected]>