usb: dwc3: add a flag to check if it is fpga board
authorHuang Rui <ray.huang@amd.com>
Tue, 28 Oct 2014 11:54:23 +0000 (19:54 +0800)
committerFelipe Balbi <balbi@ti.com>
Mon, 3 Nov 2014 16:03:35 +0000 (10:03 -0600)
commit9714625825385ad1f72dfb978c382507644d20d1
treec90fdc1005f135fa0bc9c35334f400ce8a3e4237
parent1db3cf9e0a3b831dda9d40291a245071975b2739
usb: dwc3: add a flag to check if it is fpga board

Some chip vendor is on pre-silicon phase, which needs to use the simulation
board. It should have the same product and vendor id with the true soc, but
might have some minor different configurations.

Below thread discussion proposes to find a method to distinguish between
simulation board and soc.

http://marc.info/?l=linux-usb&m=141194772206369&w=2

In Andvanced Configuration of coreConsultant, there is the parameter of
DWC_USB_EN_FPGA. This bit has the function we need. And it would response as 7
bit of GHWPARAMS6 register. So it's able to check this functional bit to confirm
if works on FPGA board.

Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h