我们的设备一直工作在MUSB_PERIPHERAL, 提供gadgetfs给上层应用调用;
现在想让AM335x USB always工作在Full speed mode, 请教一下怎么修改代码?
看了一下inode.c, 里面有CONFIG_USB_GADGET_DUALSPEED, 但是发现没有办法disable这个宏;
也试了下面的办法
在Linux/Android中: – 在kernel/drivers/usb/musb/musb_core.c中 musb_writeb(regs, MUSB_POWER, MUSB_POWER_ISOUPDATE | MUSB_POWER_SOFTCONN – | MUSB_POWER_HSENAB + /*| MUSB_POWER_HSENAB */ /* ENSUSPEND wedges tusb */ /* | MUSB_POWER_ENSUSPEND */ );
没有效果;
不知道怎么修改才能让AM335x USB always工作在Full speed mode?
yu zheng:
I have tried this way, let USB work at full speed, it seems that it works;
musb_writeb(regs, MUSB_POWER, MUSB_POWER_ISOUPDATE- | MUSB_POWER_HSENAB+ /*| MUSB_POWER_HSENAB *//* ENSUSPEND wedges tusb *//* | MUSB_POWER_ENSUSPEND */);
Jian Zhou:
回复 yu zheng:
USB core的USB_O_POWER寄存器的第5位要清0,同时USB_PACKET_LENGTH要改小为64