]> git.baikalelectronics.ru Git - kernel.git/commit
staging: dwc2: validate the value for phy_utmi_width
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 30 Aug 2013 16:45:22 +0000 (18:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Aug 2013 21:14:53 +0000 (14:14 -0700)
commit53cdd2c9671d8434664e35d478b292fc4a76a0b2
tree3fbe1e90f4e9ec9b83b685ad9acd0d7d76f37396
parentfca6c2ed33d03d9bdc05ed5a202d4bfc9fa69acd
staging: dwc2: validate the value for phy_utmi_width

The HWCFG4 register stores the supported utmi width values (8, 16 or
both). This commit reads that value and validates the configured value
against that.

If no (valid) value is given, the parameter defaulted to 8 bits
previously.  However, the documentation for dwc2_core_params_struct
suggests that the default should have been 16. Also, the pci bindings
explicitely set the value to 16, so this commit changes the default to
16 bits (if supported, 8 bits otherwise).

With the default changed, the value set in pci.c is changed to -1 to
make it autodetected as well.

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/core.h
drivers/staging/dwc2/hw.h
drivers/staging/dwc2/pci.c