diff mbox series

[3/5] hw/arm/aspeed: Add fuji machine type

Message ID 20210827210417.4022054-4-pdel@fb.com
State New
Headers show
Series hw/arm/aspeed: Add fuji machine type | expand

Commit Message

Peter Delevoryas Aug. 27, 2021, 9:04 p.m. UTC
From: Peter Delevoryas <pdel@fb.com>

Fuji uses the AST2600, so it's very similar to `ast2600-evb`, but it has
a few slight differences, such as using UART1 for the serial console.

Signed-off-by: Peter Delevoryas <pdel@fb.com>
---
 hw/arm/aspeed.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Cédric Le Goater Aug. 28, 2021, 8:28 a.m. UTC | #1
On 8/27/21 11:04 PM, pdel@fb.com wrote:
> From: Peter Delevoryas <pdel@fb.com>
> 
> Fuji uses the AST2600, so it's very similar to `ast2600-evb`, but it has
> a few slight differences, such as using UART1 for the serial console.

Do we have a public DTS for this board ? 

Thanks,

C.

> 
> Signed-off-by: Peter Delevoryas <pdel@fb.com>
> ---
>  hw/arm/aspeed.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index ff53d12395..d2eb516a1d 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -1029,6 +1029,15 @@ static void aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
>          aspeed_soc_num_cpus(amc->soc_name);
>  };
>  
> +static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
> +{
> +    MachineClass *mc = MACHINE_CLASS(oc);
> +    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
> +
> +    mc->desc = "Facebook Fuji BMC (Aspeed AST2600, Cortex-A7)";
> +    amc->serial_dev = ASPEED_DEV_UART1;
> +}
> +
>  static const TypeInfo aspeed_machine_types[] = {
>      {
>          .name          = MACHINE_TYPE_NAME("palmetto-bmc"),
> @@ -1078,6 +1087,10 @@ static const TypeInfo aspeed_machine_types[] = {
>          .name          = MACHINE_TYPE_NAME("rainier-bmc"),
>          .parent        = TYPE_ASPEED_MACHINE,
>          .class_init    = aspeed_machine_rainier_class_init,
> +    }, {
> +        .name          = MACHINE_TYPE_NAME("fuji"),
> +        .parent        = MACHINE_TYPE_NAME("ast2600-evb"),
> +        .class_init    = aspeed_machine_fuji_class_init,
>      }, {
>          .name          = TYPE_ASPEED_MACHINE,
>          .parent        = TYPE_MACHINE,
>
Peter Delevoryas Aug. 28, 2021, 4 p.m. UTC | #2
Actually yes! I should have included a link to it: https://github.com/facebook/openbmc-uboot/blob/openbmc/helium/v2019.04/arch/arm/dts/aspeed-bmc-facebook-fuji.dts

From: Cédric Le Goater <clg@kaod.org>
Date: Saturday, August 28, 2021 at 1:28 AM
To: Peter Delevoryas <pdel@fb.com>
Cc: joel@jms.id.au <joel@jms.id.au>, qemu-devel@nongnu.org <qemu-devel@nongnu.org>, qemu-arm@nongnu.org <qemu-arm@nongnu.org>
Subject: Re: [PATCH 3/5] hw/arm/aspeed: Add fuji machine type
On 8/27/21 11:04 PM, pdel@fb.com wrote:
> From: Peter Delevoryas <pdel@fb.com>
>
> Fuji uses the AST2600, so it's very similar to `ast2600-evb`, but it has
> a few slight differences, such as using UART1 for the serial console.

Do we have a public DTS for this board ?

Thanks,

C.

>
> Signed-off-by: Peter Delevoryas <pdel@fb.com>
> ---
>  hw/arm/aspeed.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index ff53d12395..d2eb516a1d 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -1029,6 +1029,15 @@ static void aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
>          aspeed_soc_num_cpus(amc->soc_name);
>  };
>
> +static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
> +{
> +    MachineClass *mc = MACHINE_CLASS(oc);
> +    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
> +
> +    mc->desc = "Facebook Fuji BMC (Aspeed AST2600, Cortex-A7)";
> +    amc->serial_dev = ASPEED_DEV_UART1;
> +}
> +
>  static const TypeInfo aspeed_machine_types[] = {
>      {
>          .name          = MACHINE_TYPE_NAME("palmetto-bmc"),
> @@ -1078,6 +1087,10 @@ static const TypeInfo aspeed_machine_types[] = {
>          .name          = MACHINE_TYPE_NAME("rainier-bmc"),
>          .parent        = TYPE_ASPEED_MACHINE,
>          .class_init    = aspeed_machine_rainier_class_init,
> +    }, {
> +        .name          = MACHINE_TYPE_NAME("fuji"),
> +        .parent        = MACHINE_TYPE_NAME("ast2600-evb"),
> +        .class_init    = aspeed_machine_fuji_class_init,
>      }, {
>          .name          = TYPE_ASPEED_MACHINE,
>          .parent        = TYPE_MACHINE,
>
Philippe Mathieu-Daudé Aug. 31, 2021, 4 p.m. UTC | #3
On 8/28/21 6:00 PM, Peter Delevoryas wrote:
> Actually yes! I should have included a link to it:
> https://github.com/facebook/openbmc-uboot/blob/openbmc/helium/v2019.04/arch/arm/dts/aspeed-bmc-facebook-fuji.dts

(On technical lists, it's best to avoid top-posting, and to
instead reply inline to make the conversation easier to follow).

Can you add a test for your board please? See examples
in tests/acceptance/boot_linux_console.py:
- test_arm_ast2500_romulus_openbmc_v2_9_0
- test_arm_ast2600_debian

> *From: *Cédric Le Goater <clg@kaod.org>
> *Date: *Saturday, August 28, 2021 at 1:28 AM
> *To: *Peter Delevoryas <pdel@fb.com>
> *Cc: *joel@jms.id.au <joel@jms.id.au>, qemu-devel@nongnu.org
> <qemu-devel@nongnu.org>, qemu-arm@nongnu.org <qemu-arm@nongnu.org>
> *Subject: *Re: [PATCH 3/5] hw/arm/aspeed: Add fuji machine type
> 
> On 8/27/21 11:04 PM, pdel@fb.com wrote:
>> From: Peter Delevoryas <pdel@fb.com>
>>
>> Fuji uses the AST2600, so it's very similar to `ast2600-evb`, but it has
>> a few slight differences, such as using UART1 for the serial console.
> 
> Do we have a public DTS for this board ?
> 
> Thanks,
> 
> C.
> 
>>
>> Signed-off-by: Peter Delevoryas <pdel@fb.com>
>> ---
>>  hw/arm/aspeed.c | 13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>>
>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>> index ff53d12395..d2eb516a1d 100644
>> --- a/hw/arm/aspeed.c
>> +++ b/hw/arm/aspeed.c
>> @@ -1029,6 +1029,15 @@ static void
> aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
>>          aspeed_soc_num_cpus(amc->soc_name);
>>  };
>> 
>> +static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
>> +{
>> +    MachineClass *mc = MACHINE_CLASS(oc);
>> +    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
>> +
>> +    mc->desc = "Facebook Fuji BMC (Aspeed AST2600, Cortex-A7)";
>> +    amc->serial_dev = ASPEED_DEV_UART1;
>> +}
>> +
>>  static const TypeInfo aspeed_machine_types[] = {
>>      {
>>          .name          = MACHINE_TYPE_NAME("palmetto-bmc"),
>> @@ -1078,6 +1087,10 @@ static const TypeInfo aspeed_machine_types[] = {
>>          .name          = MACHINE_TYPE_NAME("rainier-bmc"),
>>          .parent        = TYPE_ASPEED_MACHINE,
>>          .class_init    = aspeed_machine_rainier_class_init,
>> +    }, {
>> +        .name          = MACHINE_TYPE_NAME("fuji"),
>> +        .parent        = MACHINE_TYPE_NAME("ast2600-evb"),
>> +        .class_init    = aspeed_machine_fuji_class_init,
>>      }, {
>>          .name          = TYPE_ASPEED_MACHINE,
>>          .parent        = TYPE_MACHINE,
>>
>
Peter Delevoryas Aug. 31, 2021, 4:38 p.m. UTC | #4
> On Aug 31, 2021, at 9:00 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> 
> On 8/28/21 6:00 PM, Peter Delevoryas wrote:
>> Actually yes! I should have included a link to it:
>> https://github.com/facebook/openbmc-uboot/blob/openbmc/helium/v2019.04/arch/arm/dts/aspeed-bmc-facebook-fuji.dts
> 
> (On technical lists, it's best to avoid top-posting, and to
> instead reply inline to make the conversation easier to follow).
> 
> Can you add a test for your board please? See examples
> in tests/acceptance/boot_linux_console.py:
> - test_arm_ast2500_romulus_openbmc_v2_9_0
> - test_arm_ast2600_debian

(Sorry about that, I’ll reply inline now)

Yeah absolutely, thanks for pointing those out: I actually resubmitted [PATCH 5/5]
separately already, should I just submit it again as [PATCH v2] with the tests,
or would you want to reply to that patch? I’ll include a cover letter that has a
diff-stat of the test changes regardless I suppose, so it’s probably not necessary
right?

Thanks,
Peter

> 
>> *From: *Cédric Le Goater <clg@kaod.org>
>> *Date: *Saturday, August 28, 2021 at 1:28 AM
>> *To: *Peter Delevoryas <pdel@fb.com>
>> *Cc: *joel@jms.id.au <joel@jms.id.au>, qemu-devel@nongnu.org
>> <qemu-devel@nongnu.org>, qemu-arm@nongnu.org <qemu-arm@nongnu.org>
>> *Subject: *Re: [PATCH 3/5] hw/arm/aspeed: Add fuji machine type
>> 
>> On 8/27/21 11:04 PM, pdel@fb.com wrote:
>>> From: Peter Delevoryas <pdel@fb.com>
>>> 
>>> Fuji uses the AST2600, so it's very similar to `ast2600-evb`, but it has
>>> a few slight differences, such as using UART1 for the serial console.
>> 
>> Do we have a public DTS for this board ?
>> 
>> Thanks,
>> 
>> C.
>> 
>>> 
>>> Signed-off-by: Peter Delevoryas <pdel@fb.com>
>>> ---
>>>   hw/arm/aspeed.c | 13 +++++++++++++
>>>   1 file changed, 13 insertions(+)
>>> 
>>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>>> index ff53d12395..d2eb516a1d 100644
>>> --- a/hw/arm/aspeed.c
>>> +++ b/hw/arm/aspeed.c
>>> @@ -1029,6 +1029,15 @@ static void
>> aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
>>>           aspeed_soc_num_cpus(amc->soc_name);
>>>   };
>>>  
>>> +static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
>>> +{
>>> +    MachineClass *mc = MACHINE_CLASS(oc);
>>> +    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
>>> +
>>> +    mc->desc = "Facebook Fuji BMC (Aspeed AST2600, Cortex-A7)";
>>> +    amc->serial_dev = ASPEED_DEV_UART1;
>>> +}
>>> +
>>>   static const TypeInfo aspeed_machine_types[] = {
>>>       {
>>>           .name          = MACHINE_TYPE_NAME("palmetto-bmc"),
>>> @@ -1078,6 +1087,10 @@ static const TypeInfo aspeed_machine_types[] = {
>>>           .name          = MACHINE_TYPE_NAME("rainier-bmc"),
>>>           .parent        = TYPE_ASPEED_MACHINE,
>>>           .class_init    = aspeed_machine_rainier_class_init,
>>> +    }, {
>>> +        .name          = MACHINE_TYPE_NAME("fuji"),
>>> +        .parent        = MACHINE_TYPE_NAME("ast2600-evb"),
>>> +        .class_init    = aspeed_machine_fuji_class_init,
>>>       }, {
>>>           .name          = TYPE_ASPEED_MACHINE,
>>>           .parent        = TYPE_MACHINE,
>>> 
>> 
>
diff mbox series

Patch

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index ff53d12395..d2eb516a1d 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1029,6 +1029,15 @@  static void aspeed_machine_rainier_class_init(ObjectClass *oc, void *data)
         aspeed_soc_num_cpus(amc->soc_name);
 };
 
+static void aspeed_machine_fuji_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+    mc->desc = "Facebook Fuji BMC (Aspeed AST2600, Cortex-A7)";
+    amc->serial_dev = ASPEED_DEV_UART1;
+}
+
 static const TypeInfo aspeed_machine_types[] = {
     {
         .name          = MACHINE_TYPE_NAME("palmetto-bmc"),
@@ -1078,6 +1087,10 @@  static const TypeInfo aspeed_machine_types[] = {
         .name          = MACHINE_TYPE_NAME("rainier-bmc"),
         .parent        = TYPE_ASPEED_MACHINE,
         .class_init    = aspeed_machine_rainier_class_init,
+    }, {
+        .name          = MACHINE_TYPE_NAME("fuji"),
+        .parent        = MACHINE_TYPE_NAME("ast2600-evb"),
+        .class_init    = aspeed_machine_fuji_class_init,
     }, {
         .name          = TYPE_ASPEED_MACHINE,
         .parent        = TYPE_MACHINE,