From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCpW3-0007mn-G3 for qemu-devel@nongnu.org; Fri, 23 Aug 2013 07:27:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCpVy-00028N-5Q for qemu-devel@nongnu.org; Fri, 23 Aug 2013 07:26:55 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40819 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCpVx-00028E-Rx for qemu-devel@nongnu.org; Fri, 23 Aug 2013 07:26:50 -0400 Message-ID: <521746F5.4090902@suse.de> Date: Fri, 23 Aug 2013 13:26:45 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1377220732-24198-1-git-send-email-akoskovacs@gmx.com> <1377220732-24198-2-git-send-email-akoskovacs@gmx.com> In-Reply-To: <1377220732-24198-2-git-send-email-akoskovacs@gmx.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/3] hw/usb/hcd-ohci.c: Move sysbus and PCI code to new files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?w4Frb3MgS292w6Fjcw==?= Cc: qemu-devel@nongnu.org, Gerd Hoffmann Am 23.08.2013 03:18, schrieb =C3=81kos Kov=C3=A1cs: > Move the existing sysbus and PCI logic to hcd-ohci-sysbus.c and > hcd-ohci-pci.c from hcd-ohci.c. Create a new hcd-ohci.h header for the > shared declarations and macros. >=20 > Signed-off-by: =C3=81kos Kov=C3=A1cs > --- > hw/usb/hcd-ohci-pci.c | 96 ++++++++++ > hw/usb/hcd-ohci-sysbus.c | 84 +++++++++ > hw/usb/hcd-ohci.c | 434 +++-----------------------------------= -------- > hw/usb/hcd-ohci.h | 311 +++++++++++++++++++++++++++++++++ > 4 files changed, 514 insertions(+), 411 deletions(-) > create mode 100644 hw/usb/hcd-ohci-pci.c > create mode 100644 hw/usb/hcd-ohci-sysbus.c > create mode 100644 hw/usb/hcd-ohci.h >=20 > diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c > new file mode 100644 > index 0000000..ac50951 > --- /dev/null > +++ b/hw/usb/hcd-ohci-pci.c > @@ -0,0 +1,96 @@ > +/* > + * QEMU USB OHCI Emulation > + * Copyright (c) 2004 Gianni Tedesco > + * Copyright (c) 2006 CodeSourcery > + * Copyright (c) 2006 Openedhand Ltd. > + * > + * This library is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2 of the License, or (at your option) any later version. > + * > + * This library is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with this library; if not, see . > + * > + * TODO: > + * o Isochronous transfers > + * o Allocate bandwidth in frames properly > + * o Disable timers when nothing needs to be done, or remove timer us= age > + * all together. > + * o BIOS work to boot from USB storage > +*/ [...] > diff --git a/hw/usb/hcd-ohci-sysbus.c b/hw/usb/hcd-ohci-sysbus.c > new file mode 100644 > index 0000000..b9d15db > --- /dev/null > +++ b/hw/usb/hcd-ohci-sysbus.c > @@ -0,0 +1,84 @@ > +/* > + * QEMU USB OHCI Emulation > + * Copyright (c) 2004 Gianni Tedesco > + * Copyright (c) 2006 CodeSourcery > + * Copyright (c) 2006 Openedhand Ltd. > + * > + * This library is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2 of the License, or (at your option) any later version. > + * > + * This library is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with this library; if not, see . > + * > + * TODO: > + * o Isochronous transfers > + * o Allocate bandwidth in frames properly > + * o Disable timers when nothing needs to be done, or remove timer us= age > + * all together. > + * o BIOS work to boot from USB storage > +*/ [...] > diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h > new file mode 100644 > index 0000000..8be00f2 > --- /dev/null > +++ b/hw/usb/hcd-ohci.h > @@ -0,0 +1,311 @@ > +/* > + * QEMU USB OHCI Emulation > + * Copyright (c) 2004 Gianni Tedesco > + * Copyright (c) 2006 CodeSourcery > + * Copyright (c) 2006 Openedhand Ltd. > + * > + * This library is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2 of the License, or (at your option) any later version. > + * > + * This library is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with this library; if not, see . > + * > + * TODO: > + * o Isochronous transfers > + * o Allocate bandwidth in frames properly > + * o Disable timers when nothing needs to be done, or remove timer us= age > + * all together. > + * o BIOS work to boot from USB storage > +*/ Is it really a good idea to duplicate the TODO list into four files? I assume points 1-3 affect the core code that is not moving, so that all four points could stay in hcd-ohci.c. No one is going to remember to sync it otherwise. Also there should probably be a space before */ for alignment. :) When I create new files I usually add an up-to-date copyright line, not sure if that's applicable here, depending on amount of changes. The split itself seems like a good idea, thanks. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg