Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 30359ECAAD1 for ; Wed, 31 Aug 2022 15:06:13 +0000 (UTC) Received: from localhost ([::1]:39698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTPIB-0004cK-Ua for qemu-devel@archiver.kernel.org; Wed, 31 Aug 2022 11:06:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTPFw-0003Sa-8f; Wed, 31 Aug 2022 11:03:52 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:24576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTPFk-00034O-JO; Wed, 31 Aug 2022 11:03:42 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id A7F50746FDE; Wed, 31 Aug 2022 17:03:35 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 70E9F746E07; Wed, 31 Aug 2022 17:03:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id 6F0C7746396; Wed, 31 Aug 2022 17:03:35 +0200 (CEST) Date: Wed, 31 Aug 2022 17:03:35 +0200 (CEST) From: BALATON Zoltan To: BB cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Huacai Chen , =?ISO-8859-15?Q?Philippe_Mathieu-Daud=E9?= , Jiaxun Yang Subject: Re: [PATCH v3 06/10] hw/isa/vt82c686: Instantiate USB functions in host device In-Reply-To: <96C4E9E5-4875-4B49-B176-673BAAEE7993@gmail.com> Message-ID: <48b1c17d-fa2f-c2f7-b22-79eb6e8f55b@eik.bme.hu> References: <20220831095914.2041-1-shentey@gmail.com> <20220831095914.2041-7-shentey@gmail.com> <331bbd5a-aeaa-d5c0-cf8f-cde5b22d8a3@eik.bme.hu> <96C4E9E5-4875-4B49-B176-673BAAEE7993@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, 31 Aug 2022, BB wrote: > Am 31. August 2022 15:23:37 MESZ schrieb BALATON Zoltan : >> On Wed, 31 Aug 2022, Bernhard Beschow wrote: >>> The USB functions can be enabled/disabled through the ISA function. Also >>> its interrupt routing can be influenced there. >>> >>> Signed-off-by: Bernhard Beschow >>> --- >>> hw/isa/vt82c686.c | 12 ++++++++++++ >>> hw/mips/fuloong2e.c | 3 --- >>> hw/ppc/pegasos2.c | 4 ---- >>> 3 files changed, 12 insertions(+), 7 deletions(-) >>> >>> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c >>> index 9d946cea54..66a4b9c230 100644 >>> --- a/hw/isa/vt82c686.c >>> +++ b/hw/isa/vt82c686.c >>> @@ -23,6 +23,7 @@ >>> #include "hw/intc/i8259.h" >>> #include "hw/irq.h" >>> #include "hw/dma/i8257.h" >>> +#include "hw/usb/hcd-uhci.h" >>> #include "hw/timer/i8254.h" >>> #include "hw/rtc/mc146818rtc.h" >>> #include "migration/vmstate.h" >>> @@ -546,6 +547,7 @@ struct ViaISAState { >>> qemu_irq *isa_irqs; >>> ViaSuperIOState via_sio; >>> PCIIDEState ide; >>> + UHCIState uhci[2]; >>> }; >>> >>> static const VMStateDescription vmstate_via = { >>> @@ -563,6 +565,8 @@ static void via_isa_init(Object *obj) >>> ViaISAState *s = VIA_ISA(obj); >>> >>> object_initialize_child(obj, "ide", &s->ide, "via-ide"); >>> + object_initialize_child(obj, "uhci1", &s->uhci[0], "vt82c686b-usb-uhci"); >>> + object_initialize_child(obj, "uhci2", &s->uhci[1], "vt82c686b-usb-uhci"); >> >> Sorry for not saying this yesterday, this can also be done separately >> so no need for another version of this series if not needed for another >> reason but could we add a define for vt82c686b-usb-uhci in >> include/hw/isa/vt82c686.h and use that here and in >> hw/usb/vt82c686-uhci-pci.c ? > > Would creating a dedicated header work, too? Board code doesn't need to see the define any longer. I don't think it needs a separate header just for this so I'd put it in vt82c686.h but I don't mind either way. Regards, BALATON Zoltan