File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -921,6 +921,10 @@ int renesas_sdhi_probe(struct platform_device *pdev,
921
921
if (IS_ERR (priv -> clk ))
922
922
return dev_err_probe (& pdev -> dev , PTR_ERR (priv -> clk ), "cannot get clock" );
923
923
924
+ priv -> clkh = devm_clk_get_optional (& pdev -> dev , "clkh" );
925
+ if (IS_ERR (priv -> clkh ))
926
+ return dev_err_probe (& pdev -> dev , PTR_ERR (priv -> clkh ), "cannot get clkh" );
927
+
924
928
/*
925
929
* Some controllers provide a 2nd clock just to run the internal card
926
930
* detection logic. Unfortunately, the existing driver architecture does
@@ -959,7 +963,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
959
963
dma_priv -> dma_buswidth = of_data -> dma_buswidth ;
960
964
host -> bus_shift = of_data -> bus_shift ;
961
965
/* Fallback for old DTs */
962
- if (of_data -> sdhi_flags & SDHI_FLAG_NEED_CLKH_FALLBACK )
966
+ if (! priv -> clkh && of_data -> sdhi_flags & SDHI_FLAG_NEED_CLKH_FALLBACK )
963
967
priv -> clkh = clk_get_parent (clk_get_parent (priv -> clk ));
964
968
965
969
}
You can’t perform that action at this time.
0 commit comments