[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 03/13] hw/arm/raspi: Use more specific machine names
From: |
Luc Michel |
Subject: |
Re: [PATCH v2 03/13] hw/arm/raspi: Use more specific machine names |
Date: |
Tue, 18 Feb 2020 10:07:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote:
> Now that we can instantiate different machines based on their
> board_rev register value, we can have various raspi2 and raspi3.
>
> In commit fc78a990ec103 we corrected the machine description.
> Correct the machine names too. For backward compatibility, add
> an alias to the previous generic name.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Luc Michel <address@hidden>
> ---
> hw/arm/raspi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
> index 1a8c135dc6..d9e8acfe3b 100644
> --- a/hw/arm/raspi.c
> +++ b/hw/arm/raspi.c
> @@ -327,6 +327,7 @@ static void raspi2b_machine_class_init(ObjectClass *oc,
> void *data)
> MachineClass *mc = MACHINE_CLASS(oc);
> RaspiMachineClass *rmc = RASPI_MACHINE_CLASS(oc);
>
> + mc->alias = "raspi2";
> rmc->board_rev = 0xa21041;
> raspi_machine_class_common_init(mc, rmc->board_rev);
> };
> @@ -337,6 +338,7 @@ static void raspi3b_machine_class_init(ObjectClass *oc,
> void *data)
> MachineClass *mc = MACHINE_CLASS(oc);
> RaspiMachineClass *rmc = RASPI_MACHINE_CLASS(oc);
>
> + mc->alias = "raspi3";
> rmc->board_rev = 0xa02082;
> raspi_machine_class_common_init(mc, rmc->board_rev);
> };
> @@ -344,12 +346,12 @@ static void raspi3b_machine_class_init(ObjectClass *oc,
> void *data)
>
> static const TypeInfo raspi_machine_types[] = {
> {
> - .name = MACHINE_TYPE_NAME("raspi2"),
> + .name = MACHINE_TYPE_NAME("raspi2b"),
> .parent = TYPE_RASPI_MACHINE,
> .class_init = raspi2b_machine_class_init,
> #ifdef TARGET_AARCH64
> }, {
> - .name = MACHINE_TYPE_NAME("raspi3"),
> + .name = MACHINE_TYPE_NAME("raspi3b"),
> .parent = TYPE_RASPI_MACHINE,
> .class_init = raspi3b_machine_class_init,
> #endif
>
- [PATCH v2 00/13] hw/arm: Add raspi0 and raspi1 machines, Philippe Mathieu-Daudé, 2020/02/17
- [PATCH v2 01/13] hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2, Philippe Mathieu-Daudé, 2020/02/17
- [PATCH v2 02/13] hw/arm/raspi: Avoid using TypeInfo::class_data pointer, Philippe Mathieu-Daudé, 2020/02/17
- [PATCH v2 03/13] hw/arm/raspi: Use more specific machine names, Philippe Mathieu-Daudé, 2020/02/17
- Re: [PATCH v2 03/13] hw/arm/raspi: Use more specific machine names,
Luc Michel <=
- [PATCH v2 04/13] hw/arm/raspi: Introduce RaspiProcessorId enum, Philippe Mathieu-Daudé, 2020/02/17
- [PATCH v2 05/13] hw/arm/raspi: Remove use of the 'version' value in the board code, Philippe Mathieu-Daudé, 2020/02/17
- [PATCH v2 06/13] hw/arm/bcm2836: Restrict BCM283XClass declaration to C source, Philippe Mathieu-Daudé, 2020/02/17
- [PATCH v2 08/13] hw/arm/bcm2836: Introduce BCM283XClass::core_count, Philippe Mathieu-Daudé, 2020/02/17
- [PATCH v2 09/13] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs, Philippe Mathieu-Daudé, 2020/02/17