hw/arm/xilinx_zynq: Fix USB port instantiation
commit616ec12d0fcc49f916dc0ab3f778fdeb87a53cd9
authorGuenter Roeck <linux@roeck-us.net>
Sat, 15 Feb 2020 12:23:53 +0000 (15 04:23 -0800)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Feb 2020 16:14:57 +0000 (28 16:14 +0000)
tree19564ab780857dc9c32d86831d45a8eaaf22fa7c
parentf2eafb75511e5d2ee601b43dc6ee0bcc6e453acd
hw/arm/xilinx_zynq: Fix USB port instantiation

USB ports on Xilinx Zync must be instantiated as TYPE_CHIPIDEA to work.
Linux expects and checks various chipidea registers, which do not exist
with the basic ehci emulation. This patch series fixes the problem.

Without this patch, USB ports fail to instantiate under Linux.

ci_hdrc ci_hdrc.0: doesn't support host
ci_hdrc ci_hdrc.0: no supported roles

With this patch, USB ports are instantiated, and it is possible
to boot from USB drive.

ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
usb 1-1: new full-speed USB device number 2 using ci_hdrc
usb 1-1: not running at top speed; connect to a high speed hub
usb 1-1: config 1 interface 0 altsetting 0 endpoint 0x81 has invalid maxpacket 512, setting to 64
usb 1-1: config 1 interface 0 altsetting 0 endpoint 0x2 has invalid maxpacket 512, setting to 64
usb-storage 1-1:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1:1.0

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200215122354.13706-2-linux@roeck-us.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/xilinx_zynq.c