Skip to content

Commit

Permalink
usb: dwc3: Correct DWC3_DCTL_HIRD_THRES definition
Browse files Browse the repository at this point in the history
The definition of DWC3_DCTL_HIRD_THRES macro is
completely wrong. It will only work for when we
want to read the register's contents for that bitfield.

Change the macro so that it can be used to writing to
the register, and when we need to read, we can add
extra right shift of 24 bits.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>

[ balbi@ti.com: add a commit log ]

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Pratyush Anand authored and Felipe Balbi committed Jun 6, 2012
1 parent 3336abb commit 7e39b81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/dwc3/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
#define DWC3_DCTL_LSFTRST (1 << 29)

#define DWC3_DCTL_HIRD_THRES_MASK (0x1f << 24)
#define DWC3_DCTL_HIRD_THRES(n) (((n) & DWC3_DCTL_HIRD_THRES_MASK) >> 24)
#define DWC3_DCTL_HIRD_THRES(n) ((n) << 24)

#define DWC3_DCTL_APPL1RES (1 << 23)

Expand Down

0 comments on commit 7e39b81

Please sign in to comment.