ソースを参照

cnss2: Use mdelay to avoid compilation issue

The function - udelay is used only for very small delays (< 2 msec) on
some arm architecture. Otherwise there is compilation issue like
"__bad_udelay", since input is out of range. This change uses mdelay
to replace udelay and avoid compilation issue.

Change-Id: I42df519e7004d89ae6bb394f65b0d61ab5073784
CRs-Fixed: 3418093
Wu Gao 2 年 前
コミット
dcbdb2f5fb
1 ファイル変更4 行追加2 行削除
  1. 4 2
      cnss2/power.c

+ 4 - 2
cnss2/power.c

@@ -74,9 +74,11 @@ static struct cnss_clk_cfg cnss_clk_list[] = {
 #define WLAN_EN_SLEEP			"wlan_en_sleep"
 #define WLAN_VREGS_PROP			"wlan_vregs"
 
+/* unit us */
 #define BOOTSTRAP_DELAY			1000
 #define WLAN_ENABLE_DELAY		1000
-#define WLAN_ENABLE_DELAY_ROME		10000
+/* unit ms */
+#define WLAN_ENABLE_DELAY_ROME		10
 
 #define TCS_CMD_DATA_ADDR_OFFSET	0x4
 #define TCS_OFFSET			0xC8
@@ -1024,7 +1026,7 @@ static int cnss_select_pinctrl_state(struct cnss_plat_data *plat_priv,
 
 			if (plat_priv->device_id == QCA6174_DEVICE_ID ||
 			    plat_priv->device_id == 0)
-				udelay(WLAN_ENABLE_DELAY_ROME);
+				mdelay(WLAN_ENABLE_DELAY_ROME);
 			else
 				udelay(WLAN_ENABLE_DELAY);