mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
64b53247c4
Refresh patches. Remove upstreamed patch: generic/pending/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch Update patches that no longer applies: generic/hack/901-debloat_sock_diag.patch Compile-tested on: x86/64. Runtime-tested on: x86/64. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
From de14d1d0dc7ecf5c3e7e2a591b4f14e688fa52e6 Mon Sep 17 00:00:00 2001
|
|
From: Chaotian Jing <chaotian.jing@mediatek.com>
|
|
Date: Mon, 16 Oct 2017 09:46:37 +0800
|
|
Subject: [PATCH 158/224] mmc: mediatek: add latch-ck support
|
|
|
|
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>
|
|
Tested-by: Sean Wang <sean.wang@mediatek.com>
|
|
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
|
|
---
|
|
drivers/mmc/host/mtk-sd.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- 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 */
|
|
@@ -1661,6 +1662,8 @@ static int msdc_tune_data(struct mmc_hos
|
|
u32 tune_reg = host->dev_comp->pad_tune_reg;
|
|
int i, ret;
|
|
|
|
+ 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++) {
|
|
@@ -1773,6 +1776,9 @@ static const struct mmc_host_ops mt_msdc
|
|
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);
|
|
|