diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2011-07-19 15:47:01 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-08-12 04:52:30 -0400 |
commit | aba1350fdac7cb52f86e6818addb26d03b3ef9bc (patch) | |
tree | 1764efd8abe95e07232b53b6ba2faa25e416f6f1 /drivers/usb | |
parent | 567b20e02bc1b2bcd69e8bfc022dec3da3fefb89 (diff) |
usb: gadget: fusb300: remove #if 0 block
The code in this block is unused and the Author is fine with removing:
| These functions were used to debug unstable hw fifo while developing
| fusb300. It's much more stable now.
| So these functions can be removed.
Cc: "Wendy Yuan-Hsin Chen" <yhchen@faraday-tech.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/fusb300_udc.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c index 24a924330c81..4ec888f90002 100644 --- a/drivers/usb/gadget/fusb300_udc.c +++ b/drivers/usb/gadget/fusb300_udc.c | |||
@@ -609,107 +609,6 @@ void fusb300_rdcxf(struct fusb300 *fusb300, | |||
609 | } | 609 | } |
610 | } | 610 | } |
611 | 611 | ||
612 | #if 0 | ||
613 | static void fusb300_dbg_fifo(struct fusb300_ep *ep, | ||
614 | u8 entry, u16 length) | ||
615 | { | ||
616 | u32 reg; | ||
617 | u32 i = 0; | ||
618 | u32 j = 0; | ||
619 | |||
620 | reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM); | ||
621 | reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) | | ||
622 | FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG); | ||
623 | reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) | | ||
624 | FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG); | ||
625 | iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM); | ||
626 | |||
627 | for (i = 0; i < (length >> 2); i++) { | ||
628 | if (i * 4 == 1024) | ||
629 | break; | ||
630 | reg = ioread32(ep->fusb300->reg + | ||
631 | FUSB300_OFFSET_BUFDBG_START + i * 4); | ||
632 | printk(KERN_DEBUG" 0x%-8x", reg); | ||
633 | j++; | ||
634 | if ((j % 4) == 0) | ||
635 | printk(KERN_DEBUG "\n"); | ||
636 | } | ||
637 | |||
638 | if (length % 4) { | ||
639 | reg = ioread32(ep->fusb300->reg + | ||
640 | FUSB300_OFFSET_BUFDBG_START + i * 4); | ||
641 | printk(KERN_DEBUG " 0x%x\n", reg); | ||
642 | } | ||
643 | |||
644 | if ((j % 4) != 0) | ||
645 | printk(KERN_DEBUG "\n"); | ||
646 | |||
647 | fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM, | ||
648 | FUSB300_GTM_TST_FIFO_DEG); | ||
649 | } | ||
650 | |||
651 | static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep, | ||
652 | u8 entry, u16 length, u8 *golden) | ||
653 | { | ||
654 | u32 reg; | ||
655 | u32 i = 0; | ||
656 | u32 golden_value; | ||
657 | u8 *tmp; | ||
658 | |||
659 | tmp = golden; | ||
660 | |||
661 | printk(KERN_DEBUG "fusb300_cmp_dbg_fifo (entry %d) : start\n", entry); | ||
662 | |||
663 | reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM); | ||
664 | reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) | | ||
665 | FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG); | ||
666 | reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) | | ||
667 | FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG); | ||
668 | iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM); | ||
669 | |||
670 | for (i = 0; i < (length >> 2); i++) { | ||
671 | if (i * 4 == 1024) | ||
672 | break; | ||
673 | golden_value = *tmp | *(tmp + 1) << 8 | | ||
674 | *(tmp + 2) << 16 | *(tmp + 3) << 24; | ||
675 | |||
676 | reg = ioread32(ep->fusb300->reg + | ||
677 | FUSB300_OFFSET_BUFDBG_START + i*4); | ||
678 | |||
679 | if (reg != golden_value) { | ||
680 | printk(KERN_DEBUG "0x%x : ", (u32)(ep->fusb300->reg + | ||
681 | FUSB300_OFFSET_BUFDBG_START + i*4)); | ||
682 | printk(KERN_DEBUG " golden = 0x%x, reg = 0x%x\n", | ||
683 | golden_value, reg); | ||
684 | } | ||
685 | tmp += 4; | ||
686 | } | ||
687 | |||
688 | switch (length % 4) { | ||
689 | case 1: | ||
690 | golden_value = *tmp; | ||
691 | case 2: | ||
692 | golden_value = *tmp | *(tmp + 1) << 8; | ||
693 | case 3: | ||
694 | golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16; | ||
695 | default: | ||
696 | break; | ||
697 | |||
698 | reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_BUFDBG_START + i*4); | ||
699 | if (reg != golden_value) { | ||
700 | printk(KERN_DEBUG "0x%x:", (u32)(ep->fusb300->reg + | ||
701 | FUSB300_OFFSET_BUFDBG_START + i*4)); | ||
702 | printk(KERN_DEBUG " golden = 0x%x, reg = 0x%x\n", | ||
703 | golden_value, reg); | ||
704 | } | ||
705 | } | ||
706 | |||
707 | printk(KERN_DEBUG "fusb300_cmp_dbg_fifo : end\n"); | ||
708 | fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM, | ||
709 | FUSB300_GTM_TST_FIFO_DEG); | ||
710 | } | ||
711 | #endif | ||
712 | |||
713 | static void fusb300_rdfifo(struct fusb300_ep *ep, | 612 | static void fusb300_rdfifo(struct fusb300_ep *ep, |
714 | struct fusb300_request *req, | 613 | struct fusb300_request *req, |
715 | u32 length) | 614 | u32 length) |