Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115871624
D34028.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34028.diff
View Options
diff --git a/sys/dev/sdhci/sdhci_fsl_fdt.c b/sys/dev/sdhci/sdhci_fsl_fdt.c
--- a/sys/dev/sdhci/sdhci_fsl_fdt.c
+++ b/sys/dev/sdhci/sdhci_fsl_fdt.c
@@ -219,6 +219,13 @@
.errata = SDHCI_FSL_UNSUPP_1_8V | SDHCI_FSL_TUNING_ERRATUM_TYPE2,
};
+static const struct sdhci_fsl_fdt_soc_data sdhci_fsl_fdt_lx2160a_soc_data = {
+ .quirks = 0,
+ .baseclk_div = 2,
+ .errata = SDHCI_FSL_UNRELIABLE_PULSE_DET |
+ SDHCI_FSL_HS400_LIMITED_CLK_DIV,
+};
+
static const struct sdhci_fsl_fdt_soc_data sdhci_fsl_fdt_gen_data = {
.quirks = 0,
.baseclk_div = 1,
@@ -790,13 +797,23 @@
sc = device_get_softc(dev);
ocd_data = ofw_bus_search_compatible(dev,
sdhci_fsl_fdt_compat_data)->ocd_data;
- sc->soc_data = (struct sdhci_fsl_fdt_soc_data *)ocd_data;
sc->dev = dev;
- sc->slot.quirks = sc->soc_data->quirks;
sc->flags = 0;
host = &sc->slot.host;
-
rid = 0;
+
+ /*
+ * LX2160A needs its own soc_data in order to apply SoC
+ * specific quriks. Since the controller is identified
+ * only with a generic compatible string we need to do this dance here.
+ */
+ if (ofw_bus_node_is_compatible(OF_finddevice("/"), "fsl,lx2160a"))
+ sc->soc_data = &sdhci_fsl_fdt_lx2160a_soc_data;
+ else
+ sc->soc_data = (struct sdhci_fsl_fdt_soc_data *)ocd_data;
+
+ sc->slot.quirks = sc->soc_data->quirks;
+
sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
RF_ACTIVE);
if (sc->mem_res == NULL) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 30, 8:12 PM (8 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17864322
Default Alt Text
D34028.diff (1 KB)
Attached To
Mode
D34028: sdhci_fsl_fdt: Apply errata for LX2160A
Attached
Detach File
Event Timeline
Log In to Comment