aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/iwmc3200top/fw-download.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/iwmc3200top/fw-download.c')
-rw-r--r--drivers/misc/iwmc3200top/fw-download.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/misc/iwmc3200top/fw-download.c b/drivers/misc/iwmc3200top/fw-download.c
index 474be9228904..07055afef858 100644
--- a/drivers/misc/iwmc3200top/fw-download.c
+++ b/drivers/misc/iwmc3200top/fw-download.c
@@ -43,7 +43,7 @@ static int iwmct_fw_parser_init(struct iwmct_priv *priv, const u8 *file,
43 struct iwmct_parser *parser = &priv->parser; 43 struct iwmct_parser *parser = &priv->parser;
44 struct iwmct_fw_hdr *fw_hdr = &parser->versions; 44 struct iwmct_fw_hdr *fw_hdr = &parser->versions;
45 45
46 LOG_INFOEX(priv, INIT, "-->\n"); 46 LOG_TRACE(priv, FW_DOWNLOAD, "-->\n");
47 47
48 LOG_INFO(priv, FW_DOWNLOAD, "file_size=%zd\n", file_size); 48 LOG_INFO(priv, FW_DOWNLOAD, "file_size=%zd\n", file_size);
49 49
@@ -69,7 +69,7 @@ static int iwmct_fw_parser_init(struct iwmct_priv *priv, const u8 *file,
69 69
70 parser->cur_pos += sizeof(struct iwmct_fw_hdr); 70 parser->cur_pos += sizeof(struct iwmct_fw_hdr);
71 71
72 LOG_INFOEX(priv, INIT, "<--\n"); 72 LOG_TRACE(priv, FW_DOWNLOAD, "<--\n");
73 return 0; 73 return 0;
74} 74}
75 75
@@ -112,7 +112,7 @@ static int iwmct_parse_next_section(struct iwmct_priv *priv, const u8 **p_sec,
112 struct iwmct_dbg *dbg = &priv->dbg; 112 struct iwmct_dbg *dbg = &priv->dbg;
113 struct iwmct_fw_sec_hdr *sec_hdr; 113 struct iwmct_fw_sec_hdr *sec_hdr;
114 114
115 LOG_INFOEX(priv, INIT, "-->\n"); 115 LOG_TRACE(priv, FW_DOWNLOAD, "-->\n");
116 116
117 while (parser->cur_pos + sizeof(struct iwmct_fw_sec_hdr) 117 while (parser->cur_pos + sizeof(struct iwmct_fw_sec_hdr)
118 <= parser->file_size) { 118 <= parser->file_size) {
@@ -151,7 +151,7 @@ static int iwmct_parse_next_section(struct iwmct_priv *priv, const u8 **p_sec,
151 "finished with section cur_pos=%zd\n", parser->cur_pos); 151 "finished with section cur_pos=%zd\n", parser->cur_pos);
152 } 152 }
153 153
154 LOG_INFOEX(priv, INIT, "<--\n"); 154 LOG_TRACE(priv, INIT, "<--\n");
155 return 0; 155 return 0;
156} 156}
157 157
@@ -166,7 +166,7 @@ static int iwmct_download_section(struct iwmct_priv *priv, const u8 *p_sec,
166 int ret = 0; 166 int ret = 0;
167 u32 cmd = 0; 167 u32 cmd = 0;
168 168
169 LOG_INFOEX(priv, INIT, "-->\n"); 169 LOG_TRACE(priv, FW_DOWNLOAD, "-->\n");
170 LOG_INFO(priv, FW_DOWNLOAD, "Download address 0x%x size 0x%zx\n", 170 LOG_INFO(priv, FW_DOWNLOAD, "Download address 0x%x size 0x%zx\n",
171 addr, sec_size); 171 addr, sec_size);
172 172
@@ -250,7 +250,7 @@ static int iwmct_download_section(struct iwmct_priv *priv, const u8 *p_sec,
250 if (sent < sec_size) 250 if (sent < sec_size)
251 ret = -EINVAL; 251 ret = -EINVAL;
252exit: 252exit:
253 LOG_INFOEX(priv, INIT, "<--\n"); 253 LOG_TRACE(priv, FW_DOWNLOAD, "<--\n");
254 return ret; 254 return ret;
255} 255}
256 256
@@ -261,7 +261,7 @@ static int iwmct_kick_fw(struct iwmct_priv *priv, bool jump)
261 int ret; 261 int ret;
262 u32 cmd; 262 u32 cmd;
263 263
264 LOG_INFOEX(priv, INIT, "-->\n"); 264 LOG_TRACE(priv, FW_DOWNLOAD, "-->\n");
265 265
266 memset(parser->buf, 0, parser->buf_size); 266 memset(parser->buf, 0, parser->buf_size);
267 cmd = IWMC_CMD_SIGNATURE << CMD_HDR_SIGNATURE_POS; 267 cmd = IWMC_CMD_SIGNATURE << CMD_HDR_SIGNATURE_POS;
@@ -284,7 +284,7 @@ static int iwmct_kick_fw(struct iwmct_priv *priv, bool jump)
284 if (ret) 284 if (ret)
285 LOG_INFO(priv, FW_DOWNLOAD, "iwmct_tx returned %d", ret); 285 LOG_INFO(priv, FW_DOWNLOAD, "iwmct_tx returned %d", ret);
286 286
287 LOG_INFOEX(priv, INIT, "<--\n"); 287 LOG_TRACE(priv, FW_DOWNLOAD, "<--\n");
288 return 0; 288 return 0;
289} 289}
290 290
@@ -298,6 +298,16 @@ int iwmct_fw_load(struct iwmct_priv *priv)
298 int ret; 298 int ret;
299 299
300 300
301 LOG_INFO(priv, FW_DOWNLOAD, "barker download request 0x%x is:\n",
302 priv->barker);
303 LOG_INFO(priv, FW_DOWNLOAD, "******* Top FW %s requested ********\n",
304 (priv->barker & BARKER_DNLOAD_TOP_MSK) ? "was" : "not");
305 LOG_INFO(priv, FW_DOWNLOAD, "******* GPS FW %s requested ********\n",
306 (priv->barker & BARKER_DNLOAD_GPS_MSK) ? "was" : "not");
307 LOG_INFO(priv, FW_DOWNLOAD, "******* BT FW %s requested ********\n",
308 (priv->barker & BARKER_DNLOAD_BT_MSK) ? "was" : "not");
309
310
301 /* get the firmware */ 311 /* get the firmware */
302 ret = request_firmware(&raw, fw_name, &priv->func->dev); 312 ret = request_firmware(&raw, fw_name, &priv->func->dev);
303 if (ret < 0) { 313 if (ret < 0) {