diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2014-03-18 18:54:27 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2014-03-18 18:54:27 +0000 |
commit | aabce5cf6a31bf82c3df2328f60ca747c6f5b84f (patch) | |
tree | fbd7756b72fe275546eb80b129d9eef3f782208f /target/linux/omap/patches-3.13/907-wlcore-wl12xx-check-if-we-got-correct-clock-data-from-DT.patch | |
parent | 0060005bd8f6100ff1e77b80392d653df859372c (diff) | |
download | mtk-20170518-aabce5cf6a31bf82c3df2328f60ca747c6f5b84f.zip mtk-20170518-aabce5cf6a31bf82c3df2328f60ca747c6f5b84f.tar.gz mtk-20170518-aabce5cf6a31bf82c3df2328f60ca747c6f5b84f.tar.bz2 |
switch to the newer DT bindings for wl1xxx
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 39946
Diffstat (limited to 'target/linux/omap/patches-3.13/907-wlcore-wl12xx-check-if-we-got-correct-clock-data-from-DT.patch')
-rw-r--r-- | target/linux/omap/patches-3.13/907-wlcore-wl12xx-check-if-we-got-correct-clock-data-from-DT.patch | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/target/linux/omap/patches-3.13/907-wlcore-wl12xx-check-if-we-got-correct-clock-data-from-DT.patch b/target/linux/omap/patches-3.13/907-wlcore-wl12xx-check-if-we-got-correct-clock-data-from-DT.patch deleted file mode 100644 index 8929c78..0000000 --- a/target/linux/omap/patches-3.13/907-wlcore-wl12xx-check-if-we-got-correct-clock-data-from-DT.patch +++ /dev/null @@ -1,101 +0,0 @@ -The fref and the tcxo clocks settings are optional in some platforms. -WiLink8 doesn't need either, so we don't check the values. WiLink 6 -only needs the fref clock, so we check that it is valid or return with -an error. WiLink7 needs both clocks, if either is not available we -return with an error. - -Signed-off-by: Luciano Coelho <coelho@ti.com> -Reviewed-by: Felipe Balbi <balbi@ti.com> - ---- -drivers/net/wireless/ti/wl12xx/main.c | 20 +++++++++++++++++--- - drivers/net/wireless/ti/wlcore/sdio.c | 4 ---- - 2 files changed, 17 insertions(+), 7 deletions(-) - ---- a/drivers/net/wireless/ti/wl12xx/main.c -+++ b/drivers/net/wireless/ti/wl12xx/main.c -@@ -930,6 +930,11 @@ static int wl128x_boot_clk(struct wl1271 - u16 sys_clk_cfg; - int ret; - -+ if ((priv->ref_clock < 0) || (priv->tcxo_clock < 0)) { -+ wl1271_error("Missing fref and/or tcxo clock settings\n"); -+ return -EINVAL; -+ } -+ - /* For XTAL-only modes, FREF will be used after switching from TCXO */ - if (priv->ref_clock == WL12XX_REFCLOCK_26_XTAL || - priv->ref_clock == WL12XX_REFCLOCK_38_XTAL) { -@@ -979,6 +984,11 @@ static int wl127x_boot_clk(struct wl1271 - u32 clk; - int ret; - -+ if (priv->ref_clock < 0) { -+ wl1271_error("Missing fref clock settings\n"); -+ return -EINVAL; -+ } -+ - if (WL127X_PG_GET_MAJOR(wl->hw_pg_ver) < 3) - wl->quirks |= WLCORE_QUIRK_END_OF_TRANSACTION; - -@@ -1768,7 +1778,7 @@ static int wl12xx_setup(struct wl1271 *w - wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, &wl12xx_ht_cap); - wl12xx_conf_init(wl); - -- if (!fref_param) { -+ if (!fref_param && (pdata->ref_clock_freq > 0)) { - priv->ref_clock = wl12xx_get_clock_idx(wl12xx_refclock_table, - pdata->ref_clock_freq, - pdata->ref_clock_xtal); -@@ -1779,6 +1789,8 @@ static int wl12xx_setup(struct wl1271 *w - - return priv->ref_clock; - } -+ } else if (!fref_param) { -+ priv->ref_clock = -EINVAL; - } else { - if (!strcmp(fref_param, "19.2")) - priv->ref_clock = WL12XX_REFCLOCK_19; -@@ -1796,7 +1808,7 @@ static int wl12xx_setup(struct wl1271 *w - wl1271_error("Invalid fref parameter %s", fref_param); - } - -- if (!tcxo_param) { -+ if (!fref_param && (pdata->tcxo_clock_freq > 0)) { - priv->tcxo_clock = wl12xx_get_clock_idx(wl12xx_tcxoclock_table, - pdata->tcxo_clock_freq, - true); -@@ -1806,7 +1818,9 @@ static int wl12xx_setup(struct wl1271 *w - - return priv->tcxo_clock; - } -- } else { -+ } else if (!fref_param) { -+ priv->tcxo_clock = -EINVAL; -+ }else { - if (!strcmp(tcxo_param, "19.2")) - priv->tcxo_clock = WL12XX_TCXOCLOCK_19_2; - else if (!strcmp(tcxo_param, "26")) ---- a/drivers/net/wireless/ti/wlcore/sdio.c -+++ b/drivers/net/wireless/ti/wlcore/sdio.c -@@ -252,20 +252,16 @@ static struct wl12xx_platform_data *wlco - for_each_matching_node(clock_node, wlcore_sdio_of_clk_match_table) - of_fixed_clk_setup(clock_node); - -- /* TODO: make sure we have this when needed (ie. for WL6 and WL7) */ - glue->refclock = of_clk_get_by_name(np, "refclock"); - if (IS_ERR(glue->refclock)) { -- dev_err(dev, "couldn't find refclock on the device tree\n"); - glue->refclock = NULL; - } else { - clk_prepare_enable(glue->refclock); - pdata->ref_clock_freq = clk_get_rate(glue->refclock); - } - -- /* TODO: make sure we have this when needed (ie. for WL7) */ - glue->tcxoclock = of_clk_get_by_name(np, "tcxoclock"); - if (IS_ERR(glue->tcxoclock)) { -- dev_err(dev, "couldn't find tcxoclock on the device tree\n"); - glue->tcxoclock = NULL; - } else { - clk_prepare_enable(glue->tcxoclock); |