staging: dwc2: unshift non-bool register value constants
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 30 Aug 2013 16:45:13 +0000 (18:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Aug 2013 21:14:52 +0000 (14:14 -0700)
commitf92346333538558a186890053d4e8212807726af
treeddabdbcf050cb1760dfdb2ad6f344f849f2fba2d
parent3b9edf88472e9259f9361aa485a1f399e54c4c77
staging: dwc2: unshift non-bool register value constants

Various register fields wider than one bit have constants defined for
their value. Previously, these registers would define the values as they
appear in the register, so shifted to the right to the position the
value appears in the register.

This commit changes those constants to their natural values (e.g, 0, 1,
2, etc.), as they are after shifting the register value to the right.
This also changes all relevant code to shift the values before comparing
them with constants.

This has the advantage that the values can be stored in smaller
variables (now they always require a u32) and makes the handling of
these values more consistent with other register fields that represent
natural numbers instead of enumerations (e.g., number of host channels).

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dwc2/core.c
drivers/staging/dwc2/hcd.c
drivers/staging/dwc2/hcd.h
drivers/staging/dwc2/hcd_intr.c
drivers/staging/dwc2/hcd_queue.c
drivers/staging/dwc2/hw.h