mmc:sdhci-bayhub:fix Qualcomm sd host 845 SD card compatibility issue
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi, Adrian&Ulf,
Can you give some comments for this patch?
Your suggestion is important for us.
We look forward to hearing from you.
-----邮件原件-----
发件人: Chevron Li (WH) <[email protected]>
发送时间: Wednesday, July 14, 2021 9:08 AM
收件人: [email protected]; [email protected]; [email protected]; [email protected]
抄送: Shaper Liu (WH) <[email protected]>; Chevron Li (WH) <[email protected]>; Xiaoguang Yu (WH) <[email protected]>; Shirley Her (SC) <[email protected]> 主题: [PATCH V1 1/1]mmc:sdhci-bayhub:fix Qualcomm sd host 845 SD card compatibility issue
Improve the signal integrity for long SD bus trace by using 845+BH201 SD host redriver chip
---
change in V1:
1. copy Qualcomm driver base from sdhci-msm.c to sdhci-bayhub.c
2. implement the BH201 chip initialization function at sdhci-bayhub.c
3. implement the BH201 chip power control function at sdhci-bayhub.c
4. implement the BH201 chip tuning function at sdhci-bayhub.c
5. re-implement mmc_rescan to match BH201 mode switch flow at sdhci-bayhub.c
---
--- .../devicetree/bindings/mmc/sdhci-msm.txt | 1 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-bayhub.c | 6563 +++++++++++++++++ 3 files changed, 6565 insertions(+) create mode 100644 drivers/mmc/host/sdhci-bayhub.c
Documentation/devicetree/bindings/mmc/sdhci-msm.txt +1 -0
@@ -20,6 +20,7 @@ Required properties: "qcom,qcs404-sdhci", "qcom,sdhci-msm-v5" "qcom,sc7180-sdhci", "qcom,sdhci-msm-v5"; "qcom,sdm845-sdhci", "qcom,sdhci-msm-v5" + "qcom,sdm845-bayhub-sdhci", "qcom,sdhci-msm-bayhub-v5" "qcom,sdx55-sdhci", "qcom,sdhci-msm-v5"; "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5" NOTE that some old device tree files may be floating around that only
drivers/mmc/host/Makefile +1 -0
@@ -93,6 +93,7 @@ obj-$(CONFIG_MMC_SDHCI_OF_SPARX5) += sdhci-of-sparx5.o obj-$(CONFIG_MMC_SDHCI_BCM_KONA) += sdhci-bcm-kona.o obj-$(CONFIG_MMC_SDHCI_IPROC) += sdhci-iproc.o obj-$(CONFIG_MMC_SDHCI_MSM) += sdhci-msm.o +obj-$(CONFIG_MMC_SDHCI_MSM) += sdhci-bayhub.o obj-$(CONFIG_MMC_SDHCI_ST) += sdhci-st.o obj-$(CONFIG_MMC_SDHCI_MICROCHIP_PIC32) += sdhci-pic32.o obj-$(CONFIG_MMC_SDHCI_BRCMSTB) += sdhci-brcmstb.o
drivers/mmc/host/sdhci-bayhub.c new file +6563 -0
2,986 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
Adrian Hunter
maintainerQuoted 53 lines · chevron
Improve the signal integrity for long SD bus trace by using 845+BH201 SD host redriver chip
Signed-off-by chevron.li <[email protected]>---
change in V1:
1. copy Qualcomm driver base fromsdhci-msm.ctosdhci-bayhub.c
2. implement the BH201 chip initialization function atsdhci-bayhub.c
3. implement the BH201 chip power control function atsdhci-bayhub.c
4. implement the BH201 chip tuning function atsdhci-bayhub.c
5. re-implementmmc_rescanto match BH201 mode switch flow atsdhci-bayhub.c
------ .../devicetree/bindings/mmc/sdhci-msm.txt | 1 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-bayhub.c | 6563 +++++++++++++++++ 3 files changed, 6565 insertions(+) create mode 100644 drivers/mmc/host/sdhci-bayhub.cDocumentation/devicetree/bindings/mmc/sdhci-msm.txt +1
-0@@ -20,6 +20,7 @@ Required properties: "qcom,qcs404-sdhci", "qcom,sdhci-msm-v5" "qcom,sc7180-sdhci", "qcom,sdhci-msm-v5"; "qcom,sdm845-sdhci", "qcom,sdhci-msm-v5" + "qcom,sdm845-bayhub-sdhci", "qcom,sdhci-msm-bayhub-v5" "qcom,sdx55-sdhci", "qcom,sdhci-msm-v5"; "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5" NOTE that some old device tree files may be floating around that onlydrivers/mmc/host/Makefile +1
-0@@ -93,6 +93,7 @@ obj-$(CONFIG_MMC_SDHCI_OF_SPARX5) += sdhci-of-sparx5.o obj-$(CONFIG_MMC_SDHCI_BCM_KONA) += sdhci-bcm-kona.o obj-$(CONFIG_MMC_SDHCI_IPROC) += sdhci-iproc.o obj-$(CONFIG_MMC_SDHCI_MSM) += sdhci-msm.o +obj-$(CONFIG_MMC_SDHCI_MSM) += sdhci-bayhub.o obj-$(CONFIG_MMC_SDHCI_ST) += sdhci-st.o obj-$(CONFIG_MMC_SDHCI_MICROCHIP_PIC32) += sdhci-pic32.o obj-$(CONFIG_MMC_SDHCI_BRCMSTB) += sdhci-brcmstb.odrivers/mmc/host/sdhci-bayhub.c new file +5
-0@@ -0,0 +1,6563 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* +* Bayhub Technologies, Inc. BH201 SDHCI bridge IC for +* VENDOR SDHCI platform driver source file +*
drivers/mmc/host/sdhci-bayhub.c line 15
Quoted 10 lines
drivers/mmc/host/sdhci-bayhub.c new file +10
-0+* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 and +* only version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details.
The license information is not needed when an SPDX license identifier is used
Quoted 21 lines
drivers/mmc/host/sdhci-bayhub.c new file +21
-0+*/ + +#include <linux/module.h> +#include <linux/of_device.h> +#include <linux/delay.h> +#include <linux/mmc/mmc.h> +#include <linux/pm_runtime.h> +#include <linux/pm_opp.h> +#include <linux/slab.h> +#include <linux/iopoll.h> +#include <linux/regulator/consumer.h> +#include <linux/interconnect.h> +#include <linux/pinctrl/consumer.h> +#include <linux/mmc/host.h> +#include <linux/mmc/card.h> +#include <linux/mmc/sd.h> +#include <linux/io.h> +#include <linux/of_gpio.h> + +#include "sdhci-pltfm.h" +#include "cqhci.h"
drivers/mmc/host/sdhci-bayhub.c line 46
Quoted 10 lines
drivers/mmc/host/sdhci-bayhub.c new file +10
-0+#include "../core/core.h" +#include "../core/sd_ops.h" +#include "../core/sdio_ops.h" +#include "../core/mmc_ops.h" +#include "../core/sd.h" +#include "../core/bus.h" +#include "../core/host.h" +#include "../core/card.h" +#include "../core/pwrseq.h" +
The core headers are not meant to be accessed by host drivers.
You will need to discuss what you are trying to do with Ulf.
But possibly you could consider starting with a simpler driver that doesn't have the features that need those headers.