Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1730761
| From | Chaotian Jing <chaotian.jing@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 10/12] mmc: mediatek: add latch-ck support |
| Date | 2017-09-12 11:20 +0200 |
| Message-ID | <uoPwl-7PF-9@gated-at.bofh.it> (permalink) |
| References | <uoPmF-7Mg-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
some platform(eg.mt2701) does not support "stop clk fix", in
this case, need set correct latch-ck to avoid crc error caused
by stop clock block-internally.
Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
---
drivers/mmc/host/mtk-sd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 522fd0a..3328d59 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -378,6 +378,7 @@ struct msdc_host {
u32 sclk; /* SD/MS bus clock frequency */
unsigned char timing;
bool vqmmc_enabled;
+ u32 latch_ck;
u32 hs400_ds_delay;
u32 hs200_cmd_int_delay; /* cmd internal delay for HS200/SDR104 */
u32 hs400_cmd_int_delay; /* cmd internal delay for HS400 */
@@ -1668,6 +1669,8 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
if (host->dev_comp->pad_tune0)
tune_reg = MSDC_PAD_TUNE0;
+ sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_INT_DAT_LATCH_CK_SEL,
+ host->latch_ck);
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
for (i = 0 ; i < PAD_DELAY_MAX; i++) {
@@ -1783,6 +1786,9 @@ static void msdc_hw_reset(struct mmc_host *mmc)
static void msdc_of_property_parse(struct platform_device *pdev,
struct msdc_host *host)
{
+ of_property_read_u32(pdev->dev.of_node, "mediatek,latch-ck",
+ &host->latch_ck);
+
of_property_read_u32(pdev->dev.of_node, "hs400-ds-delay",
&host->hs400_ds_delay);
--
1.8.1.1.dirty
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mmc: mediatek: add support of mt2701/mt2712 Chaotian Jing <chaotian.jing@mediatek.com> - 2017-09-12 11:20 +0200 [PATCH 10/12] mmc: mediatek: add latch-ck support Chaotian Jing <chaotian.jing@mediatek.com> - 2017-09-12 11:20 +0200 [PATCH 02/12] arm64: dts: mt8173: remove "mediatek,mt8135-mmc" from mmc nodes Chaotian Jing <chaotian.jing@mediatek.com> - 2017-09-12 11:20 +0200 [PATCH 04/12] mmc: mediatek: make hs400_tune_response only for mt8173 Chaotian Jing <chaotian.jing@mediatek.com> - 2017-09-12 11:20 +0200 [PATCH 05/12] mmc: mediatek: add pad_tune0 support Chaotian Jing <chaotian.jing@mediatek.com> - 2017-09-12 11:20 +0200 [PATCH 07/12] mmc: mediatek: add busy_check support Chaotian Jing <chaotian.jing@mediatek.com> - 2017-09-12 11:20 +0200 [PATCH 06/12] mmc: mediatek: add async fifo and data tune support Chaotian Jing <chaotian.jing@mediatek.com> - 2017-09-12 11:20 +0200
csiph-web