mci: add device tree support for DSR
add optional DSR support. This should go into the kernel, too Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
78b9e4e041
commit
f11668fee7
|
@ -1775,6 +1775,7 @@ void mci_of_parse(struct mci_host *host)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
u32 bus_width;
|
u32 bus_width;
|
||||||
|
u32 dsr_val;
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_OFDEVICE))
|
if (!IS_ENABLED(CONFIG_OFDEVICE))
|
||||||
return;
|
return;
|
||||||
|
@ -1807,4 +1808,11 @@ void mci_of_parse(struct mci_host *host)
|
||||||
|
|
||||||
/* f_max is obtained from the optional "max-frequency" property */
|
/* f_max is obtained from the optional "max-frequency" property */
|
||||||
of_property_read_u32(np, "max-frequency", &host->f_max);
|
of_property_read_u32(np, "max-frequency", &host->f_max);
|
||||||
|
|
||||||
|
if (!of_property_read_u32(np, "dsr", &dsr_val)) {
|
||||||
|
if (dsr_val < 0x10000) {
|
||||||
|
host->use_dsr = 1;
|
||||||
|
host->dsr_val = dsr_val;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue