aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-04-03 06:40:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-03 15:07:07 -0400
commitc3203374bea328af54843bd72f9306e6c7832db4 (patch)
tree84a5ae192af9e5844f3a7c5099d9c14e2b8ddb07 /drivers
parent5cd02c7747596078e6b01f07f978fa8a10f4e9da (diff)
brcmfmac: add dedicated log level for low-level sdio debugging
The low-level sdio code has a large number of trace and info messages that are mostly useful looking into bus specific issues. For tracing higher-level driver functions it is better to have a dedicated level for low-level sdio debugging. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Change-Id: Ia424ff18d9033b97aeffc248358e50c51805e815 Reviewed-on: http://lb-bun-88.bun.broadcom.com:8080/74 Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c30
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c60
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h1
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c34
4 files changed, 63 insertions, 62 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 11fd1c735589..f3149debede0 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -65,7 +65,7 @@ int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev)
65 u8 data; 65 u8 data;
66 unsigned long flags; 66 unsigned long flags;
67 67
68 brcmf_dbg(TRACE, "Entering: irq %d\n", sdiodev->irq); 68 brcmf_dbg(SDIO, "Entering: irq %d\n", sdiodev->irq);
69 69
70 ret = request_irq(sdiodev->irq, brcmf_sdio_irqhandler, 70 ret = request_irq(sdiodev->irq, brcmf_sdio_irqhandler,
71 sdiodev->irq_flags, "brcmf_oob_intr", 71 sdiodev->irq_flags, "brcmf_oob_intr",
@@ -102,7 +102,7 @@ int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev)
102 102
103int brcmf_sdio_intr_unregister(struct brcmf_sdio_dev *sdiodev) 103int brcmf_sdio_intr_unregister(struct brcmf_sdio_dev *sdiodev)
104{ 104{
105 brcmf_dbg(TRACE, "Entering\n"); 105 brcmf_dbg(SDIO, "Entering\n");
106 106
107 sdio_claim_host(sdiodev->func[1]); 107 sdio_claim_host(sdiodev->func[1]);
108 brcmf_sdio_regwb(sdiodev, SDIO_CCCR_BRCM_SEPINT, 0, NULL); 108 brcmf_sdio_regwb(sdiodev, SDIO_CCCR_BRCM_SEPINT, 0, NULL);
@@ -136,7 +136,7 @@ static void brcmf_sdio_dummy_irqhandler(struct sdio_func *func)
136 136
137int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev) 137int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev)
138{ 138{
139 brcmf_dbg(TRACE, "Entering\n"); 139 brcmf_dbg(SDIO, "Entering\n");
140 140
141 sdio_claim_host(sdiodev->func[1]); 141 sdio_claim_host(sdiodev->func[1]);
142 sdio_claim_irq(sdiodev->func[1], brcmf_sdio_irqhandler); 142 sdio_claim_irq(sdiodev->func[1], brcmf_sdio_irqhandler);
@@ -148,7 +148,7 @@ int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev)
148 148
149int brcmf_sdio_intr_unregister(struct brcmf_sdio_dev *sdiodev) 149int brcmf_sdio_intr_unregister(struct brcmf_sdio_dev *sdiodev)
150{ 150{
151 brcmf_dbg(TRACE, "Entering\n"); 151 brcmf_dbg(SDIO, "Entering\n");
152 152
153 sdio_claim_host(sdiodev->func[1]); 153 sdio_claim_host(sdiodev->func[1]);
154 sdio_release_irq(sdiodev->func[2]); 154 sdio_release_irq(sdiodev->func[2]);
@@ -253,9 +253,9 @@ u8 brcmf_sdio_regrb(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret)
253 u8 data; 253 u8 data;
254 int retval; 254 int retval;
255 255
256 brcmf_dbg(INFO, "addr:0x%08x\n", addr); 256 brcmf_dbg(SDIO, "addr:0x%08x\n", addr);
257 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, false); 257 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, false);
258 brcmf_dbg(INFO, "data:0x%02x\n", data); 258 brcmf_dbg(SDIO, "data:0x%02x\n", data);
259 259
260 if (ret) 260 if (ret)
261 *ret = retval; 261 *ret = retval;
@@ -268,9 +268,9 @@ u32 brcmf_sdio_regrl(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret)
268 u32 data; 268 u32 data;
269 int retval; 269 int retval;
270 270
271 brcmf_dbg(INFO, "addr:0x%08x\n", addr); 271 brcmf_dbg(SDIO, "addr:0x%08x\n", addr);
272 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, false); 272 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, false);
273 brcmf_dbg(INFO, "data:0x%08x\n", data); 273 brcmf_dbg(SDIO, "data:0x%08x\n", data);
274 274
275 if (ret) 275 if (ret)
276 *ret = retval; 276 *ret = retval;
@@ -283,7 +283,7 @@ void brcmf_sdio_regwb(struct brcmf_sdio_dev *sdiodev, u32 addr,
283{ 283{
284 int retval; 284 int retval;
285 285
286 brcmf_dbg(INFO, "addr:0x%08x, data:0x%02x\n", addr, data); 286 brcmf_dbg(SDIO, "addr:0x%08x, data:0x%02x\n", addr, data);
287 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, true); 287 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, true);
288 288
289 if (ret) 289 if (ret)
@@ -295,7 +295,7 @@ void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr,
295{ 295{
296 int retval; 296 int retval;
297 297
298 brcmf_dbg(INFO, "addr:0x%08x, data:0x%08x\n", addr, data); 298 brcmf_dbg(SDIO, "addr:0x%08x, data:0x%08x\n", addr, data);
299 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, true); 299 retval = brcmf_sdio_regrw_helper(sdiodev, addr, &data, true);
300 300
301 if (ret) 301 if (ret)
@@ -358,7 +358,7 @@ brcmf_sdcard_recv_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
358 uint width; 358 uint width;
359 int err = 0; 359 int err = 0;
360 360
361 brcmf_dbg(INFO, "fun = %d, addr = 0x%x, size = %d\n", 361 brcmf_dbg(SDIO, "fun = %d, addr = 0x%x, size = %d\n",
362 fn, addr, pkt->len); 362 fn, addr, pkt->len);
363 363
364 width = (flags & SDIO_REQ_4BYTE) ? 4 : 2; 364 width = (flags & SDIO_REQ_4BYTE) ? 4 : 2;
@@ -381,7 +381,7 @@ int brcmf_sdcard_recv_chain(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
381 uint width; 381 uint width;
382 int err = 0; 382 int err = 0;
383 383
384 brcmf_dbg(INFO, "fun = %d, addr = 0x%x, size = %d\n", 384 brcmf_dbg(SDIO, "fun = %d, addr = 0x%x, size = %d\n",
385 fn, addr, pktq->qlen); 385 fn, addr, pktq->qlen);
386 386
387 width = (flags & SDIO_REQ_4BYTE) ? 4 : 2; 387 width = (flags & SDIO_REQ_4BYTE) ? 4 : 2;
@@ -428,7 +428,7 @@ brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
428 uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK; 428 uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK;
429 int err = 0; 429 int err = 0;
430 430
431 brcmf_dbg(INFO, "fun = %d, addr = 0x%x, size = %d\n", 431 brcmf_dbg(SDIO, "fun = %d, addr = 0x%x, size = %d\n",
432 fn, addr, pkt->len); 432 fn, addr, pkt->len);
433 433
434 /* Async not implemented yet */ 434 /* Async not implemented yet */
@@ -492,13 +492,13 @@ int brcmf_sdcard_rwdata(struct brcmf_sdio_dev *sdiodev, uint rw, u32 addr,
492int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn) 492int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn)
493{ 493{
494 char t_func = (char)fn; 494 char t_func = (char)fn;
495 brcmf_dbg(TRACE, "Enter\n"); 495 brcmf_dbg(SDIO, "Enter\n");
496 496
497 /* issue abort cmd52 command through F0 */ 497 /* issue abort cmd52 command through F0 */
498 brcmf_sdioh_request_byte(sdiodev, SDIOH_WRITE, SDIO_FUNC_0, 498 brcmf_sdioh_request_byte(sdiodev, SDIOH_WRITE, SDIO_FUNC_0,
499 SDIO_CCCR_ABORT, &t_func); 499 SDIO_CCCR_ABORT, &t_func);
500 500
501 brcmf_dbg(TRACE, "Exit\n"); 501 brcmf_dbg(SDIO, "Exit\n");
502 return 0; 502 return 0;
503} 503}
504 504
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
index d92d373733d7..716548989e4f 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
@@ -139,7 +139,7 @@ int brcmf_sdioh_request_byte(struct brcmf_sdio_dev *sdiodev, uint rw, uint func,
139{ 139{
140 int err_ret; 140 int err_ret;
141 141
142 brcmf_dbg(INFO, "rw=%d, func=%d, addr=0x%05x\n", rw, func, regaddr); 142 brcmf_dbg(SDIO, "rw=%d, func=%d, addr=0x%05x\n", rw, func, regaddr);
143 143
144 brcmf_pm_resume_wait(sdiodev, &sdiodev->request_byte_wait); 144 brcmf_pm_resume_wait(sdiodev, &sdiodev->request_byte_wait);
145 if (brcmf_pm_resume_error(sdiodev)) 145 if (brcmf_pm_resume_error(sdiodev))
@@ -179,7 +179,7 @@ int brcmf_sdioh_request_word(struct brcmf_sdio_dev *sdiodev,
179 return -EINVAL; 179 return -EINVAL;
180 } 180 }
181 181
182 brcmf_dbg(INFO, "rw=%d, func=%d, addr=0x%05x, nbytes=%d\n", 182 brcmf_dbg(SDIO, "rw=%d, func=%d, addr=0x%05x, nbytes=%d\n",
183 rw, func, addr, nbytes); 183 rw, func, addr, nbytes);
184 184
185 brcmf_pm_resume_wait(sdiodev, &sdiodev->request_word_wait); 185 brcmf_pm_resume_wait(sdiodev, &sdiodev->request_word_wait);
@@ -252,7 +252,7 @@ brcmf_sdioh_request_chain(struct brcmf_sdio_dev *sdiodev, uint fix_inc,
252 252
253 struct sk_buff *pkt; 253 struct sk_buff *pkt;
254 254
255 brcmf_dbg(TRACE, "Enter\n"); 255 brcmf_dbg(SDIO, "Enter\n");
256 256
257 brcmf_pm_resume_wait(sdiodev, &sdiodev->request_chain_wait); 257 brcmf_pm_resume_wait(sdiodev, &sdiodev->request_chain_wait);
258 if (brcmf_pm_resume_error(sdiodev)) 258 if (brcmf_pm_resume_error(sdiodev))
@@ -270,7 +270,7 @@ brcmf_sdioh_request_chain(struct brcmf_sdio_dev *sdiodev, uint fix_inc,
270 write ? "TX" : "RX", pkt, SGCount, addr, 270 write ? "TX" : "RX", pkt, SGCount, addr,
271 pkt_len, err_ret); 271 pkt_len, err_ret);
272 } else { 272 } else {
273 brcmf_dbg(TRACE, "%s xfr'd %p[%d], addr=0x%05x, len=%d\n", 273 brcmf_dbg(SDIO, "%s xfr'd %p[%d], addr=0x%05x, len=%d\n",
274 write ? "TX" : "RX", pkt, SGCount, addr, 274 write ? "TX" : "RX", pkt, SGCount, addr,
275 pkt_len); 275 pkt_len);
276 } 276 }
@@ -280,7 +280,7 @@ brcmf_sdioh_request_chain(struct brcmf_sdio_dev *sdiodev, uint fix_inc,
280 SGCount++; 280 SGCount++;
281 } 281 }
282 282
283 brcmf_dbg(TRACE, "Exit\n"); 283 brcmf_dbg(SDIO, "Exit\n");
284 return err_ret; 284 return err_ret;
285} 285}
286 286
@@ -295,7 +295,7 @@ int brcmf_sdioh_request_buffer(struct brcmf_sdio_dev *sdiodev,
295 uint pkt_len; 295 uint pkt_len;
296 bool fifo = (fix_inc == SDIOH_DATA_FIX); 296 bool fifo = (fix_inc == SDIOH_DATA_FIX);
297 297
298 brcmf_dbg(TRACE, "Enter\n"); 298 brcmf_dbg(SDIO, "Enter\n");
299 299
300 if (pkt == NULL) 300 if (pkt == NULL)
301 return -EINVAL; 301 return -EINVAL;
@@ -314,7 +314,7 @@ int brcmf_sdioh_request_buffer(struct brcmf_sdio_dev *sdiodev,
314 brcmf_err("%s FAILED %p, addr=0x%05x, pkt_len=%d, ERR=0x%08x\n", 314 brcmf_err("%s FAILED %p, addr=0x%05x, pkt_len=%d, ERR=0x%08x\n",
315 write ? "TX" : "RX", pkt, addr, pkt_len, status); 315 write ? "TX" : "RX", pkt, addr, pkt_len, status);
316 } else { 316 } else {
317 brcmf_dbg(TRACE, "%s xfr'd %p, addr=0x%05x, len=%d\n", 317 brcmf_dbg(SDIO, "%s xfr'd %p, addr=0x%05x, len=%d\n",
318 write ? "TX" : "RX", pkt, addr, pkt_len); 318 write ? "TX" : "RX", pkt, addr, pkt_len);
319 } 319 }
320 320
@@ -350,12 +350,12 @@ static int brcmf_sdioh_enablefuncs(struct brcmf_sdio_dev *sdiodev)
350 u32 fbraddr; 350 u32 fbraddr;
351 u8 func; 351 u8 func;
352 352
353 brcmf_dbg(TRACE, "\n"); 353 brcmf_dbg(SDIO, "\n");
354 354
355 /* Get the Card's common CIS address */ 355 /* Get the Card's common CIS address */
356 sdiodev->func_cis_ptr[0] = brcmf_sdioh_get_cisaddr(sdiodev, 356 sdiodev->func_cis_ptr[0] = brcmf_sdioh_get_cisaddr(sdiodev,
357 SDIO_CCCR_CIS); 357 SDIO_CCCR_CIS);
358 brcmf_dbg(INFO, "Card's Common CIS Ptr = 0x%x\n", 358 brcmf_dbg(SDIO, "Card's Common CIS Ptr = 0x%x\n",
359 sdiodev->func_cis_ptr[0]); 359 sdiodev->func_cis_ptr[0]);
360 360
361 /* Get the Card's function CIS (for each function) */ 361 /* Get the Card's function CIS (for each function) */
@@ -363,7 +363,7 @@ static int brcmf_sdioh_enablefuncs(struct brcmf_sdio_dev *sdiodev)
363 func <= sdiodev->num_funcs; func++, fbraddr += SDIOD_FBR_SIZE) { 363 func <= sdiodev->num_funcs; func++, fbraddr += SDIOD_FBR_SIZE) {
364 sdiodev->func_cis_ptr[func] = 364 sdiodev->func_cis_ptr[func] =
365 brcmf_sdioh_get_cisaddr(sdiodev, SDIO_FBR_CIS + fbraddr); 365 brcmf_sdioh_get_cisaddr(sdiodev, SDIO_FBR_CIS + fbraddr);
366 brcmf_dbg(INFO, "Function %d CIS Ptr = 0x%x\n", 366 brcmf_dbg(SDIO, "Function %d CIS Ptr = 0x%x\n",
367 func, sdiodev->func_cis_ptr[func]); 367 func, sdiodev->func_cis_ptr[func]);
368 } 368 }
369 369
@@ -382,7 +382,7 @@ int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev)
382{ 382{
383 int err_ret = 0; 383 int err_ret = 0;
384 384
385 brcmf_dbg(TRACE, "\n"); 385 brcmf_dbg(SDIO, "\n");
386 386
387 sdiodev->num_funcs = 2; 387 sdiodev->num_funcs = 2;
388 388
@@ -404,13 +404,13 @@ int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev)
404 404
405out: 405out:
406 sdio_release_host(sdiodev->func[1]); 406 sdio_release_host(sdiodev->func[1]);
407 brcmf_dbg(TRACE, "Done\n"); 407 brcmf_dbg(SDIO, "Done\n");
408 return err_ret; 408 return err_ret;
409} 409}
410 410
411void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev) 411void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev)
412{ 412{
413 brcmf_dbg(TRACE, "\n"); 413 brcmf_dbg(SDIO, "\n");
414 414
415 /* Disable Function 2 */ 415 /* Disable Function 2 */
416 sdio_claim_host(sdiodev->func[2]); 416 sdio_claim_host(sdiodev->func[2]);
@@ -458,11 +458,11 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
458 struct brcmf_sdio_dev *sdiodev; 458 struct brcmf_sdio_dev *sdiodev;
459 struct brcmf_bus *bus_if; 459 struct brcmf_bus *bus_if;
460 460
461 brcmf_dbg(TRACE, "Enter\n"); 461 brcmf_dbg(SDIO, "Enter\n");
462 brcmf_dbg(TRACE, "Class=%x\n", func->class); 462 brcmf_dbg(SDIO, "Class=%x\n", func->class);
463 brcmf_dbg(TRACE, "sdio vendor ID: 0x%04x\n", func->vendor); 463 brcmf_dbg(SDIO, "sdio vendor ID: 0x%04x\n", func->vendor);
464 brcmf_dbg(TRACE, "sdio device ID: 0x%04x\n", func->device); 464 brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device);
465 brcmf_dbg(TRACE, "Function#: %d\n", func->num); 465 brcmf_dbg(SDIO, "Function#: %d\n", func->num);
466 466
467 /* Consume func num 1 but dont do anything with it. */ 467 /* Consume func num 1 but dont do anything with it. */
468 if (func->num == 1) 468 if (func->num == 1)
@@ -501,13 +501,13 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
501 if (err) 501 if (err)
502 goto fail; 502 goto fail;
503 503
504 brcmf_dbg(TRACE, "F2 found, calling brcmf_sdio_probe...\n"); 504 brcmf_dbg(SDIO, "F2 found, calling brcmf_sdio_probe...\n");
505 err = brcmf_sdio_probe(sdiodev); 505 err = brcmf_sdio_probe(sdiodev);
506 if (err) { 506 if (err) {
507 brcmf_err("F2 error, probe failed %d...\n", err); 507 brcmf_err("F2 error, probe failed %d...\n", err);
508 goto fail; 508 goto fail;
509 } 509 }
510 brcmf_dbg(TRACE, "F2 init completed...\n"); 510 brcmf_dbg(SDIO, "F2 init completed...\n");
511 return 0; 511 return 0;
512 512
513fail: 513fail:
@@ -523,10 +523,10 @@ static void brcmf_ops_sdio_remove(struct sdio_func *func)
523 struct brcmf_bus *bus_if; 523 struct brcmf_bus *bus_if;
524 struct brcmf_sdio_dev *sdiodev; 524 struct brcmf_sdio_dev *sdiodev;
525 525
526 brcmf_dbg(TRACE, "Enter\n"); 526 brcmf_dbg(SDIO, "Enter\n");
527 brcmf_dbg(TRACE, "sdio vendor ID: 0x%04x\n", func->vendor); 527 brcmf_dbg(SDIO, "sdio vendor ID: 0x%04x\n", func->vendor);
528 brcmf_dbg(TRACE, "sdio device ID: 0x%04x\n", func->device); 528 brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device);
529 brcmf_dbg(TRACE, "Function: %d\n", func->num); 529 brcmf_dbg(SDIO, "Function: %d\n", func->num);
530 530
531 if (func->num != 1 && func->num != 2) 531 if (func->num != 1 && func->num != 2)
532 return; 532 return;
@@ -543,7 +543,7 @@ static void brcmf_ops_sdio_remove(struct sdio_func *func)
543 kfree(sdiodev); 543 kfree(sdiodev);
544 } 544 }
545 545
546 brcmf_dbg(TRACE, "Exit\n"); 546 brcmf_dbg(SDIO, "Exit\n");
547} 547}
548 548
549#ifdef CONFIG_PM_SLEEP 549#ifdef CONFIG_PM_SLEEP
@@ -554,7 +554,7 @@ static int brcmf_sdio_suspend(struct device *dev)
554 struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; 554 struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
555 int ret = 0; 555 int ret = 0;
556 556
557 brcmf_dbg(TRACE, "\n"); 557 brcmf_dbg(SDIO, "\n");
558 558
559 atomic_set(&sdiodev->suspend, true); 559 atomic_set(&sdiodev->suspend, true);
560 560
@@ -645,7 +645,7 @@ static struct platform_driver brcmf_sdio_pd = {
645 645
646void brcmf_sdio_exit(void) 646void brcmf_sdio_exit(void)
647{ 647{
648 brcmf_dbg(TRACE, "Enter\n"); 648 brcmf_dbg(SDIO, "Enter\n");
649 649
650 sdio_unregister_driver(&brcmf_sdmmc_driver); 650 sdio_unregister_driver(&brcmf_sdmmc_driver);
651 651
@@ -656,7 +656,7 @@ void brcmf_sdio_init(void)
656{ 656{
657 int ret; 657 int ret;
658 658
659 brcmf_dbg(TRACE, "Enter\n"); 659 brcmf_dbg(SDIO, "Enter\n");
660 660
661 ret = platform_driver_register(&brcmf_sdio_pd); 661 ret = platform_driver_register(&brcmf_sdio_pd);
662 662
@@ -666,7 +666,7 @@ void brcmf_sdio_init(void)
666#else 666#else
667void brcmf_sdio_exit(void) 667void brcmf_sdio_exit(void)
668{ 668{
669 brcmf_dbg(TRACE, "Enter\n"); 669 brcmf_dbg(SDIO, "Enter\n");
670 670
671 sdio_unregister_driver(&brcmf_sdmmc_driver); 671 sdio_unregister_driver(&brcmf_sdmmc_driver);
672} 672}
@@ -675,7 +675,7 @@ void brcmf_sdio_init(void)
675{ 675{
676 int ret; 676 int ret;
677 677
678 brcmf_dbg(TRACE, "Enter\n"); 678 brcmf_dbg(SDIO, "Enter\n");
679 679
680 ret = sdio_register_driver(&brcmf_sdmmc_driver); 680 ret = sdio_register_driver(&brcmf_sdmmc_driver);
681 681
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
index ef93fe449d1c..30c2e9b9fadd 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
@@ -34,6 +34,7 @@
34#define BRCMF_SCAN_VAL 0x00004000 34#define BRCMF_SCAN_VAL 0x00004000
35#define BRCMF_CONN_VAL 0x00008000 35#define BRCMF_CONN_VAL 0x00008000
36#define BRCMF_CDC_VAL 0x00010000 36#define BRCMF_CDC_VAL 0x00010000
37#define BRCMF_SDIO_VAL 0x00020000
37 38
38/* set default print format */ 39/* set default print format */
39#undef pr_fmt 40#undef pr_fmt
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index a5354e731eaa..d2a9d78e2669 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -675,7 +675,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
675 u8 clkctl, clkreq, devctl; 675 u8 clkctl, clkreq, devctl;
676 unsigned long timeout; 676 unsigned long timeout;
677 677
678 brcmf_dbg(TRACE, "Enter\n"); 678 brcmf_dbg(SDIO, "Enter\n");
679 679
680 clkctl = 0; 680 clkctl = 0;
681 681
@@ -713,7 +713,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
713 devctl |= SBSDIO_DEVCTL_CA_INT_ONLY; 713 devctl |= SBSDIO_DEVCTL_CA_INT_ONLY;
714 brcmf_sdio_regwb(bus->sdiodev, SBSDIO_DEVICE_CTL, 714 brcmf_sdio_regwb(bus->sdiodev, SBSDIO_DEVICE_CTL,
715 devctl, &err); 715 devctl, &err);
716 brcmf_dbg(INFO, "CLKCTL: set PENDING\n"); 716 brcmf_dbg(SDIO, "CLKCTL: set PENDING\n");
717 bus->clkstate = CLK_PENDING; 717 bus->clkstate = CLK_PENDING;
718 718
719 return 0; 719 return 0;
@@ -750,7 +750,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
750 750
751 /* Mark clock available */ 751 /* Mark clock available */
752 bus->clkstate = CLK_AVAIL; 752 bus->clkstate = CLK_AVAIL;
753 brcmf_dbg(INFO, "CLKCTL: turned ON\n"); 753 brcmf_dbg(SDIO, "CLKCTL: turned ON\n");
754 754
755#if defined(DEBUG) 755#if defined(DEBUG)
756 if (!bus->alp_only) { 756 if (!bus->alp_only) {
@@ -775,7 +775,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
775 bus->clkstate = CLK_SDONLY; 775 bus->clkstate = CLK_SDONLY;
776 brcmf_sdio_regwb(bus->sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, 776 brcmf_sdio_regwb(bus->sdiodev, SBSDIO_FUNC1_CHIPCLKCSR,
777 clkreq, &err); 777 clkreq, &err);
778 brcmf_dbg(INFO, "CLKCTL: turned OFF\n"); 778 brcmf_dbg(SDIO, "CLKCTL: turned OFF\n");
779 if (err) { 779 if (err) {
780 brcmf_err("Failed access turning clock off: %d\n", 780 brcmf_err("Failed access turning clock off: %d\n",
781 err); 781 err);
@@ -788,7 +788,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
788/* Change idle/active SD state */ 788/* Change idle/active SD state */
789static int brcmf_sdbrcm_sdclk(struct brcmf_sdio *bus, bool on) 789static int brcmf_sdbrcm_sdclk(struct brcmf_sdio *bus, bool on)
790{ 790{
791 brcmf_dbg(TRACE, "Enter\n"); 791 brcmf_dbg(SDIO, "Enter\n");
792 792
793 if (on) 793 if (on)
794 bus->clkstate = CLK_SDONLY; 794 bus->clkstate = CLK_SDONLY;
@@ -805,7 +805,7 @@ static int brcmf_sdbrcm_clkctl(struct brcmf_sdio *bus, uint target, bool pendok)
805 uint oldstate = bus->clkstate; 805 uint oldstate = bus->clkstate;
806#endif /* DEBUG */ 806#endif /* DEBUG */
807 807
808 brcmf_dbg(TRACE, "Enter\n"); 808 brcmf_dbg(SDIO, "Enter\n");
809 809
810 /* Early exit if we're already there */ 810 /* Early exit if we're already there */
811 if (bus->clkstate == target) { 811 if (bus->clkstate == target) {
@@ -849,7 +849,7 @@ static int brcmf_sdbrcm_clkctl(struct brcmf_sdio *bus, uint target, bool pendok)
849 break; 849 break;
850 } 850 }
851#ifdef DEBUG 851#ifdef DEBUG
852 brcmf_dbg(INFO, "%d -> %d\n", oldstate, bus->clkstate); 852 brcmf_dbg(SDIO, "%d -> %d\n", oldstate, bus->clkstate);
853#endif /* DEBUG */ 853#endif /* DEBUG */
854 854
855 return 0; 855 return 0;
@@ -862,7 +862,7 @@ static u32 brcmf_sdbrcm_hostmail(struct brcmf_sdio *bus)
862 u8 fcbits; 862 u8 fcbits;
863 int ret; 863 int ret;
864 864
865 brcmf_dbg(TRACE, "Enter\n"); 865 brcmf_dbg(SDIO, "Enter\n");
866 866
867 /* Read mailbox data and ack that we did so */ 867 /* Read mailbox data and ack that we did so */
868 ret = r_sdreg32(bus, &hmb_data, 868 ret = r_sdreg32(bus, &hmb_data,
@@ -875,7 +875,7 @@ static u32 brcmf_sdbrcm_hostmail(struct brcmf_sdio *bus)
875 875
876 /* Dongle recomposed rx frames, accept them again */ 876 /* Dongle recomposed rx frames, accept them again */
877 if (hmb_data & HMB_DATA_NAKHANDLED) { 877 if (hmb_data & HMB_DATA_NAKHANDLED) {
878 brcmf_dbg(INFO, "Dongle reports NAK handled, expect rtx of %d\n", 878 brcmf_dbg(SDIO, "Dongle reports NAK handled, expect rtx of %d\n",
879 bus->rx_seq); 879 bus->rx_seq);
880 if (!bus->rxskip) 880 if (!bus->rxskip)
881 brcmf_err("unexpected NAKHANDLED!\n"); 881 brcmf_err("unexpected NAKHANDLED!\n");
@@ -896,7 +896,7 @@ static u32 brcmf_sdbrcm_hostmail(struct brcmf_sdio *bus)
896 "expecting %d\n", 896 "expecting %d\n",
897 bus->sdpcm_ver, SDPCM_PROT_VERSION); 897 bus->sdpcm_ver, SDPCM_PROT_VERSION);
898 else 898 else
899 brcmf_dbg(INFO, "Dongle ready, protocol version %d\n", 899 brcmf_dbg(SDIO, "Dongle ready, protocol version %d\n",
900 bus->sdpcm_ver); 900 bus->sdpcm_ver);
901 } 901 }
902 902
@@ -970,7 +970,7 @@ static void brcmf_sdbrcm_rxfail(struct brcmf_sdio *bus, bool abort, bool rtx)
970 if (!retries) 970 if (!retries)
971 brcmf_err("count never zeroed: last 0x%04x\n", lastrbc); 971 brcmf_err("count never zeroed: last 0x%04x\n", lastrbc);
972 else 972 else
973 brcmf_dbg(INFO, "flush took %d iterations\n", 0xffff - retries); 973 brcmf_dbg(SDIO, "flush took %d iterations\n", 0xffff - retries);
974 974
975 if (rtx) { 975 if (rtx) {
976 bus->sdcnt.rxrtx++; 976 bus->sdcnt.rxrtx++;
@@ -1173,7 +1173,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_sdio *bus, u8 rxseq)
1173 /* If packets, issue read(s) and send up packet chain */ 1173 /* If packets, issue read(s) and send up packet chain */
1174 /* Return sequence numbers consumed? */ 1174 /* Return sequence numbers consumed? */
1175 1175
1176 brcmf_dbg(TRACE, "start: glomd %p glom %p\n", 1176 brcmf_dbg(SDIO, "start: glomd %p glom %p\n",
1177 bus->glomd, skb_peek(&bus->glom)); 1177 bus->glomd, skb_peek(&bus->glom));
1178 1178
1179 /* If there's a descriptor, generate the packet chain */ 1179 /* If there's a descriptor, generate the packet chain */
@@ -2117,7 +2117,7 @@ static void brcmf_sdbrcm_dpc(struct brcmf_sdio *bus)
2117 bus->sdiodev->bus_if->state = BRCMF_BUS_DOWN; 2117 bus->sdiodev->bus_if->state = BRCMF_BUS_DOWN;
2118 } 2118 }
2119 2119
2120 brcmf_dbg(INFO, "DPC: PENDING, devctl 0x%02x clkctl 0x%02x\n", 2120 brcmf_dbg(SDIO, "DPC: PENDING, devctl 0x%02x clkctl 0x%02x\n",
2121 devctl, clkctl); 2121 devctl, clkctl);
2122 2122
2123 if (SBSDIO_HTAV(clkctl)) { 2123 if (SBSDIO_HTAV(clkctl)) {
@@ -2387,7 +2387,7 @@ brcmf_sdbrcm_membytes(struct brcmf_sdio *bus, bool write, u32 address, u8 *data,
2387 2387
2388 /* Do the transfer(s) */ 2388 /* Do the transfer(s) */
2389 while (size) { 2389 while (size) {
2390 brcmf_dbg(INFO, "%s %d bytes at offset 0x%08x in window 0x%08x\n", 2390 brcmf_dbg(SDIO, "%s %d bytes at offset 0x%08x in window 0x%08x\n",
2391 write ? "write" : "read", dsize, 2391 write ? "write" : "read", dsize,
2392 sdaddr, address & SBSDIO_SBWINDOW_MASK); 2392 sdaddr, address & SBSDIO_SBWINDOW_MASK);
2393 bcmerror = brcmf_sdcard_rwdata(bus->sdiodev, write, 2393 bcmerror = brcmf_sdcard_rwdata(bus->sdiodev, write,
@@ -2620,10 +2620,10 @@ brcmf_sdbrcm_bus_txctl(struct device *dev, unsigned char *msg, uint msglen)
2620 msecs_to_jiffies(2000)); 2620 msecs_to_jiffies(2000));
2621 2621
2622 if (!bus->ctrl_frame_stat) { 2622 if (!bus->ctrl_frame_stat) {
2623 brcmf_dbg(INFO, "ctrl_frame_stat == false\n"); 2623 brcmf_dbg(SDIO, "ctrl_frame_stat == false\n");
2624 ret = 0; 2624 ret = 0;
2625 } else { 2625 } else {
2626 brcmf_dbg(INFO, "ctrl_frame_stat == true\n"); 2626 brcmf_dbg(SDIO, "ctrl_frame_stat == true\n");
2627 ret = -1; 2627 ret = -1;
2628 } 2628 }
2629 } 2629 }
@@ -2694,7 +2694,7 @@ static int brcmf_sdio_readshared(struct brcmf_sdio *bus,
2694 2694
2695 addr = le32_to_cpu(addr_le); 2695 addr = le32_to_cpu(addr_le);
2696 2696
2697 brcmf_dbg(INFO, "sdpcm_shared address 0x%08X\n", addr); 2697 brcmf_dbg(SDIO, "sdpcm_shared address 0x%08X\n", addr);
2698 2698
2699 /* 2699 /*
2700 * Check if addr is valid. 2700 * Check if addr is valid.