diff options
author | Felipe Balbi <balbi@ti.com> | 2011-05-11 05:44:08 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-05-13 07:34:04 -0400 |
commit | 5c8a86e10a7c164f44537fabdc169fd8b4e7a440 (patch) | |
tree | 96fe3eb08b9ae01f62e45b725049d3f2aa6b7bba /drivers/usb/musb/musb_gadget_ep0.c | |
parent | a0885924326f79e157847010a9aaf49b058b30dc (diff) |
usb: musb: drop unneeded musb_debug trickery
We have a generic way of enabling/disabling
different debug messages on a driver called
DYNAMIC_PRINTK. Anyone interested in enabling
just part of the debug messages, please read
the documentation under:
Documentation/dynamic-debug-howto.txt
for information on how to use that great
infrastructure.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_gadget_ep0.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget_ep0.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c index 75a542e42fdf..b2faff235507 100644 --- a/drivers/usb/musb/musb_gadget_ep0.c +++ b/drivers/usb/musb/musb_gadget_ep0.c | |||
@@ -209,7 +209,7 @@ static inline void musb_try_b_hnp_enable(struct musb *musb) | |||
209 | void __iomem *mbase = musb->mregs; | 209 | void __iomem *mbase = musb->mregs; |
210 | u8 devctl; | 210 | u8 devctl; |
211 | 211 | ||
212 | DBG(1, "HNP: Setting HR\n"); | 212 | dev_dbg(musb->controller, "HNP: Setting HR\n"); |
213 | devctl = musb_readb(mbase, MUSB_DEVCTL); | 213 | devctl = musb_readb(mbase, MUSB_DEVCTL); |
214 | musb_writeb(mbase, MUSB_DEVCTL, devctl | MUSB_DEVCTL_HR); | 214 | musb_writeb(mbase, MUSB_DEVCTL, devctl | MUSB_DEVCTL_HR); |
215 | } | 215 | } |
@@ -306,7 +306,7 @@ __acquires(musb->lock) | |||
306 | /* Maybe start the first request in the queue */ | 306 | /* Maybe start the first request in the queue */ |
307 | request = next_request(musb_ep); | 307 | request = next_request(musb_ep); |
308 | if (!musb_ep->busy && request) { | 308 | if (!musb_ep->busy && request) { |
309 | DBG(3, "restarting the request\n"); | 309 | dev_dbg(musb->controller, "restarting the request\n"); |
310 | musb_ep_restart(musb, request); | 310 | musb_ep_restart(musb, request); |
311 | } | 311 | } |
312 | 312 | ||
@@ -553,7 +553,7 @@ static void ep0_txstate(struct musb *musb) | |||
553 | 553 | ||
554 | if (!req) { | 554 | if (!req) { |
555 | /* WARN_ON(1); */ | 555 | /* WARN_ON(1); */ |
556 | DBG(2, "odd; csr0 %04x\n", musb_readw(regs, MUSB_CSR0)); | 556 | dev_dbg(musb->controller, "odd; csr0 %04x\n", musb_readw(regs, MUSB_CSR0)); |
557 | return; | 557 | return; |
558 | } | 558 | } |
559 | 559 | ||
@@ -610,7 +610,7 @@ musb_read_setup(struct musb *musb, struct usb_ctrlrequest *req) | |||
610 | /* NOTE: earlier 2.6 versions changed setup packets to host | 610 | /* NOTE: earlier 2.6 versions changed setup packets to host |
611 | * order, but now USB packets always stay in USB byte order. | 611 | * order, but now USB packets always stay in USB byte order. |
612 | */ | 612 | */ |
613 | DBG(3, "SETUP req%02x.%02x v%04x i%04x l%d\n", | 613 | dev_dbg(musb->controller, "SETUP req%02x.%02x v%04x i%04x l%d\n", |
614 | req->bRequestType, | 614 | req->bRequestType, |
615 | req->bRequest, | 615 | req->bRequest, |
616 | le16_to_cpu(req->wValue), | 616 | le16_to_cpu(req->wValue), |
@@ -678,7 +678,7 @@ irqreturn_t musb_g_ep0_irq(struct musb *musb) | |||
678 | csr = musb_readw(regs, MUSB_CSR0); | 678 | csr = musb_readw(regs, MUSB_CSR0); |
679 | len = musb_readb(regs, MUSB_COUNT0); | 679 | len = musb_readb(regs, MUSB_COUNT0); |
680 | 680 | ||
681 | DBG(4, "csr %04x, count %d, myaddr %d, ep0stage %s\n", | 681 | dev_dbg(musb->controller, "csr %04x, count %d, myaddr %d, ep0stage %s\n", |
682 | csr, len, | 682 | csr, len, |
683 | musb_readb(mbase, MUSB_FADDR), | 683 | musb_readb(mbase, MUSB_FADDR), |
684 | decode_ep0stage(musb->ep0_state)); | 684 | decode_ep0stage(musb->ep0_state)); |
@@ -749,7 +749,7 @@ irqreturn_t musb_g_ep0_irq(struct musb *musb) | |||
749 | 749 | ||
750 | /* enter test mode if needed (exit by reset) */ | 750 | /* enter test mode if needed (exit by reset) */ |
751 | else if (musb->test_mode) { | 751 | else if (musb->test_mode) { |
752 | DBG(1, "entering TESTMODE\n"); | 752 | dev_dbg(musb->controller, "entering TESTMODE\n"); |
753 | 753 | ||
754 | if (MUSB_TEST_PACKET == musb->test_mode_nr) | 754 | if (MUSB_TEST_PACKET == musb->test_mode_nr) |
755 | musb_load_testpacket(musb); | 755 | musb_load_testpacket(musb); |
@@ -861,7 +861,7 @@ setup: | |||
861 | break; | 861 | break; |
862 | } | 862 | } |
863 | 863 | ||
864 | DBG(3, "handled %d, csr %04x, ep0stage %s\n", | 864 | dev_dbg(musb->controller, "handled %d, csr %04x, ep0stage %s\n", |
865 | handled, csr, | 865 | handled, csr, |
866 | decode_ep0stage(musb->ep0_state)); | 866 | decode_ep0stage(musb->ep0_state)); |
867 | 867 | ||
@@ -878,7 +878,7 @@ setup: | |||
878 | if (handled < 0) { | 878 | if (handled < 0) { |
879 | musb_ep_select(mbase, 0); | 879 | musb_ep_select(mbase, 0); |
880 | stall: | 880 | stall: |
881 | DBG(3, "stall (%d)\n", handled); | 881 | dev_dbg(musb->controller, "stall (%d)\n", handled); |
882 | musb->ackpend |= MUSB_CSR0_P_SENDSTALL; | 882 | musb->ackpend |= MUSB_CSR0_P_SENDSTALL; |
883 | musb->ep0_state = MUSB_EP0_STAGE_IDLE; | 883 | musb->ep0_state = MUSB_EP0_STAGE_IDLE; |
884 | finish: | 884 | finish: |
@@ -958,7 +958,7 @@ musb_g_ep0_queue(struct usb_ep *e, struct usb_request *r, gfp_t gfp_flags) | |||
958 | status = 0; | 958 | status = 0; |
959 | break; | 959 | break; |
960 | default: | 960 | default: |
961 | DBG(1, "ep0 request queued in state %d\n", | 961 | dev_dbg(musb->controller, "ep0 request queued in state %d\n", |
962 | musb->ep0_state); | 962 | musb->ep0_state); |
963 | status = -EINVAL; | 963 | status = -EINVAL; |
964 | goto cleanup; | 964 | goto cleanup; |
@@ -967,7 +967,7 @@ musb_g_ep0_queue(struct usb_ep *e, struct usb_request *r, gfp_t gfp_flags) | |||
967 | /* add request to the list */ | 967 | /* add request to the list */ |
968 | list_add_tail(&req->list, &ep->req_list); | 968 | list_add_tail(&req->list, &ep->req_list); |
969 | 969 | ||
970 | DBG(3, "queue to %s (%s), length=%d\n", | 970 | dev_dbg(musb->controller, "queue to %s (%s), length=%d\n", |
971 | ep->name, ep->is_in ? "IN/TX" : "OUT/RX", | 971 | ep->name, ep->is_in ? "IN/TX" : "OUT/RX", |
972 | req->request.length); | 972 | req->request.length); |
973 | 973 | ||
@@ -1060,7 +1060,7 @@ static int musb_g_ep0_halt(struct usb_ep *e, int value) | |||
1060 | musb->ackpend = 0; | 1060 | musb->ackpend = 0; |
1061 | break; | 1061 | break; |
1062 | default: | 1062 | default: |
1063 | DBG(1, "ep0 can't halt in state %d\n", musb->ep0_state); | 1063 | dev_dbg(musb->controller, "ep0 can't halt in state %d\n", musb->ep0_state); |
1064 | status = -EINVAL; | 1064 | status = -EINVAL; |
1065 | } | 1065 | } |
1066 | 1066 | ||