From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHoCu-0001Da-QP for qemu-devel@nongnu.org; Fri, 06 Sep 2013 01:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHoCp-0000rl-TV for qemu-devel@nongnu.org; Fri, 06 Sep 2013 01:03:44 -0400 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:42230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHoCp-0000rh-L8 for qemu-devel@nongnu.org; Fri, 06 Sep 2013 01:03:39 -0400 Received: by mail-la0-f47.google.com with SMTP id eo20so2315996lab.6 for ; Thu, 05 Sep 2013 22:03:38 -0700 (PDT) Date: Fri, 6 Sep 2013 09:01:12 +0400 From: Antony Pavlov Message-Id: <20130906090112.ed1e60beb8fe5ccb52f31e80@gmail.com> In-Reply-To: <5228F9D2.1080006@suse.de> 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> <5228F9D2.1080006@suse.de> Mime-Version: 1.0 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: Andreas =?ISO-8859-1?Q?F=E4rber?= Cc: qemu-devel@nongnu.org On Thu, 05 Sep 2013 23:38:26 +0200 Andreas F=E4rber wrote: > 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 >*/ ? >=20 > Yes, sorry, copy&paste and then noticing Object. ;) > Or just leave the latter out so that all fields are undocumented. I have grepped the qemu code and found that the "private" and "public" labe= ls usage is: =3D=3D=3D quote start =3D=3D=3D typedef struct SomethingState { /*< private >*/ DeviceState parent_obj; /*< public >*/ some_type public_field1; =3D=3D=3D quote end =3D=3D=3D Is there any intention in empty line after the "public" label and no empty = line befor it? Can I wrote something like this: =3D=3D=3D quote start =3D=3D=3D typedef struct SomethingState { /*< private >*/ DeviceState parent_obj; /*< public >*/ some_type public_field1; =3D=3D=3D quote end =3D=3D=3D ? > >> 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 >=20 > Thanks for spotting, fixed. (It used to be derived from TYPE_OBJECT, but > we decided to provide QOM realize support only for devices.) >=20 > Unfortunately Tegra kernel is still stuck after USB init either way... >=20 > Cheers, > Andreas >=20 > --=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 --=20 --=A0 Best regards, =A0 Antony Pavlov