From: fred <fred.ai@bayhubtech.com>
To: adrian.hunter@intel.com, ulf.hansson@linaro.org,
linux-mmc@vger.kernel.org
Cc: shaper.liu@bayhubtech.com, chevron.li@bayhubtech.com,
xiaoguang.yu@bayhubtech.com, shirley.her@bayhubtech.com,
fred.ai@bayhubtech.com
Subject: [PATCH V1 2/2] mmc:sdhci-pci-o2micro:Change implementation of setting corresponding PLL frequency according to card mode
Date: Thu, 2 Dec 2021 19:57:59 -0800 [thread overview]
Message-ID: <20211203035759.2183-2-fred.ai@bayhubtech.com> (raw)
In-Reply-To: <20211203035759.2183-1-fred.ai@bayhubtech.com>
1.SDR104 card mode PLL frequency is 0x2c28.
2.SD2.0/SDR50 card mode PLL frequency is 0X2510.
Signed-off-by: fred<fred.ai@bayhubtech.com>
change in v1:
When SD2.0/SDR50 card mode,driver need to set PLL frequency 0x2510.
---
drivers/mmc/host/sdhci-pci-o2micro.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c
index bac3f0f8185b..32a8ef874efa 100644
--- a/drivers/mmc/host/sdhci-pci-o2micro.c
+++ b/drivers/mmc/host/sdhci-pci-o2micro.c
@@ -568,9 +568,17 @@ static void sdhci_pci_o2_set_clock(struct sdhci_host *host, unsigned int clock)
if ((host->timing == MMC_TIMING_UHS_SDR104) && (clock == 200000000)) {
pci_read_config_dword(chip->pdev, O2_SD_PLL_SETTING, &scratch_32);
+ /*SDR104 card mode PLL frequency value is 0x2c28*/
if ((scratch_32 & 0xFFFF0000) != 0x2c280000)
o2_pci_set_baseclk(chip, 0x2c280000);
+ } else {
+ pci_read_config_dword(chip->pdev, O2_SD_PLL_SETTING, &scratch_32);
+
+ /*SD2.0,SDR50 card mode PLL DMDN value is 0X2510*/
+ if ((scratch_32 & 0xFFFF0000) != 0x2510000)
+ o2_pci_set_baseclk(chip, 0x25100000);
+
/*If not SDR104 card mode, set 0x354 value 0*/
pci_read_config_dword(chip->pdev, O2_SD_OUTPUT_CLK_SOURCE_SWITCH, &scratch_32);
scratch_32 &= ~(1 << 16);
--
2.32.0
next prev parent reply other threads:[~2021-12-03 3:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 3:57 [PATCH V1 1/2] mmc:sdhci-pci-o2micro: Change implementation of tuning for SDR104 and HS200 mode fred
2021-12-03 3:57 ` fred [this message]
2021-12-03 9:26 ` [PATCH V1 2/2] mmc:sdhci-pci-o2micro:Change implementation of setting corresponding PLL frequency according to card mode Adrian Hunter
2021-12-03 9:18 ` [PATCH V1 1/2] mmc:sdhci-pci-o2micro: Change implementation of tuning for SDR104 and HS200 mode Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211203035759.2183-2-fred.ai@bayhubtech.com \
--to=fred.ai@bayhubtech.com \
--cc=adrian.hunter@intel.com \
--cc=chevron.li@bayhubtech.com \
--cc=linux-mmc@vger.kernel.org \
--cc=shaper.liu@bayhubtech.com \
--cc=shirley.her@bayhubtech.com \
--cc=ulf.hansson@linaro.org \
--cc=xiaoguang.yu@bayhubtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox