Skip to content

Commit

Permalink
usb: dwc3: Fix GTXFIFOSIZ.TXFDEP macro name
Browse files Browse the repository at this point in the history
Change the macro name DWC3_GTXFIFOSIZ_TXFDEF to DWC3_GTXFIFOSIZ_TXFDEP
to match with the register name GTXFIFOSIZ.TXFDEP.

Fixes: 457e84b ("usb: dwc3: gadget: dynamically re-size TxFifos")
Fixes: 0cab8d2 ("usb: dwc3: Update DWC_usb31 GTXFIFOSIZ reg fields")
Signed-off-by: Thinh Nguyen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
  • Loading branch information
Thinh Nguyen authored and felipebalbi committed Apr 16, 2020
1 parent 09b04ab commit 586f433
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/dwc3/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@

/* Global TX Fifo Size Register */
#define DWC31_GTXFIFOSIZ_TXFRAMNUM BIT(15) /* DWC_usb31 only */
#define DWC31_GTXFIFOSIZ_TXFDEF(n) ((n) & 0x7fff) /* DWC_usb31 only */
#define DWC3_GTXFIFOSIZ_TXFDEF(n) ((n) & 0xffff)
#define DWC31_GTXFIFOSIZ_TXFDEP(n) ((n) & 0x7fff) /* DWC_usb31 only */
#define DWC3_GTXFIFOSIZ_TXFDEP(n) ((n) & 0xffff)
#define DWC3_GTXFIFOSIZ_TXFSTADDR(n) ((n) & 0xffff0000)

/* Global Event Size Registers */
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2236,9 +2236,9 @@ static int dwc3_gadget_init_in_endpoint(struct dwc3_ep *dep)

size = dwc3_readl(dwc->regs, DWC3_GTXFIFOSIZ(dep->number >> 1));
if (dwc3_is_usb31(dwc))
size = DWC31_GTXFIFOSIZ_TXFDEF(size);
size = DWC31_GTXFIFOSIZ_TXFDEP(size);
else
size = DWC3_GTXFIFOSIZ_TXFDEF(size);
size = DWC3_GTXFIFOSIZ_TXFDEP(size);

/* FIFO Depth is in MDWDITH bytes. Multiply */
size *= mdwidth;
Expand Down

0 comments on commit 586f433

Please sign in to comment.