mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
usb-designware: allow setting USB speed in DCFG register
This allows targets to select full speed operation instead of the default high-speed mode, which is mainly interesting for debugging USB communication. Change-Id: I405ff63c6660ca03ea04282a12b59dac06ca46f5
This commit is contained in:
parent
5dd2756b14
commit
80e1c2b27e
1 changed files with 5 additions and 1 deletions
|
|
@ -93,6 +93,10 @@
|
|||
#define USB_DW_FORCED_MODE 0
|
||||
#endif
|
||||
|
||||
#ifndef USB_DW_DCFG_SPEED
|
||||
#define USB_DW_DCFG_SPEED 0
|
||||
#endif
|
||||
|
||||
#define GET_DTXFNUM(ep) ((DWC_DIEPCTL(ep)>>22) & 0xf)
|
||||
|
||||
#define USB_DW_NUM_DIRS 2
|
||||
|
|
@ -1465,7 +1469,7 @@ static void usb_dw_init(void)
|
|||
#endif
|
||||
DWC_GAHBCFG = gahbcfg;
|
||||
|
||||
DWC_DCFG = NZLSOHSK;
|
||||
DWC_DCFG = NZLSOHSK | USB_DW_DCFG_SPEED;
|
||||
#ifdef USB_DW_SHARED_FIFO
|
||||
/* Set EP mismatch counter to the maximum */
|
||||
DWC_DCFG |= EPMISCNT(0x1f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue