aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch')
-rw-r--r--target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch33
1 files changed, 7 insertions, 26 deletions
diff --git a/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch b/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch
index 1d3899d28b..67c32dc4a4 100644
--- a/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch
+++ b/target/linux/layerscape/patches-4.9/812-mmc-layerscape-support.patch
@@ -217,7 +217,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
}
static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
-@@ -421,17 +466,34 @@ static void esdhc_of_set_clock(struct sd
+@@ -421,12 +466,15 @@ static void esdhc_of_set_clock(struct sd
struct sdhci_esdhc *esdhc = sdhci_pltfm_priv(pltfm_host);
int pre_div = 1;
int div = 1;
@@ -234,26 +234,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
/* Workaround to start pre_div at 2 for VNN < VENDOR_V_23 */
if (esdhc->vendor_ver < VENDOR_V_23)
- pre_div = 2;
-
-+ /*
-+ * Limit SD clock to 167MHz for ls1046a according to its datasheet
-+ */
-+ if (clock > 167000000 &&
-+ of_find_compatible_node(NULL, NULL, "fsl,ls1046a-esdhc"))
-+ clock = 167000000;
-+
-+ /*
-+ * Limit SD clock to 125MHz for ls1012a according to its datasheet
-+ */
-+ if (clock > 125000000 &&
-+ of_find_compatible_node(NULL, NULL, "fsl,ls1012a-esdhc"))
-+ clock = 125000000;
-+
- /* Workaround to reduce the clock frequency for p1010 esdhc */
- if (of_find_compatible_node(NULL, NULL, "fsl,p1010-esdhc")) {
- if (clock > 20000000)
-@@ -440,9 +502,15 @@ static void esdhc_of_set_clock(struct sd
+@@ -454,9 +502,15 @@ static void esdhc_of_set_clock(struct sd
clock -= 5000000;
}
@@ -271,7 +252,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
while (host->max_clk / pre_div / 16 > clock && pre_div < 256)
-@@ -462,7 +530,20 @@ static void esdhc_of_set_clock(struct sd
+@@ -476,7 +530,20 @@ static void esdhc_of_set_clock(struct sd
| (div << ESDHC_DIVIDER_SHIFT)
| (pre_div << ESDHC_PREDIV_SHIFT));
sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
@@ -293,7 +274,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
}
static void esdhc_pltfm_set_bus_width(struct sdhci_host *host, int width)
-@@ -487,12 +568,136 @@ static void esdhc_pltfm_set_bus_width(st
+@@ -501,12 +568,136 @@ static void esdhc_pltfm_set_bus_width(st
sdhci_writel(host, ctrl, ESDHC_PROCTL);
}
@@ -430,7 +411,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
}
#ifdef CONFIG_PM_SLEEP
-@@ -575,10 +780,19 @@ static const struct sdhci_pltfm_data sdh
+@@ -589,10 +780,19 @@ static const struct sdhci_pltfm_data sdh
.ops = &sdhci_esdhc_le_ops,
};
@@ -450,7 +431,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
u16 host_ver;
pltfm_host = sdhci_priv(host);
-@@ -588,6 +802,36 @@ static void esdhc_init(struct platform_d
+@@ -602,6 +802,36 @@ static void esdhc_init(struct platform_d
esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
SDHCI_VENDOR_VER_SHIFT;
esdhc->spec_ver = host_ver & SDHCI_SPEC_VER_MASK;
@@ -487,7 +468,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
}
static int sdhci_esdhc_probe(struct platform_device *pdev)
-@@ -610,6 +854,11 @@ static int sdhci_esdhc_probe(struct plat
+@@ -624,6 +854,11 @@ static int sdhci_esdhc_probe(struct plat
if (IS_ERR(host))
return PTR_ERR(host);