From patchwork Fri Feb 14 06:05:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 11381721 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E260F139A for ; Fri, 14 Feb 2020 06:06:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5268222C2 for ; Fri, 14 Feb 2020 06:06:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hvFu+ye7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5268222C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2U7d-0004j4-UL for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Feb 2020 01:06:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36838) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2U6y-0003Za-G1 for qemu-devel@nongnu.org; Fri, 14 Feb 2020 01:06:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2U6x-0002Jq-GS for qemu-devel@nongnu.org; Fri, 14 Feb 2020 01:06:00 -0500 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:36453) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2U6r-0002BZ-IC; Fri, 14 Feb 2020 01:05:53 -0500 Received: by mail-pg1-x544.google.com with SMTP id d9so4407184pgu.3; Thu, 13 Feb 2020 22:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=CO9n+aThyUL/A/k172mfiOBqY03htvAQsM9xqdmgfV0=; b=hvFu+ye7PtBgQuds0KdW4RaG7gKWvSJ45xYXdUMbirfxOwrmrypgCX0N/AnTbd946z 7pIi1fu4HUpBiby11Sl62IYyoq3ECNSmFXH4h+gSOvjCq0PNDCHUApf/wWAUgDx2Snge Vm993oEhfEmHXO8tIe1kGhnD7/MCxDpq1AvSNyrZmcUSC3auRzfGkgcA5AVjlmYvYtYj ke7JVKVRvdnLdOEwm/k/qpEfFLZrUmKo3C/3Li9nOTQA47EpKgLpOga8GVoyff83xczN evoIDh6EslzRDbyF5p7LTNCdX9n80k4MXn56CtVU40Y2MtK+pZvfgW72Kc2mLYV//lbg h6kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=CO9n+aThyUL/A/k172mfiOBqY03htvAQsM9xqdmgfV0=; b=ng7QDpHZf57M+hYxXubaUd2dYF82Jg4aeEpoulZWC+5vSld5t4IjTURjcGHw0smDI/ OXvZHOJTu+dPOAyXNWlgyTX7iuivvKZRhCIeyILxTpUjRQprxCU2Z9EdkCL8Q8WA00Bi 7KjlCMQm+Jq0+8NPq70SHl6S6UU6qi4kZ5DPAjDSj8yV/ru7wZUdGnlMcGq2PVeNN0ni UUPs7b7P0POSpSa+uuz2GMtTf/3Z/EkUOxV2qPV5RZnq/rWBdCykhqKcLd24vGXtIpnA rXDae6QWwskqVIB4P5d8JqrfSJYbVX1g0lVk1QaCFTQk/WeLfnXB4vp3Dklbva0PtpQR 5tfA== X-Gm-Message-State: APjAAAUP2dErBKzUs0qqlklaiGXyNzxO2dENsHu1wCZO+ehg8qnKMoZB BsOztBg/MFwy4QTSLIT8JOk= X-Google-Smtp-Source: APXvYqw/fjxu5gxCJwCwqAHaRNCXA/BEbFnTEIXBgIV6EMjh0DTOsWTlDSxzc91BlqpFh10YWCk3Ew== X-Received: by 2002:aa7:8101:: with SMTP id b1mr1779187pfi.105.1581660352172; Thu, 13 Feb 2020 22:05:52 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d14sm4805891pjz.12.2020.02.13.22.05.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 22:05:51 -0800 (PST) From: Guenter Roeck To: Peter Maydell Subject: [PATCH 1/2] hw/arm/xilinx_zynq: Fix USB port instantiation Date: Thu, 13 Feb 2020 22:05:47 -0800 Message-Id: <20200214060548.24939-1-linux@roeck-us.net> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , "Edgar E . Iglesias" , Guenter Roeck Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" USB ports must be instantiated as TYPE_CHIPIDEA to work. Linux expects and checks various chipidea registers, which do not exist with the basic ehci emulation. 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 --- hw/arm/xilinx_zynq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 3a0fa5b23f..b4a8b2f2c6 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -29,6 +29,7 @@ #include "hw/loader.h" #include "hw/misc/zynq-xadc.h" #include "hw/ssi/ssi.h" +#include "hw/usb/chipidea.h" #include "qemu/error-report.h" #include "hw/sd/sdhci.h" #include "hw/char/cadence_uart.h" @@ -228,8 +229,8 @@ static void zynq_init(MachineState *machine) zynq_init_spi_flashes(0xE0007000, pic[81-IRQ_OFFSET], false); zynq_init_spi_flashes(0xE000D000, pic[51-IRQ_OFFSET], true); - sysbus_create_simple("xlnx,ps7-usb", 0xE0002000, pic[53-IRQ_OFFSET]); - sysbus_create_simple("xlnx,ps7-usb", 0xE0003000, pic[76-IRQ_OFFSET]); + sysbus_create_simple(TYPE_CHIPIDEA, 0xE0002000, pic[53 - IRQ_OFFSET]); + sysbus_create_simple(TYPE_CHIPIDEA, 0xE0003000, pic[76 - IRQ_OFFSET]); cadence_uart_create(0xE0000000, pic[59 - IRQ_OFFSET], serial_hd(0)); cadence_uart_create(0xE0001000, pic[82 - IRQ_OFFSET], serial_hd(1)); From patchwork Fri Feb 14 06:05:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 11381723 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB18A139A for ; Fri, 14 Feb 2020 06:07:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2190222C4 for ; Fri, 14 Feb 2020 06:07:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KOuUTcsP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2190222C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2U8R-0005rc-27 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Feb 2020 01:07:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36854) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2U6z-0003bW-HB for qemu-devel@nongnu.org; Fri, 14 Feb 2020 01:06:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2U6y-0002LK-It for qemu-devel@nongnu.org; Fri, 14 Feb 2020 01:06:01 -0500 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:39651) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2U6s-0002Do-Ls; Fri, 14 Feb 2020 01:05:54 -0500 Received: by mail-pg1-x542.google.com with SMTP id j15so4395726pgm.6; Thu, 13 Feb 2020 22:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ysOKWfZ4i4647Q8qI4abt59kZ1u1hiLhVP6Ipj7ZhwE=; b=KOuUTcsPQtZPqCjfPT/HikcmFuRbV1PsjIIPr1UrmZKRzuFZsdp34/7vSmjUhDJuYD x63h45XpfPCeZZC587wR6eexuuVilHJGpKy4kiCbh73BpLTTjqtQGFvSUbS6lw4F16V+ 0Girlcre6mgkGzx99Kh+OpYQ4VNoglC5gLn5zPechIvfF+gfwKn1QFaJiRc8CyOFYfik ExMYwl9y+JVMOKQHXqb/Bgy2Gyvpe8RtKffAL0kB2ADIG45GmFwrFQmMAeEb0stZjLnO Cp4wI6XQQRstxJlj3xRzF0GBUntVyqyWr5DcroqE9ztxiMc2sfYFm5vK7RsdCOJ794Jp tdPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ysOKWfZ4i4647Q8qI4abt59kZ1u1hiLhVP6Ipj7ZhwE=; b=aOagDiXAkHSJDNjP4U5WqLXWanz6yONf4Ye0dUVXaShdQDmZZWqo6FIs5qutiIn0Sp NcVibL3k5qpiugaL2kGhKjXlLR1Q95SgsSONHZ5pnjW3l4SjAvXGrWRBPQxJaG/3BEgl otjAo79awdFLixDKu8I55C9cZSuwBVeR2XwNN9e008ljBfRkEcgvZO9gk6JB5PRAg2Cb 6egHivN/Swh/61ELNi9CMvy9W4qeowoxV3xEBEo4n7Ybs4atxGH4iR798W7QeWcqIMFo VkDOPKQ4D0zgW/jXXdfWggVwIClBwbiiQdiq8GPUQPCY0l7IxatVNd/GLAovdKNWh4Pr 8usQ== X-Gm-Message-State: APjAAAUvohRMtoWaHjHhoOOmvOLvsJ8fJmqoSGpE/oe9gTlhknKCuXxy DMUqZbDSWCztyxsqaziT9Ew= X-Google-Smtp-Source: APXvYqyLWZi+VMssuTBvnobA8mg+9IZ1gPW+KQPSKVnwS7KvTbc41Lu0zlnD1ClAqcynMit2+dW1Hg== X-Received: by 2002:a65:6405:: with SMTP id a5mr1764070pgv.284.1581660353721; Thu, 13 Feb 2020 22:05:53 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id l21sm5294565pgo.33.2020.02.13.22.05.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 22:05:53 -0800 (PST) From: Guenter Roeck To: Peter Maydell Subject: [PATCH 2/2] hw/usb/hcd-ehci-sysbus: Remove obsolete xlnx, ps7-usb class Date: Thu, 13 Feb 2020 22:05:48 -0800 Message-Id: <20200214060548.24939-2-linux@roeck-us.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200214060548.24939-1-linux@roeck-us.net> References: <20200214060548.24939-1-linux@roeck-us.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , "Edgar E . Iglesias" , Guenter Roeck Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Xilinx USB devices are now instantiated through TYPE_CHIPIDEA, and xlnx support in the EHCI code is no longer needed. Signed-off-by: Guenter Roeck --- hw/usb/hcd-ehci-sysbus.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index 62612c9f5b..b5a014f968 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -114,22 +114,6 @@ static const TypeInfo ehci_platform_type_info = { .class_init = ehci_platform_class_init, }; -static void ehci_xlnx_class_init(ObjectClass *oc, void *data) -{ - SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc); - DeviceClass *dc = DEVICE_CLASS(oc); - - set_bit(DEVICE_CATEGORY_USB, dc->categories); - sec->capsbase = 0x100; - sec->opregbase = 0x140; -} - -static const TypeInfo ehci_xlnx_type_info = { - .name = "xlnx,ps7-usb", - .parent = TYPE_SYS_BUS_EHCI, - .class_init = ehci_xlnx_class_init, -}; - static void ehci_exynos4210_class_init(ObjectClass *oc, void *data) { SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(oc); @@ -266,7 +250,6 @@ static void ehci_sysbus_register_types(void) { type_register_static(&ehci_type_info); type_register_static(&ehci_platform_type_info); - type_register_static(&ehci_xlnx_type_info); type_register_static(&ehci_exynos4210_type_info); type_register_static(&ehci_tegra2_type_info); type_register_static(&ehci_ppc4xx_type_info);