* E rElinquish bus (OTG)
* H request host mode
* h cancel host request
+ * T start sending TEST_PACKET
* D<num> set/query the debug level
*/
static int musb_proc_write(struct file *file, const char __user *buffer,
}
break;
+ case 'T':
+ if (pBase) {
+ musb_load_testpacket(musb);
+ musb_writeb(pBase, MGC_O_HDRC_TESTMODE,
+ MGC_M_TEST_PACKET);
+ }
+ break;
+
#if (MUSB_DEBUG>0)
/* set/read debug level */
case 'D':{
INFO("I/i: hispeed enable/disable\n");
INFO("F: force session start\n");
INFO("H: host mode\n");
+ INFO("T: start sending TEST_PACKET\n");
INFO("D: set/read dbug level\n");
break;
#endif
void musb_load_testpacket(struct musb *musb)
{
+ void __iomem *regs = musb->aLocalEnd[0].regs;
+
MGC_SelectEnd(musb->pRegs, 0);
musb_write_fifo(musb->control_ep,
sizeof(musb_test_packet), musb_test_packet);
- musb_writew(musb->pRegs, MGC_O_HDRC_CSR0, MGC_M_CSR0_TXPKTRDY);
+ musb_writew(regs, MGC_O_HDRC_CSR0, MGC_M_CSR0_TXPKTRDY);
}
/*-------------------------------------------------------------------------*/