From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhG8-0002Qt-W5 for qemu-devel@nongnu.org; Thu, 05 Sep 2013 17:38:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHhG3-00077G-Iw for qemu-devel@nongnu.org; Thu, 05 Sep 2013 17:38:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59780 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhG3-000774-9V for qemu-devel@nongnu.org; Thu, 05 Sep 2013 17:38:31 -0400 Message-ID: <5228F9D2.1080006@suse.de> Date: Thu, 05 Sep 2013 23:38:26 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1378367579-1099-1-git-send-email-antonynpavlov@gmail.com> <1378367579-1099-2-git-send-email-antonynpavlov@gmail.com> <5228C8A2.7030306@suse.de> <20130906012328.fbab3c6df75fb6cc12c52ce5@gmail.com> In-Reply-To: <20130906012328.fbab3c6df75fb6cc12c52ce5@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC v4 1/5] hw/arm: add very initial support for Canon DIGIC SoC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Antony Pavlov Cc: qemu-devel@nongnu.org Am 05.09.2013 23:23, schrieb Antony Pavlov: > On Thu, 05 Sep 2013 20:08:34 +0200 > Andreas F=E4rber wrote: >> Am 05.09.2013 09:52, schrieb Antony Pavlov: >>> diff --git a/hw/arm/digic.c b/hw/arm/digic.c >>> new file mode 100644 >>> index 0000000..95a9fcd >>> --- /dev/null >>> +++ b/hw/arm/digic.c [...] >>> +static const TypeInfo digic_type_info =3D { >>> + .name =3D TYPE_DIGIC, >>> + .parent =3D TYPE_DEVICE, >>> + .instance_size =3D sizeof(DigicState), >>> + .instance_init =3D digic_init, >>> + .class_init =3D digic_class_init, >>> +}; >>> + >>> +static void digic_register_types(void) >>> +{ >>> + type_register_static(&digic_type_info); >>> +} >>> + >>> +type_init(digic_register_types) >>> diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h >>> new file mode 100644 >>> index 0000000..0ef4723 >>> --- /dev/null >>> +++ b/include/hw/arm/digic.h [...] >>> +typedef struct DigicState { >> >> Please add >> /*< private >*/ >> >>> + Object parent_obj; >> >> /*< private >*/ >=20 > /*< public >*/ ? Yes, sorry, copy&paste and then noticing Object. ;) Or just leave the latter out so that all fields are undocumented. >> markers for documentation. >> >> It needs to be DeviceState parent_obj though. >=20 > In your tegra2 support 'Object parent_obj' is used in a similar situati= on. >=20 > http://repo.or.cz/w/qemu/afaerber.git/blob/refs/heads/tegra:/include/hw= /arm/tegra2.h#l42 Thanks for spotting, fixed. (It used to be derived from TYPE_OBJECT, but we decided to provide QOM realize support only for devices.) Unfortunately Tegra kernel is still stuck after USB init either way... Cheers, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg