diff options
author | Christophe Roullier <christophe.roullier@st.com> | 2019-03-05 09:29:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-08 20:48:19 +0100 |
commit | 81311c03ab4dca83e4f4c678129b4327f2d41b40 (patch) | |
tree | 9d25abd2bf03e59285b5a3508d4ef8ae78c57a2f /drivers/net/ethernet | |
parent | dt-bindings: net: stmmac: add phys config properties (diff) | |
download | linux-81311c03ab4dca83e4f4c678129b4327f2d41b40.tar.xz linux-81311c03ab4dca83e4f4c678129b4327f2d41b40.zip |
net: ethernet: stmmac: add management of clk_csr property
In Documentation stmmac.txt there is possibility to
fixed CSR Clock range selection with property clk_csr.
This patch add the management of this property
For example to use it, add in your ethernet node DT:
clk_csr = <3>;
Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 2b800ce1d5bf..3031f2bf15d6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -408,6 +408,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) /* Default to phy auto-detection */ plat->phy_addr = -1; + /* Get clk_csr from device tree */ + of_property_read_u32(np, "clk_csr", &plat->clk_csr); + /* "snps,phy-addr" is not a standard property. Mark it as deprecated * and warn of its use. Remove this when phy node support is added. */ |