summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorPratyush Anand <pratyush.anand@st.com>2012-06-06 13:48:29 (GMT)
committerFelipe Balbi <balbi@ti.com>2012-06-06 13:56:10 (GMT)
commit7e39b817ee64a8b67282c76f52aaabddc8a5cd26 (patch)
treee8a7fbc59ea3327ce3850abf5b0863ffc01e3b73 /drivers/usb/dwc3
parent3336abb5b608300550136ddab7a7101b30d45fa7 (diff)
downloadlinux-7e39b817ee64a8b67282c76f52aaabddc8a5cd26.tar.xz
usb: dwc3: Correct DWC3_DCTL_HIRD_THRES definition
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>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index fcb8be2..d3e56cf 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -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)