Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cppi41dma: Debug code for high cpu usage with g_multi

Added a ton of debug code. First step towards debugging, understand
the problem.

More debug code coming.

Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
  • Loading branch information...
commit 9398733c3d6a5dd943517c9a363d709d93cd4f54 1 parent aed4ec9
Joel A Fernandes authored
View
32 drivers/usb/musb/cppi41_dma.c
@@ -1308,10 +1308,8 @@ void cppi41_check_fifo_empty(struct cppi41 *cppi)
}
}
}
- /*
if (resched)
schedule_work(&cppi->txdma_work);
- */
}
void txdma_completion_work(struct work_struct *data)
@@ -1328,14 +1326,32 @@ void txdma_completion_work(struct work_struct *data)
spin_unlock_irqrestore(&musb->lock, flags);
}
-void cppi41_handle_txfifo(struct musb *musb) {
- struct cppi41 *cppi;
-
- cppi = container_of(musb->dma_controller, struct cppi41, controller);
- schedule_work(&cppi->txdma_work);
+void cppi41_handle_txfifo(struct musb *musb, u32 mask) {
+ struct cppi41 *cppi;
+ struct musb *musb = cppi->musb;
+ unsigned index;
+
+ cppi = container_of(musb->dma_controller, struct cppi41, controller);
+
+ printk(__func__ "[usb core (set 2) interrupt mask = %x]\n", mask);
+ for (index = 0; index < USB_CPPI41_NUM_CH; index++) {
+ void __iomem *epio;
+ u16 csr;
+ tx_ch = &cppi->tx_cppi_ch[index];
+ epio = tx_ch->end_pt->regs;
+ csr = musb_readw(epio, MUSB_TXCSR);
+
+ printk(__func__ "[channel %d, ep %d] tx_ch->tx_complete = %d, TXPKTRDY=%d, FIFONOTEMPTY=%d\n", \
+ index, \
+ tx_ch->end_pt, \
+ tx_ch->tx_complete, \
+ csr & MUSB_TXCSR_TXPKTRDY, \
+ csr & MUSB_TXCSR_FIFONOTEMPTY);
+ }
+ schedule_work(&cppi->txdma_work);
}
-/**
+ /**
* cppi41_dma_controller_create -
* instantiate an object representing DMA controller.
*/
View
2  drivers/usb/musb/cppi41_dma.h
@@ -52,6 +52,6 @@ extern struct usb_cppi41_info usb_cppi41_info[];
*/
void cppi41_completion(struct musb *musb, u32 rx, u32 tx);
-void cppi41_handle_txfifo(struct musb *musb);
+void cppi41_handle_txfifo(struct musb *musb, u32 mask);
#endif /* _CPPI41_DMA_H_ */
View
2  drivers/usb/musb/ti81xx.c
@@ -848,7 +848,7 @@ static irqreturn_t ti81xx_interrupt(int irq, void *hci)
if(usbintr & USB_INTR_TXFIFO_MASK) {
// printk("[txfifo interrupt] usbintr (%x) epintr(%x)\n", usbintr, epintr);
- cppi41_handle_txfifo(musb);
+ cppi41_handle_txfifo(musb, usbintr);
ret = IRQ_HANDLED;
// goto eoi;
}
Please sign in to comment.
Something went wrong with that request. Please try again.