qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH pic32 v3 08/16] pic32: add file mips_pic32mx7.c


From: Antony Pavlov
Subject: Re: [Qemu-devel] [PATCH pic32 v3 08/16] pic32: add file mips_pic32mx7.c
Date: Mon, 6 Jul 2015 14:18:31 +0300

On Sun,  5 Jul 2015 23:14:56 -0700
Serge Vakulenko <address@hidden> wrote:

> This file implements a platform for Microchip PIC32MX7 microcontroller,
> with three boards (machine types) supported:
> 
> pic32mx7-explorer16  PIC32MX7 microcontroller on Microchip Explorer-16 board
> pic32mx7-max32       PIC32MX7 microcontroller on chipKIT Max32 board
> pic32mx7-maximite    PIC32MX7 microcontroller on Geoff's Maximite computer
> 
> Signed-off-by: Serge Vakulenko <address@hidden>
> ---
>  hw/mips/mips_pic32mx7.c | 1641 
> +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 1641 insertions(+)
>  create mode 100644 hw/mips/mips_pic32mx7.c
> 
> 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] = {

please use pic32_board[] instead of pic32_board[3] (e.g. see mips_defs[] 
definition in target-mips/translate_init.c).

> +    {
> +        .name       = "pic32mx7-max32",
> +        .desc       = "PIC32MX7 microcontroller on chipKIT Max32 board",
> +        .init       = pic32_init_max32,
> +        .max_cpus   = 1,
> +    },
> +    {
> +        .name       = "pic32mx7-maximite",
> +        .desc       = "PIC32MX7 microcontroller on Geoff's Maximite board",
> +        .init       = pic32_init_maximite,
> +        .max_cpus   = 1,
> +    },
> +    {
> +        .name       = "pic32mx7-explorer16",
> +        .desc       = "PIC32MX7 microcontroller on Microchip Explorer-16 
> board",
> +        .init       = pic32_init_explorer16,
> +        .max_cpus   = 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);
> -- 
> 2.2.2
> 
> 


-- 
-- 
Best regards,
  Antony Pavlov



reply via email to

[Prev in Thread] Current Thread [Next in Thread]