Received: from eggs.gnu.org ([2001:4830:134:3::10]:56057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC4JT-000566-ST for qemu-devel@nongnu.org; Mon, 06 Jul 2015 07:11:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC4JO-0004D3-Hz for qemu-devel@nongnu.org; Mon, 06 Jul 2015 07:11:51 -0400 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:36569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC4JO-0004Ci-82 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 07:11:46 -0400 Received: by lagc2 with SMTP id c2so150203190lag.3 for ; Mon, 06 Jul 2015 04:11:45 -0700 (PDT) Date: Mon, 6 Jul 2015 14:18:31 +0300 From: Antony Pavlov Message-Id: <20150706141831.2a2b3730481e5d633325d211@gmail.com> In-Reply-To: <1436163304-6167-9-git-send-email-serge.vakulenko@gmail.com> References: <1436163304-6167-1-git-send-email-serge.vakulenko@gmail.com> <1436163304-6167-9-git-send-email-serge.vakulenko@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH pic32 v3 08/16] pic32: add file mips_pic32mx7.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Vakulenko Cc: Leon Alrae , qemu-devel@nongnu.org, Aurelien Jarno On Sun, 5 Jul 2015 23:14:56 -0700 Serge Vakulenko wrote: > This file implements a platform for Microchip PIC32MX7 microcontroller, > with three boards (machine types) supported: >=20 > pic32mx7-explorer16 PIC32MX7 microcontroller on Microchip Explorer-16 bo= ard > pic32mx7-max32 PIC32MX7 microcontroller on chipKIT Max32 board > pic32mx7-maximite PIC32MX7 microcontroller on Geoff's Maximite computer >=20 > Signed-off-by: Serge Vakulenko > --- > hw/mips/mips_pic32mx7.c | 1641 +++++++++++++++++++++++++++++++++++++++++= ++++++ > 1 file changed, 1641 insertions(+) > create mode 100644 hw/mips/mips_pic32mx7.c >=20 > diff --git a/hw/mips/mips_pic32mx7.c b/hw/mips/mips_pic32mx7.c > new file mode 100644 > index 0000000..21dd115 > --- /dev/null > +++ b/hw/mips/mips_pic32mx7.c ... > + printf("Processor: %s\n", cpu_model); > + if (qemu_logfile) { > + fprintf(qemu_logfile, "Processor: %s\n", cpu_model); > + } Please use qemu_log(). ... > +static QEMUMachine pic32_board[3] =3D { please use pic32_board[] instead of pic32_board[3] (e.g. see mips_defs[] de= finition in target-mips/translate_init.c). > + { > + .name =3D "pic32mx7-max32", > + .desc =3D "PIC32MX7 microcontroller on chipKIT Max32 board= ", > + .init =3D pic32_init_max32, > + .max_cpus =3D 1, > + }, > + { > + .name =3D "pic32mx7-maximite", > + .desc =3D "PIC32MX7 microcontroller on Geoff's Maximite bo= ard", > + .init =3D pic32_init_maximite, > + .max_cpus =3D 1, > + }, > + { > + .name =3D "pic32mx7-explorer16", > + .desc =3D "PIC32MX7 microcontroller on Microchip Explorer-= 16 board", > + .init =3D pic32_init_explorer16, > + .max_cpus =3D 1, > + }, > +}; > + > +static void pic32_machine_init(void) > +{ > + qemu_register_machine(&pic32_board[0]); > + qemu_register_machine(&pic32_board[1]); > + qemu_register_machine(&pic32_board[2]); Use cycle and ARRAY_SIZE() here (see again mips_defs[] handling). > +} > + > +type_init(pic32_register_types) > +machine_init(pic32_machine_init); > --=20 > 2.2.2 >=20 >=20 --=20 --=A0 Best regards, =A0 Antony Pavlov