@@ -942,6 +942,16 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
boarddata->delay_line = 0;
+ if (of_find_property(np, "dsr", NULL)) {
+ u32 tmp;
+
+ of_property_read_u32(np, "dsr", &tmp);
+ boarddata->dsr_req = true;
+ boarddata->dsr = (u16)tmp;
+ } else {
+ boarddata->dsr_req = true;
+ }
+
return 0;
}
#else
@@ -1119,6 +1129,11 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
}
+ if (boarddata->dsr_req) {
+ host->mmc->dsr_req = 1;
+ host->mmc->dsr = boarddata->dsr;
+ }
+
err = sdhci_add_host(host);
if (err)
goto disable_clk;
@@ -35,6 +35,8 @@ enum cd_types {
* @wp_type: type of write_protect method (see wp_types enum above)
* @cd_type: type of card_detect method (see cd_types enum above)
* @support_vsel: indicate it supports 1.8v switching
+ * @dsr_req: indicate DSR is requested
+ * @dsr: requested driver stage setting
*/
struct esdhc_platform_data {
@@ -46,5 +48,7 @@ struct esdhc_platform_data {
unsigned int f_max;
bool support_vsel;
unsigned int delay_line;
+ bool dsr_req;
+ u16 dsr;
};
#endif /* __ASM_ARCH_IMX_ESDHC_H */